memcode docs
CLI

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.

FlagEffect
--askPrompt before risky actions. This is the default.
--autoRun safe and medium-risk actions automatically.
--allow-allRun everything except catastrophic commands.
--backgroundDetach as a tracked job. Forces auto mode and cannot be combined with resume.
-c, --continueResume the most recent session with full history.
--resume <id>Resume a session by id or prefix.
--no-contextSkip the context pack. Used for A/B comparison.
--chromeEnable the visible-Chrome browser tools.
--protocol stream-jsonNewline-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

CommandWhat it does
memcode overviewA synthesized current-state overview of the project.
memcode nextRecommend 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 archShow stored architecture diagrams. No model call.
memcode stackDetect languages and tech stack.
memcode explore <question>Investigate with many parallel read-only agents, then synthesize.

Setup, auth, and health

CommandWhat it does
memcode authChoose how memcode signs in, with an interactive picker.
memcode auth use <source>Use a subscription you have: claude, codex, or copilot.
memcode auth statusShow how memcode is currently signed in.
memcode loginSign this machine in to a hosted account.
memcode logoutSign this machine out of a hosted account.
memcode initCreate .memcode and build the project topology. Runs automatically on first use. Use --force to rebuild.
memcode indexRefresh the deterministic model of the codebase.
memcode doctorReport the repo root, state path, branch, and backend health.
memcode versionPrint the version. Same as --version.
memcode upgradeUpdate the binary. Use --check to only report. Alias update.

Memory and knowledge

CommandWhat it does
memcode learnReconcile instructions, docs, and evidence into adjudicated claims.
memcode claimsInspect adjudicated claims. Subcommands list and conflicts.
memcode objectiveHuman-authored goals. Subcommands add, list, current, status.
memcode sourcesList the instruction, memory, and doc sources found.
memcode sessionInspect recorded sessions. Subcommands recent, show, recap, search, commits, sidequests.
memcode recapSummarize recent work.
memcode producersShow who or what produced recent work, human or AI.
memcode syncWrite project memory to editor context files such as CLAUDE.md and AGENTS.md. --auto for quiet commit-hook use.

MCP

CommandWhat it does
memcode mcp listList 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 serveTurn memcode into an MCP server that exposes this project's memory.

See MCP for the full picture.

Jobs and delegation

CommandWhat it does
memcode jobsManage detached background agent jobs. Subcommands list, logs, stop.
memcode capabilitiesList 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.

On this page