CLI
The memoturn CLI is a thin wrapper over the SDK for terminal-driven workflows. Best at:
- One-shot recording from shell scripts (
memoturn record "...") - Wrapping a subprocess and streaming stdout/stderr as turns (
memoturn observe -- claude-code) - Quick search from the terminal (
memoturn search "..." --mode summaries)
Install
Section titled “Install”pnpm add -g @memoturn/climemoturn --versionConfigure
Section titled “Configure”memoturn initInteractive setup. Stores api key, default project, and email at ~/.memoturn/config.json. Override per-invocation with --api-key, --project, --email, --base-url.
Commands
Section titled “Commands”memoturn record <text...>
Section titled “memoturn record <text...>”One-shot record_turn (role=event).
memoturn record "deploying the worker tonight"memoturn record --session sprint-42 "kicked off staging deploy"memoturn observe -- <cmd...>
Section titled “memoturn observe -- <cmd...>”Wrap a subprocess. Each chunk of stdout becomes a turn (role=assistant); stderr is recorded too unless --no-stderr. Use --session to scope all the turns under one session id, --flush-ms to control the buffer flush cadence (default 400 ms).
memoturn observe --session debug-incident -- python train.pymemoturn observe -- claude-codememoturn search <query...>
Section titled “memoturn search <query...>”Hybrid search from the terminal. --mode matches the SDK modes; --limit caps results.
memoturn search "hyperdrive connection limit"memoturn search "parseUser" --mode entitiesmemoturn search "what did we figure out about auth" --mode summaries --limit 3Output is one hit per line: score [mode d=<dense_rank> l=<lexical_rank>] <content>.
memoturn link <project>
Section titled “memoturn link <project>”Set the default project slug for subsequent calls.
memoturn login
Section titled “memoturn login”Store an api key for the current user, so later commands need no --api-key.
memoturn connect [tool...]
Section titled “memoturn connect [tool...]”Wire local agent configs at Memoturn’s MCP endpoint. Detects Claude Code,
Cursor, VS Code, and Codex, then merges a memoturn entry into whichever of
their configs already exist. Naming tools limits it to those.
memoturn connect # every detected toolmemoturn connect cursor codex # just these twomemoturn connect --dry-run # print the plan, write nothingmemoturn connect --check # exit non-zero if anything is unwiredmemoturn connect hooks [ids] adds presence heartbeat entries to the Cursor,
Claude Code, and Codex hook configs.
memoturn whoami
Section titled “memoturn whoami”Print the resolved config (api key masked).
Environment overrides
Section titled “Environment overrides”Every flag has a MEMOTURN_* env-var equivalent: MEMOTURN_API_KEY, MEMOTURN_PROJECT, MEMOTURN_USER_EMAIL, MEMOTURN_BASE_URL. Useful for CI and ephemeral shells.