Skip to content

CLI Reference ​

Lifecycle ​

CommandDescription
abmind installFirst-time setup of ~/.abmind (creates dirs, DB, templates). --force re-seeds missing config.
abmind update --dev [<DIR>]Install a new abmind build. --dev pulls the repo into ~/.abmind/src/abmind (or builds <DIR> as-is); --alpha/--stable acquire and activate the latest release from npm.
abmind doctor [--fix]Health check — permissions, standalone layout, key, templates, logs, DB, FTS, WAL, embeddings, sleep, backup. --fix auto-corrects what it can.
abmind statusShow lifecycle status (home, version, release, commit)
abmind deps [list|install|update]Manage native deps (better-sqlite3, sqlite-vec) shared with abtars
abmind start|stop|restartStart/stop/restart the abmind daemon as a native user service. Linux: systemd --user abmind-daemon.service. macOS: LaunchAgent.

See service.md for the daemon service guide.

Memory Operations ​

CommandDescription
abmind recall --profile recall_normal --text "anchor" [--keywords "a,b"]Recalled evidence packet (owner text + source-safe refs); recall_fast takes a verbatim --raw-turn
abmind store --translated <text>Store a new extracted memory
abmind expand --ids <id1,id2,...>Look up source messages by ID
abmind messagesRead back raw conversation messages (read-only)
abmind wake-up [--max-chars N]Print current wake-up context (core identity + recent state)
abmind bundlePrint full session bundle (SOUL + profile + notes + memory tools)
abmind retro-extractExtract facts from retrospective/consolidation files
abmind migrate-openclaw <dir-or-file>Import OpenClaw session transcripts (.jsonl format)
abmind operational <subcommand>Operational memory: draft, recall, promote, reject, revise, retire, history

operational subcommands ​

SubcommandDescription
draft submit --lesson <text> --scope-level <level>Submit a new operational lesson draft. Scope levels: global, platform, host, workspace, repository, task_environment
draft listList drafts (optionally by status)
recall [--query <text>] [--limit <n>]Search active operational memories by scope and/or content
promotePromote a draft to active operational memory
rejectReject a draft
reviseRevise an active operational memory
retireRetire an active operational memory
historyShow version history for a memory

Use --json for machine-readable output.

Sleep ​

CommandDescription
abmind sleep --level <level>Run a sleep cycle. Levels: basic, budget, normal, ultimate
abmind sleep-stateShow sleep candidates as JSON (what would be processed)
abmind sleep-reportGenerate dream report (summary of last sleep)

Sleep flags ​

FlagEffect
--level <l>Depth: basic (fast, minimal), budget (light), normal (standard), ultimate (thorough)
--dry-runGather state + build prompts, print to stdout, skip LLM calls
--verboseDetailed logging at each step
--forceRun housekeeping even if no new messages since last sleep
--resumeResume an interrupted sleep cycle

Secrets ​

CommandDescription
abmind list-secretsShow SECRET (class 3) memory metadata — no content, no decryption
abmind rekey --old-key <path>Re-encrypt sealed durables with a new key

Backup & Restore ​

CommandDescription
abmind backup [--database|--config] [--output <path>]Create encrypted backup (format v2, includes metadata). Default is full zip of ~/.abmind/ (excl. secret/) + encrypted .abm; --database is DB-only; --config zips secret/ + config/.
abmind restore <file.abm|file.zip>Restore from encrypted backup
abmind passwd [--secrets-dir <path>]Change encryption passphrase. Re-encrypts DB secrets + file secrets.

Restore flags ​

FlagEffect
<file>Path to .abm (encrypted DB) or .zip (full backup)
--mode merge|replacemerge (default, skip existing) or replace (wipe + restore)
--passphrase <p>Decryption passphrase (if key file doesn't match)
--username <name>Name used as encryption salt (for old backups created with OS USER as salt)

passwd ​

bash
abmind passwd                          # interactive (prompts for username, old + new passphrase)
abmind passwd --secrets-dir ~/custom   # re-encrypt file secrets from a non-default directory

Re-encrypts both DB secrets (classification=3 memories) and file-based secrets (ENC: prefixed files). --secrets-dir defaults to ~/.abtars/secret (or $ABTARS_HOME/secret).

See backup.md for full options and examples.

Personal lifecycle ​

Owner operations on durable knowledge (all require --user-id unless acting as the primary owner):

ActionEffect
abmind personal --action statusLifecycle state for an owner
abmind personal --action inspect --layer durable|episode|raw --id <id>Inspect one record with its evidence
abmind personal --action explain --profile <p> --query "<q>" --layer <l> --id <id>Explain why a record was (or was not) served
abmind personal --action recall --profile <p> --query "<q>"Run the owned recall pipeline directly
abmind personal --action belief --scope '{...}'Show the belief state for a scope
abmind personal --action correct --durable-id <id> --expected-revision <n> --evidence-message-ids <a,b> [...]Correct a durable (instead of editing: the fix carries evidence and a revision gate)
abmind personal --action scope --durable-id <id> --expected-revision <n> --scope '{...}' --evidence-message-ids <a,b>Re-scope a durable
abmind personal --action forget --durable-id <id> | --episode-id <id> | --message-ids <a,b>Forget through the reviewed mechanism
abmind personal --action projection-build --backup <file>Rebuild the recall projection behind a verified backup

Run abmind personal --help for the full flag list. Direct editing of stored memories is retired; corrections go through correct/scope with evidence and revision gates.

MCP Server ​

bash
abmind mcp [--local <socket> | --remote <profile>] [--principal <id>] [--instance-id <id>]

Starts an MCP (Model Context Protocol) adapter on stdio over one configured abmind owner. Exposes tools:

  • memory_recall — deliberate keyword recall (1-50 terms)
  • memory_store — store a fact/preference/decision/event (needs an operationId)
  • memory_status — runtime status plus connection mode (remote adds outbox counts)
  • memory_context — owner-composed model context, primary owner only

Every tool returns a versioned {version: 1, ok, result|error} envelope. Writes carry a caller-chosen operationId (1-128 chars): repeating the same operationId with the same payload converges; changed input conflicts. memory_wakeup/memory_bundle are retired; use memory_context.

Works with any MCP client (Cursor, Windsurf, Continue, Zed, etc.).

Hooks (Host Integration) ​

Used by Kiro CLI, Claude Code, and Gemini CLI for automatic memory integration:

CommandHook pointDescription
abmind hook-wakeupSession start (agentSpawn)Inject wake-up context into new session
abmind hook-recallBefore prompt (userPromptSubmit)Recall relevant memories for the current message
abmind hook-storeSession end (stop)Record the conversation turn
abmind hook-preToolUseBefore tool executionSecurity gate — blocks direct DB writes
abmind hook-postToolUseAfter tool executionCaptures tool context for memory extraction
abmind hook-doctorManualDiagnose hook config, errors, active sidecars

Install-only helpers ​

CommandDescription
abmind install-standalone --stable|--alpha|--dev [DIR]Install standalone (used by the bootstrap script)
abmind install-host <claude|gemini|codex> [--uninstall]Install abmind hooks/MCP into a host CLI. Note: Kiro is not supported here — copy agents/abmind.json manually.

Global flags ​

These work with any subcommand:

FlagEffect
--helpShow usage for the subcommand

Environment ​

All commands respect ABMIND_HOME (default: ~/.abmind). See configuration.md for the full env var reference.

Exit codes ​

CodeMeaning
0Success
1Error (message printed to stderr)