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 run <task>
Run a coding task end to end. Memcode reads up on your project, then does the work, reading, searching, running commands, and editing files, asking first before anything risky.
| 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 project context. 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> | Show everything memcode knows about 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. |
Websites
AI-built static sites hosted at memcode.ai, managed by slug. For the full guide (building, publishing, custom domains, assets, working locally), see Websites.
| Command | What it does |
|---|---|
memcode websites list | Your org's sites and their status, plus sites only on this machine. --json for machine-readable output. |
memcode websites init <name> | Make a site on this machine only, in ~/.memcode/websites/<name>. Nothing is created online until you push. |
memcode websites create [name] | Create a site on memcode.ai. --prompt also queues a build there (internal preview); the site is created either way. |
memcode websites get <slug> | Show one site's detail: status, model, URL, publish state. |
memcode websites build <slug> | Queue a hosted build (internal preview). --prompt, --model. |
memcode websites builds <slug> | List a site's build history. |
memcode websites pull <slug> | Clone a site's repo into ./<slug>. Only sites that have been built have a repo. |
memcode websites push [name|dir] | Upload local changes and rebuild the draft (internal preview). The first push of a local site creates it on memcode.ai. |
memcode websites dev [name|dir] | Run the site's real Vite dev server locally (full HMR). --no-open skips opening the browser. |
memcode websites zip [name|dir] | Save a shareable .zip of the site's source, without node_modules or build output. -o sets the file. |
memcode websites publish [name|dir] | Promote the draft preview to the live site. |
memcode websites unpublish [name|dir] | Take the live site offline. |
memcode websites update <slug> | Rename the site or change its model. |
memcode websites open <slug> | Open the live site, or --preview the draft. |
memcode websites share <name|slug> | Make a short link anyone can use to view the preview for 7 days. --days, --list, --off <link>. |
memcode websites delete <slug> | Delete a site. Requires --yes off a TTY. |
memcode websites assets list|upload|delete | Manage the site's durable uploads, served at /assets/<name> and untouched by rebuilds. |
After pull, run memcode inside the directory to iterate on the site with
the same constrained website agent the hosted builder uses — the pulled repo
carries the same MEMCODE.md + .memcode/ doctrine.
Building is in limited internal preview: build, push, and create --prompt's build only work for internal accounts for now. Other accounts can
create, manage, publish, and add assets to sites, but get an error saying
building isn't available yet.
Advanced and diagnostic
Hidden from help but available: memcode todos, memcode acceptance, memcode eval, and memcode bench memory.