Skip to content

CLI reference ​

Derived from sodamem_cli/main.py and sodamem_cli/targets.py.

sodamem <command> [options]
commandwhat it does
clientslist the coding tools install supports
installwrite a client's MCP (and hook) configuration
daemonthe single store-owning service
hookcalled by a coding tool's hooks; reads its event on stdin

Service flags ​

Accepted by install, daemon and hook:

flagdefault
--api-url$SODAMEM_API_URL, else http://127.0.0.1:8000
--api-key$SODAMEM_API_KEY

clients ​

bash
sodamem clients

Prints every install target with its config path and whether it also gets hooks.

targetscopeconfig file
claude-codeproject.mcp.json (+ .claude/settings.json hooks)
claude-desktopuserLibrary/Application Support/Claude/claude_desktop_config.json (macOS)
cursoruser.cursor/mcp.json (+ ~/.cursor/hooks.json)
cursor-projectproject.cursor/mcp.json
vscodeproject.vscode/mcp.json
windsurfuser.codeium/windsurf/mcp_config.json
zeduser.config/zed/settings.json
codexuser.codex/config.toml (+ ~/.codex/hooks.json)
codex-projectproject.codex/config.toml — Codex loads project config only for trusted projects
copilot-cliuser.copilot/mcp-config.json (+ ~/.copilot/hooks/sodamem.json)
opencodeuser.config/opencode/opencode.json

Config keys differ on purpose

VS Code reads servers, Codex reads mcp_servers, Zed reads context_servers and nests the command. Using the wrong key means the client ignores the file with no error at all, which is why install exists.

install ​

bash
sodamem install claude-code
sodamem install cursor vscode zed          # several at once
sodamem install claude-code --dry-run      # print what would change
flagmeaning
clientsone or more target names (positional, at least one)
--user-idmemory owner (default: your OS username)
--project-idrepo scope (default: derived from the git root)
--no-projectdo not scope this client to a project
--local-store PATHhave this client open the stores itself instead of using the service
--no-hooksMCP tools only — skip automatic recall/retain
--dry-runprint what would be written, write nothing
--root PATHrepo root for project-scoped configs (default: the git root above the cwd)

Existing configuration is merged, not replaced: other MCP servers, other settings and hand-written TOML comments survive. The first write of any file leaves a .sodamem-backup beside it.

--local-store with more than one client

Per-user stores are SQLite without WAL — exactly one process may open them. A second client pointed at the same local store refuses to start rather than corrupting the first one's data. Use the service instead.

daemon ​

bash
sodamem daemon ensure     # start one if none is answering (idempotent)
sodamem daemon status     # what is actually answering
sodamem daemon stop       # stop the one this machine started
flagapplies todefault
--data-rootensure~/.sodamem/data

ensure reports missing extraction credentials up front rather than accepting every write and failing the job afterwards — recall works without them, retain does not.

hook ​

bash
sodamem hook recall --client claude-code
sodamem hook retain --client copilot-cli

You do not normally run this yourself; install wires it into the client's hook configuration. It reads the client's event on stdin.

argumentvalues
actionrecall | retain
--clientclaude-code, copilot-cli, cursor, codex, generic
--user-id, --project-idoverride the scope

Clients disagree about payload shape, and the differences are real: Copilot CLI uses camelCase keys and injects additionalContext; Cursor's sessionStart carries no cwd and no prompt, and cannot retain. hook normalizes them.

Next ​

Apache-2.0 licensed.