reference

CLI Reference

Everyday and advanced commands for Ask, Shared Memory, agents, docs, providers, and Cloud.

Updated

Bare docmancer prints the everyday command overview. Use docmancer <command> --help for exact options. Advanced groups such as agent, docs, mcp, memory, providers, qdrant, and tree are hidden from that overview but fully supported.

Everyday workflow

CommandPurpose
docmancer setupDiscover agent memory, build Shared Memory, and connect detected agents.
docmancer webOpen the loopback-only local interface for the current project.
docmancer ask "question"Recall Shared Memory and supporting agent evidence, then answer from it.
docmancer commonShow memory recorded independently by two or more agents.
docmancer deliveryShow how Shared Memory reaches each agent, with the latest receipt.
docmancer timelineRead the append-only journal of curated memory changes.
docmancer statusInspect memory, sources, security, delivery, retrieval, and Cloud health.
docmancer doctorDiagnose configuration, indexes, providers, and integrations.
docmancer backupProtect Claude Code and Codex history in an encrypted snapshot.
docmancer restoreVerify, preview, and restore an agent snapshot safely.
docmancer consolidateCreate reviewable memory proposals from agent history.
docmancer clearRemove local memory indexes, models, and caches, then start again.

Ask

docmancer ask "why did we choose Railway?"
docmancer ask "what changed in the release process?" --no-answer
docmancer ask "what are our env-file rules?" --scope project --project "$PWD"
docmancer ask "what did we decide yesterday?" --fresh

Ask reads the latest committed index instead of rescanning your disk. When a generation provider is ready it is called after retrieval, so --no-answer returns the cited evidence bundle alone and --fresh waits for changed sources to be indexed first. --token-budget defaults to 4000 and --limit to 12. Recall spans every indexed project until you narrow it with --project or --scope.

Deliberate memory

docmancer write "# Decision" --path decisions/example.md --scope project
docmancer read docmancer://memory/<id> --json
docmancer read --global about.md
docmancer edit docmancer://memory/<id> - --expected-hash <hash>
docmancer move docmancer://memory/<id> decisions/new-name.md --expected-hash <hash>
docmancer import ./notes

These commands target the project tree at ./.docmancer/tree by default; --global targets the machine-wide tree at ~/.docmancer/tree. Existing-file mutations require the current content hash. Import copies Markdown into the inbox and never rewrites the source.

Review and briefs

docmancer review --conflicts
docmancer review --orphans
docmancer review --duplicates
docmancer review --stale
docmancer brief --since 7d --dry-run
docmancer brief --scope project --focus "release process"

review surfaces contradictions, unconnected memory, duplicates, and stale or superseded records, and approves or rejects pending proposals. brief is a provider-backed summary of recent local sources; source text is redacted before any provider call, and --dry-run shows the selected sources and call plan first.

Agent integrations

docmancer agent install codex --hooks
docmancer agent install claude-code --hooks --capture-hooks
docmancer agent install claude-code --project
docmancer agent refresh
docmancer agent remove <agent> --hooks

Confirmed docmancer setup installs skills, managed instructions, recall, and capture for every detected agent. Recall and capture are still managed independently afterwards.

Agent backup and restore

docmancer backup --dry-run
docmancer backup --local --to ~/Backups/agents.dmbak
docmancer restore ~/Backups/agents.dmbak --dry-run
docmancer restore --source-device <device-id>
docmancer consolidate
docmancer consolidate --review <proposal-id>

Backup supports repeatable --agent, --project, and --exclude-project filters. Local archives are passphrase encrypted. When Personal Sync is connected, backup uses managed client-encrypted storage unless --local or --to is supplied. Restore refuses live Claude Code or Codex homes, requires explicit project mappings when needed, and quarantines divergent files.

Providers

docmancer providers list
docmancer providers key <provider>
docmancer providers set <provider> --model <model-id>
docmancer providers test <provider>

Credentials are stored in the operating-system keyring, never in YAML. Provider model discovery is cached and accepts custom model IDs.

Documentation

docmancer docs add <path-or-url>
docmancer docs query "question"
docmancer docs list
docmancer docs sync
docmancer docs remove <source>

Documentation is a separate Library corpus. It is never injected into personal memory automatically.

Retrieval profile

docmancer setup --profile local
docmancer setup --profile scale
docmancer qdrant up
docmancer qdrant status

local is the default zero-daemon stack. scale needs the embeddings-heavy extra and a reachable Qdrant; the qdrant group manages a Docmancer-owned process and refuses to touch foreign ones.

Local MCP

pipx install "docmancer[mcp]"
docmancer mcp install claude-code
docmancer mcp serve
docmancer mcp doctor

MCP is a second transport over the same local services, not a second memory store.

Cloud

docmancer cloud connect
docmancer cloud estimate
docmancer cloud rotate-key
docmancer cloud pause
docmancer cloud disconnect

Connect creates and checks a recovery kit and starts sync automatically. A second machine uses a four-word pairing code, with the recovery kit as the secure fallback. cloud estimate previews changed plaintext size, encrypted envelope size, final request bytes, batching, and plan limits without queueing or uploading anything. cloud pause stops transfer but retains the resumable identity. cloud disconnect revokes the device and removes its local Cloud credentials without touching local memory or billing. cloud status, cloud sync, and cloud devices remain available as diagnostic and advanced commands. The hosted service cannot read plaintext memory or execute local actions.

Legacy Context

docmancer context status
docmancer context refresh --dry-run
docmancer context show
docmancer context diff
docmancer context rollback <revision>
docmancer context adopt <topic>

Generated Context revisions predate Shared Memory and are kept for existing workflows, comparison, rollback, and adoption into curated memory. New work belongs in the Markdown tree.