CLI Reference
Lifecycle
| Command | Description |
|---|---|
abmind install | First-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 status | Show lifecycle status (home, version, release, commit) |
abmind deps [list|install|update] | Manage native deps (better-sqlite3, sqlite-vec) shared with abtars |
abmind start|stop|restart | Start/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
| Command | Description |
|---|---|
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 messages | Read back raw conversation messages (read-only) |
abmind wake-up [--max-chars N] | Print current wake-up context (core identity + recent state) |
abmind bundle | Print full session bundle (SOUL + profile + notes + memory tools) |
abmind retro-extract | Extract 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
| Subcommand | Description |
|---|---|
draft submit --lesson <text> --scope-level <level> | Submit a new operational lesson draft. Scope levels: global, platform, host, workspace, repository, task_environment |
draft list | List drafts (optionally by status) |
recall [--query <text>] [--limit <n>] | Search active operational memories by scope and/or content |
promote | Promote a draft to active operational memory |
reject | Reject a draft |
revise | Revise an active operational memory |
retire | Retire an active operational memory |
history | Show version history for a memory |
Use --json for machine-readable output.
Sleep
| Command | Description |
|---|---|
abmind sleep --level <level> | Run a sleep cycle. Levels: basic, budget, normal, ultimate |
abmind sleep-state | Show sleep candidates as JSON (what would be processed) |
abmind sleep-report | Generate dream report (summary of last sleep) |
Sleep flags
| Flag | Effect |
|---|---|
--level <l> | Depth: basic (fast, minimal), budget (light), normal (standard), ultimate (thorough) |
--dry-run | Gather state + build prompts, print to stdout, skip LLM calls |
--verbose | Detailed logging at each step |
--force | Run housekeeping even if no new messages since last sleep |
--resume | Resume an interrupted sleep cycle |
Secrets
| Command | Description |
|---|---|
abmind list-secrets | Show SECRET (class 3) memory metadata — no content, no decryption |
abmind rekey --old-key <path> | Re-encrypt sealed durables with a new key |
Backup & Restore
| Command | Description |
|---|---|
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
| Flag | Effect |
|---|---|
<file> | Path to .abm (encrypted DB) or .zip (full backup) |
--mode merge|replace | merge (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
abmind passwd # interactive (prompts for username, old + new passphrase)
abmind passwd --secrets-dir ~/custom # re-encrypt file secrets from a non-default directoryRe-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):
| Action | Effect |
|---|---|
abmind personal --action status | Lifecycle 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
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:
| Command | Hook point | Description |
|---|---|---|
abmind hook-wakeup | Session start (agentSpawn) | Inject wake-up context into new session |
abmind hook-recall | Before prompt (userPromptSubmit) | Recall relevant memories for the current message |
abmind hook-store | Session end (stop) | Record the conversation turn |
abmind hook-preToolUse | Before tool execution | Security gate — blocks direct DB writes |
abmind hook-postToolUse | After tool execution | Captures tool context for memory extraction |
abmind hook-doctor | Manual | Diagnose hook config, errors, active sidecars |
Install-only helpers
| Command | Description |
|---|---|
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:
| Flag | Effect |
|---|---|
--help | Show usage for the subcommand |
Environment
All commands respect ABMIND_HOME (default: ~/.abmind). See configuration.md for the full env var reference.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (message printed to stderr) |