Command reference
Every memcode command, what it does, and its main flags.
Running memcode with no arguments starts an interactive session in the current repository. Everything below is also available as an explicit subcommand.
memcode --help shows the everyday commands. Some diagnostic and power-user
commands are hidden from help but still run if you type them. They are noted as
advanced at the end.
Running tasks
memcode agent <task>
Run an agentic coding task end to end. memcode orients with a context pack, calls the model, and executes read, search, shell, and edit tool calls under the permission policy.
| Flag | Effect |
|---|---|
--ask | Prompt before risky actions. This is the default. |
--auto | Run safe and medium-risk actions automatically. |
--allow-all | Run everything except catastrophic commands. |
--background | Detach as a tracked job. Forces auto mode and cannot be combined with resume. |
-c, --continue | Resume the most recent session with full history. |
--resume <id> | Resume a session by id or prefix. |
--no-context | Skip the context pack. Used for A/B comparison. |
--chrome | Enable the visible-Chrome browser tools. |
--protocol stream-json | Newline-delimited JSON on stdio, for automation wrappers. |
With no task and piped stdin, the task is read from stdin. With no task and a terminal, it opens an interactive session.
memcode plan <task>
Research the repo read-only and print a step-by-step proposal. It makes no changes. Good for scoping a change before you commit to it. See Plan mode.
Understanding a codebase
| Command | What it does |
|---|---|
memcode overview | A synthesized current-state overview of the project. |
memcode next | Recommend the highest-value next move. |
memcode recall <question> | Find where something was decided or documented. |
memcode why <path> | Explain why something exists. |
memcode context <path> | Compile a structured context pack for a file, directory, or task. |
memcode map [subsystem] | Show the deterministic repo topology. No model call. |
memcode arch | Show stored architecture diagrams. No model call. |
memcode stack | Detect languages and tech stack. |
memcode explore <question> | Investigate with many parallel read-only agents, then synthesize. |
Setup, auth, and health
| Command | What it does |
|---|---|
memcode auth | Choose how memcode signs in, with an interactive picker. |
memcode auth use <source> | Use a subscription you have: claude, codex, or copilot. |
memcode auth status | Show how memcode is currently signed in. |
memcode login | Sign this machine in to a hosted account. |
memcode logout | Sign this machine out of a hosted account. |
memcode init | Create .memcode and build the project topology. Runs automatically on first use. Use --force to rebuild. |
memcode index | Refresh the deterministic model of the codebase. |
memcode doctor | Report the repo root, state path, branch, and backend health. |
memcode version | Print the version. Same as --version. |
memcode upgrade | Update the binary. Use --check to only report. Alias update. |
Memory and knowledge
| Command | What it does |
|---|---|
memcode learn | Reconcile instructions, docs, and evidence into adjudicated claims. |
memcode claims | Inspect adjudicated claims. Subcommands list and conflicts. |
memcode objective | Human-authored goals. Subcommands add, list, current, status. |
memcode sources | List the instruction, memory, and doc sources found. |
memcode session | Inspect recorded sessions. Subcommands recent, show, recap, search, commits, sidequests. |
memcode recap | Summarize recent work. |
memcode producers | Show who or what produced recent work, human or AI. |
memcode sync | Write project memory to editor context files such as CLAUDE.md and AGENTS.md. --auto for quiet commit-hook use. |
MCP
| Command | What it does |
|---|---|
memcode mcp list | List configured MCP servers. |
memcode mcp get <name> | Show one server's config and status. |
memcode mcp add … | Add a server. Flags include --transport, --scope, --env, --header, --timeout. Use -- <cmd> for stdio. |
memcode mcp add-json <name> <json> | Add a server from a JSON blob. |
memcode mcp remove <name> | Remove a server. |
memcode mcp approve <name> | Approve a project-scoped server. |
memcode mcp reject <name> | Reject a project-scoped server. |
memcode mcp serve | Turn memcode into an MCP server that exposes this project's memory. |
See MCP for the full picture.
Jobs and delegation
| Command | What it does |
|---|---|
memcode jobs | Manage detached background agent jobs. Subcommands list, logs, stop. |
memcode capabilities | List optional local capabilities and status. Alias caps. |
memcode approve <pattern> | Manage remembered command allow-rules. Subcommands list and revoke. |
Advanced and diagnostic
Hidden from help but available: memcode todos, memcode script, memcode acceptance, memcode prefs, memcode eval, memcode bench memory, memcode websites, and memcode predict.