memcode docs
Code

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.

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 project context. 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>Show everything memcode knows about 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.

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.

CommandWhat it does
memcode websites listYour 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|deleteManage 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.

On this page