docs/public/installation.mdx
Grok mem — Grok Mem is how Grok Bots remember. Sits next to Grok's own memory. Does not replace it.
Grok Bot has no host hooks. Install it independently of Cursor or Claude Code. Default is CMEM Pro, the hosted memory:
npx claude-mem install --ide grok-bot
Local host-login observer is opt-in: --provider host. --ide is a single string — a second host is a second install command. Installing this plugin does not install Cursor. See Grok Bot Integration.
Install and configure Claude-Mem with a single command:
npx claude-mem install
The interactive installer runs in three stages — runtime first, sign in second, then pick your memory provider:
--provider claude (that path never talks to cmem.ai). The CLI does not ask for an email. It starts an OAuth pairing (POST https://cmem.ai/api/installer/oauth/start), prints a device code XXXX-XXXX, opens authorization_url in your browser, and polls until you are authenticated. No card required.ready, writes ~/.claude-mem/settings.json, and restarts the worker. Other choices: personal OpenRouter, Gemini, Anthropic plan, or --provider host (local loopback observer).Headless or already signed in? See CMEM Pro (manual / headless) for the exact settings the installer writes.
https://cmem.ai/api/inference/v1 with model cmem-observer. Free trial, then subscribe or fall back. Fallback is event-driven (CLAUDE_MEM_PRO_FALLBACK_AT after a terminal gateway quota/key error), not the trial end date. See CMEM Pro (manual / headless).https://openrouter.ai/api/v1). Never send a personal sk-or- key to the cmem.ai inference gateway.--provider claude) — memory shares your Claude plan usage. Skips cmem.ai entirely. Prompts for the Claude model used to compress observations (Haiku / Sonnet / Opus).--provider host uses the already-logged-in agent over a local loopback. No API key. See Grok Bot Integration.--provider claude never touches cmem.ai and skips OAuth. You can finish a CMEM Pro pairing anytime by re-running npx claude-mem install, or by writing settings by hand (manual / headless).
Install Claude-Mem directly from the plugin marketplace inside Claude Code:
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
Both methods will automatically configure hooks and start the worker service. Start a new Claude Code session and you'll see context from previous sessions automatically loaded.
Important: Claude-Mem is published on npm, but running
npm install -g claude-meminstalls the SDK/library only. It does not register plugin hooks or start the worker service. Always install vianpx claude-mem installor the/plugincommands above.
npx claude-mem install if missing)bun:sqliteFor development or testing, you can clone and build from source:
# Clone the repository
git clone https://github.com/thedotmack/claude-mem.git
cd claude-mem
# Install dependencies
npm install
# Build hooks and worker service
npm run build
# Worker service will auto-start on first Claude Code session
# Or manually start with:
npm run worker:start
# Verify worker is running
npm run worker:status
Dependencies are installed automatically by npx claude-mem install and npx claude-mem repair. Heavy lifting (Bun + uv install, bun install inside the plugin cache) happens behind a visible installer spinner. The Setup hook only performs a sub-100ms version-check.js read of the .install-version marker — on mismatch it prints run: npx claude-mem repair to stderr and exits 0, so it never blocks a session. Works cross-platform on Windows, macOS, and Linux.
Check that hooks are configured in Claude Code:
cat plugin/hooks/hooks.json
Data is stored in ~/.claude-mem/:
~/.claude-mem/claude-mem.db~/.claude-mem/.worker.pid~/.claude-mem/.worker.port~/.claude-mem/logs/worker-YYYY-MM-DD.log~/.claude-mem/settings.jsonOverride with environment variable:
export CLAUDE_MEM_DATA_DIR=/custom/path
npm run worker:logs
npm run test:context
curl -s "http://127.0.0.1:${CLAUDE_MEM_WORKER_PORT}/api/health"
curl -s "http://127.0.0.1:${CLAUDE_MEM_WORKER_PORT}/api/sync/status"
See CMEM Pro (manual / headless).
Upgrades are automatic when updating via the plugin marketplace. After an external upgrade (for example claude plugin update), the Setup hook detects a version-marker mismatch and asks you to run npx claude-mem repair, which installs any missing runtime dependencies and refreshes the marker.
See CHANGELOG for complete version history.