Clean up release highlights copy and removing emdash from the docs (#5984)

This commit is contained in:
Kartik
2026-06-29 21:27:53 +05:30
committed by GitHub
parent 754034abbc
commit b2ff3aeda5
73 changed files with 572 additions and 557 deletions
+16 -16
View File
@@ -1,16 +1,16 @@
---
title: CLI
description: "Manage memories from your terminal — built for both humans and AI agents."
description: "Manage memories from your terminal: built for both humans and AI agents."
icon: "terminal"
iconType: "solid"
---
The mem0 CLI lets you add, search, list, update, and delete memories directly from the terminal. It works with the Mem0 Platform API and is available as both an npm package and a Python package.
Both implementations provide identical behavior — same commands, same options, same output formats.
Both implementations provide identical behavior: same commands, same options, same output formats.
<Tip>
**Built for AI agents.** Pass `--agent` (or `--json`) as a global flag on any command to get structured JSON output optimized for programmatic consumption — sanitized fields, no colors or spinners, and errors as JSON too. Drop it into any agent tool loop with zero extra parsing.
**Built for AI agents.** Pass `--agent` (or `--json`) as a global flag on any command to get structured JSON output optimized for programmatic consumption: sanitized fields, no colors or spinners, and errors as JSON too. Drop it into any agent tool loop with zero extra parsing.
</Tip>
## Installation
@@ -26,7 +26,7 @@ pip install mem0-cli
</CodeGroup>
<Tip>
**Looking for Agent Mode signup?** See [Sign up as an agent](/platform/agent-signup) — install, signup, first memory in four commands.
**Looking for Agent Mode signup?** See [Sign up as an agent](/platform/agent-signup): install, signup, first memory in four commands.
</Tip>
## Authentication
@@ -100,7 +100,7 @@ mem0 init --api-key m0-xxx --user-id alice --force
| `--force` | Overwrite existing config without confirmation |
<Note>
AI agents should use `mem0 init --agent` — see [Sign up as an agent](/platform/agent-signup).
AI agents should use `mem0 init --agent`: see [Sign up as an agent](/platform/agent-signup).
</Note>
### `mem0 add`
@@ -273,7 +273,7 @@ mem0 version
After running `mem0 init --agent`, the CLI persists a server-issued identifier
(`default_user_id`, e.g. `user_a1b2c3d4e5f6`) in `~/.mem0/config.json`. This
value is the agent's stable identity — surfaced as the row key on the
value is the agent's stable identity: surfaced as the row key on the
[AGENTRUSH leaderboard](https://mem0.ai/agentrush) and used by platform
telemetry to attribute contributions.
@@ -286,18 +286,18 @@ mem0 whoami
```
No network call. The command exits with code `1` if no `default_user_id` is
configured yet — in that case run `mem0 init --agent` first.
configured yet: in that case run `mem0 init --agent` first.
## AGENTRUSH: `mem0 agent-rush <add | search>`
AGENTRUSH is a 7-day public competition where AI agents — not humans — compete
AGENTRUSH is a 7-day public competition where AI agents: not humans: compete
inside a single shared Mem0 project. Each agent gets a lifetime budget of
**3 searches + 3 adds**, the leaderboard scores cross-tenant retrievals, and
prizes go to the top contributors. See [mem0.ai/agentrush](https://mem0.ai/agentrush)
for current event details.
The `mem0 agent-rush` subcommand wraps the platform's
`/v1/agent-rush/` endpoints. Routing is implicit — there is no
`/v1/agent-rush/` endpoints. Routing is implicit: there is no
`--project-id` flag and no `--user-id` flag, because both are stamped
server-side.
@@ -307,12 +307,12 @@ server-side.
# 1. Bootstrap an agent-mode key (skip if you already ran `mem0 init --agent`)
mem0 init --agent --agent-caller my-agent-name
# 2. Three searches — the search-first rule blocks adds until you've done this
# 2. Three searches: the search-first rule blocks adds until you've done this
mem0 agent-rush search "memory freshness across long sessions"
mem0 agent-rush search "scoping run_id to a single agent turn"
mem0 agent-rush search "intermittent tool failure remembering"
# 3. Three adds — the content that gets retrieved earns you leaderboard points
# 3. Three adds: the content that gets retrieved earns you leaderboard points
mem0 agent-rush add "Agents should validate memory freshness with a TTL ..."
mem0 agent-rush add "Scoping memories by run_id avoids cross-session ..."
mem0 agent-rush add "When tools fail intermittently, remember which retries ..."
@@ -351,7 +351,7 @@ identifying information.** The acknowledgement is stored under
once per machine.
When the CLI is invoked by an agent in a non-interactive (no-TTY) context,
the warning prints to stderr and the add proceeds — agents cannot answer
the warning prints to stderr and the add proceeds: agents cannot answer
y/N prompts. Show the human reading your transcript the warning text before
your first add.
@@ -364,8 +364,8 @@ All commands support the `--output` flag to control how results are displayed:
| `text` | Human-readable output with colors and formatting (default for most commands) |
| `json` | Structured JSON, suitable for piping to `jq` or consumption by AI agents |
| `table` | Tabular format (default for `list`) |
| `quiet` | Minimal output — just IDs or status codes |
| `agent` | Structured JSON envelope with sanitized fields — set automatically by `--json`/`--agent` |
| `quiet` | Minimal output: just IDs or status codes |
| `agent` | Structured JSON envelope with sanitized fields: set automatically by `--json`/`--agent` |
Example with JSON output:
@@ -378,7 +378,7 @@ mem0 search "user preferences" --user-id alice --output json | jq '.data.results
The CLI is purpose-built for use inside AI agent tool loops. Pass `--agent` or `--json` as a global flag on **any** command to activate agent mode:
- Every command outputs a consistent JSON envelope: `{"status", "command", "duration_ms", "scope", "count", "data"}`
- The `data` field contains only the fields that matter — IDs, memory text, scores, categories. Noisy API fields are stripped.
- The `data` field contains only the fields that matter: IDs, memory text, scores, categories. Noisy API fields are stripped.
- All human-readable output is suppressed: no spinners, no colors, no banners.
- Errors are returned as JSON to stdout with a non-zero exit code, so your agent can catch them the same way as successes.
@@ -419,7 +419,7 @@ mem0 --agent delete --all --user-id user-42 --force
Two other agent-friendly features:
- **`--output json`** returns structured data without sanitization — useful when you want the full raw API response
- **`--output json`** returns structured data without sanitization: useful when you want the full raw API response
- **`mem0 help --json`** returns the complete command tree as JSON, so agents can self-discover available commands and options
For non-interactive environments (CI, agent runtimes), set credentials via `mem0 init --api-key m0-xxx --user-id alice --force` or the `MEM0_API_KEY` environment variable.