getmnemo-cli
v0.2.0
Published
Official CLI for Mnemo — manage memories, workspaces, and integrations from your terminal.
Maintainers
Readme
getmnemo-cli
The official command-line interface for Mnemo — a verifiable, append-only memory layer for AI agents.
getmnemo lets you create, search, and manage memories from your terminal, plus drop a turnkey MCP config snippet into Claude Desktop or Cursor.
Install
npm install -g getmnemo-cliOr run without installing:
npx getmnemo-cli --helpQuickstart
getmnemo login # save API key + workspace to ~/.getmnemo/config.json
getmnemo add "Acme prefers blue branding" --container org:acme
getmnemo search "what brand color does Acme use?" --container org:acme
getmnemo doctor # verify auth + API reachability
addandsearchrequire a container (the tenant boundary, e.g.user:janeororg:acme). Pass--container <tag>, setGETMNEMO_CONTAINER, or adddefaultContainerTagto~/.getmnemo/config.json.
Commands
Authentication
| Command | Description |
| --- | --- |
| getmnemo login | Prompt for API key, workspace ID, and (optionally) API URL; persist to ~/.getmnemo/config.json. |
| getmnemo logout | Remove saved credentials. |
| getmnemo whoami | Print the active workspace + API URL. |
login flags: --api-key, --workspace-id, --api-url (skip the prompt).
Memory operations
| Command | Description |
| --- | --- |
| getmnemo add "<content>" --container <tag> [-m key=value ...] | Add a memory to a container with optional metadata. |
| getmnemo search "<query>" --container <tag> [--limit 5] | Semantic search within a container. |
| getmnemo get <id> | Fetch a single memory. |
| getmnemo rm <id> [--yes] | Delete a memory. |
| getmnemo list [--container <tag>] [--limit 20] [--cursor <c>] | Paginate the workspace (optionally filtered by container). |
--container / -C accepts a container tag (e.g. user:jane). It is required on add/search and an optional filter on list. Resolution order: --container flag → GETMNEMO_CONTAINER env → defaultContainerTag in config.
Workspaces
| Command | Description |
| --- | --- |
| getmnemo workspace list | List workspaces from local config. |
| getmnemo workspace switch <id> | Switch the active workspace. |
Other
| Command | Description |
| --- | --- |
| getmnemo mcp [--client claude\|cursor] | Print an MCP server config snippet. |
| getmnemo doctor | Check auth + GET /health. |
Global flags
--json— emit machine-readable JSON instead of pretty output. Honoured by every command.--version/-v--help/-h
Exit codes
| Code | Meaning |
| --- | --- |
| 0 | Success |
| 1 | Runtime error (auth missing, API failure, not found, ...) |
| 2 | Invalid arguments / unknown command |
Environment variables
| Variable | Purpose | Default |
| --- | --- | --- |
| GETMNEMO_API_KEY | Overrides the saved API key. | — |
| GETMNEMO_WORKSPACE_ID | Overrides the active workspace. | — |
| GETMNEMO_API_URL | Overrides the API base URL. | https://api.mnemohq.com |
| GETMNEMO_CONTAINER | Default container tag for add/search/list when no --container flag is given. | — |
Environment variables take precedence over ~/.getmnemo/config.json.
Examples
# add a tagged memory
getmnemo add "Customer asked about SOC 2 timeline" --container org:acme -m channel=email
# JSON output for piping into jq
getmnemo search "soc 2" --container org:acme --limit 3 --json | jq '.results[].memoryId'
# delete without prompting (CI-safe)
getmnemo rm mem_01HX... --yes
# generate Claude Desktop MCP config
getmnemo mcp --client claude > claude_desktop_config.jsonDevelopment
npm install
npm run dev -- --help # run from source via tsx
npm run build # compile to dist/
npm test # vitest