# MindMemOS CLI Guide
## 1. Overview `mindmemos` is the command-line tool shipped with the MindMemOS Python SDK (`mindmemos_sdk`). It lets you operate the memory service directly from the terminal: write and search memories, manage SDK-registered Skills, and inspect local configuration and connectivity. It is a thin wrapper over the SDK: every command reads the local config file (`~/.mindmemos/settings.json`) and calls the `mindmemos` service over HTTP, so you neither hand-craft requests nor repeat the service address on the command line. ## 2. Installation ```bash pip install mindmemos-sdk ``` Verify the command is available: ```bash mindmemos --help ``` The command is exposed as a global `mindmemos` executable via `project.scripts`. ## 3. Quick Start ### 3.1 Configure authentication Before first use, run `mindmemos auth` to configure the service address, API key, and default user: ```bash mindmemos auth ``` You will be prompted for three settings: | Setting | Local self-hosted service | Official cloud service | | :--- | :--- | :--- | | `Base URL` | `http://127.0.0.1:8000` | `https://mindmemos.cn` | | `API key` | An enabled key from `config/mindmemos/api_keys.yaml` | A key issued via the [website](https://mindmemos.cn) | | `User id` | A stable identifier, e.g. `u_123` | A stable identifier, e.g. `u_123` | Or pass them as flags to skip the prompts: ```bash mindmemos auth --base-url http://127.0.0.1:8000 --api-key dev-api-key-001 --user-id u_123 ``` The configuration is saved to `~/.mindmemos/settings.json`. The local service auto-determines `project_id` from the API key, so you do not need to specify it. ### 3.2 Inspect configuration and connectivity ```bash # Show current configuration (API key is masked by default) mindmemos config show # Show the full API key mindmemos config show --show-secret # Verify the config is valid and the service is reachable mindmemos doctor ``` ### 3.3 Add a memory ```bash mindmemos memory add --content "I like iced Americanos." ``` ### 3.4 Search memories ```bash mindmemos memory search "What kind of coffee does the user like?" --top-k 5 ``` > See the "Memory commands" section below for more parameters. The CLI only makes the call and displays results; extraction, scoring, and storage all happen on the server. ## 4. Command Overview ``` mindmemos ├── auth Configure API key, user, and service address interactively ├── config Show / reset local configuration │ ├── show │ └── reset ├── memory Memory operations │ ├── add Add a dialogue message as memory │ ├── search Search memories │ ├── get List / filter memories in the current project │ ├── update Update a memory's content │ ├── delete Delete a memory │ ├── feedback Submit explicit / implicit feedback │ └── dreaming Trigger the dreaming pipeline ├── skill Manage SDK-registered Skills │ ├── register Register and upload a local Skill │ ├── list List registered Skills │ ├── show Show a single Skill │ ├── evolve Trigger cloud Skill evolution │ ├── push Upload local changes as a new version │ ├── pull Pull version metadata (without changing files) │ ├── update Update one or all Skills │ ├── rollback Roll back to a specific version │ ├── history Show version history │ ├── diff Show version differences │ └── unregister Remove a Skill from management └── doctor Check SDK configuration and connectivity ``` Every command supports `--help` for full parameter details: ```bash mindmemos memory add --help ``` ## 5. Memory Commands (`mindmemos memory`) Memory commands use the credentials configured by `mindmemos auth` — no need to repeat them. ### 5.1 Add memory `add` The most common form passes a single message: ```bash mindmemos memory add --content "I like iced Americanos." ``` Specify a role (default `user`): ```bash mindmemos memory add --content "Remember this preference" --role system ``` Multi-turn messages can be passed as JSON, either inline or from a file (when provided, `--content` / `--role` are ignored): ```bash # Inline JSON mindmemos memory add --messages-json \ '[{"role":"user","content":"I like iced Americanos."},{"role":"assistant","content":"Got it."}]' # From a file mindmemos memory add --messages-json-file ./messages.json ``` Async mode (returns a `request_id` immediately, without waiting for extraction): ```bash mindmemos memory add --content "I like iced Americanos." --async ``` Other options: | Option | Description | | :--- | :--- | | `--user-id` | Override the configured default user | | `--app-id` / `--agent-id` / `--session-id` | Context identifiers for scoping / filtering | | `--metadata-json` | Business metadata (JSON object) | | `--skill-context-json` | Skill context array, overriding SDK auto-detection | | `--json` | Print the full result as machine-readable JSON | Example output: ```text Added 1 memory item(s): - [did] m_8f3a: I like iced Americanos. ``` ### 5.2 Search memories `search` ```bash mindmemos memory search "What kind of coffee does the user like?" --top-k 5 ``` Common options: | Option | Description | | :--- | :--- | | `--top-k` | Number of results, default `10` | | `--search-strategy` | Search strategy, `fast` (default) or `agentic` | | `--rerank` | Enable reranking | | `--score-threshold` | Rerank relevance threshold (0-1); only meaningful with `--rerank` | | `--filter` | Filter DSL (JSON object string) | | `--user-id` etc. | Override request context | | `--json` | Print the full result as JSON | ### 5.3 List and filter `get` List memories in the current project, optionally filtered: ```bash # List the 20 most recent mindmemos memory get --top-k 20 # Filter with a filter DSL mindmemos memory get --filter '{"field":"value"}' ``` ### 5.4 Update and delete ```bash # Update a memory's content mindmemos memory update