docs/public/installation.mdx
Install and configure Claude-Mem with a single command:
npx claude-mem install
The interactive installer will:
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
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.