--- title: "Claude Code" sidebarTitle: "Claude Code" description: "Claude Code Supermemory Plugin — persistent memory across coding sessions" icon: "/images/claude-code-icon.svg" ---
Claude Code + Supermemory
[supermemory](https://github.com/supermemoryai/claude-supermemory) is a Claude Code plugin that gives your AI persistent memory across sessions. Your agent remembers what you worked on — across sessions, across projects. **Prefer to keep everything on your machine?** This plugin works with [self-hosted Supermemory](/self-hosting/overview) — run `npx supermemory local`, then set `baseUrl` in project config (or point your install at your local API) and use the API key printed on first boot. ## Install the Plugin > **Requires Node.js 18+** on your PATH — the memory hooks run as Node scripts. ```bash # Add the plugin marketplace /plugin marketplace add supermemoryai/claude-supermemory # Install the plugin /plugin install supermemory ``` **Migrating from the old `claude-supermemory` plugin name?** It was renamed to `supermemory` and will not update in place: ```bash /plugin marketplace update supermemory-plugins /plugin install supermemory@supermemory-plugins # Only if the old plugin is still installed: /plugin uninstall claude-supermemory@supermemory-plugins ``` ## Authenticate Create a Supermemory API key from [app.supermemory.ai](https://app.supermemory.ai) (or [API Keys](https://console.supermemory.ai/keys)), then add it to your shell profile: ```bash echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.zshrc source ~/.zshrc ``` ```bash echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.bashrc source ~/.bashrc ``` ```powershell [System.Environment]::SetEnvironmentVariable("SUPERMEMORY_CC_API_KEY", "sm_...", "User") ``` Restart your terminal after running this. ## How It Works Once installed, the plugin runs automatically: - **Reasoned recall** — Before each turn, Claude decides whether recalling memory would help the current message, and only searches when it is worth it. - **Auto-capture** — Conversations and important tool usage are saved for later sessions. - **Team memory** — Project knowledge is shared separately from personal memories. - **Explicit skills** — Ask Claude to search or save memories when you need control. ## Commands | Command | Description | | --- | --- | | `/supermemory:index` | Index codebase architecture and patterns | | `/supermemory:project-config` | Configure project-level settings | | `/supermemory:logout` | Clear saved credentials | | `/supermemory:session` | Show a clickable URL for the current session document | | `/supermemory:status` | Show authentication status | ## Configuration ### Environment Variables ```bash SUPERMEMORY_CC_API_KEY=sm_... # Required SUPERMEMORY_DEBUG=true # Optional: enable debug logging ``` ### Global Settings Create `~/.supermemory-claude/settings.json`: ```json { "maxProfileItems": 5, "signalExtraction": true, "signalKeywords": ["remember", "architecture", "decision", "bug", "fix"], "signalTurnsBefore": 3, "includeTools": ["Edit", "Write"] } ``` | Option | Description | | --- | --- | | `maxProfileItems` | Max memories in context (default: 5) | | `recallDirective` | Override the built-in reasoned-recall instruction | | `signalExtraction` | Only capture important turns (default: false) | | `signalKeywords` | Keywords that trigger capture | | `signalTurnsBefore` | Context turns before a signal (default: 3) | | `includeTools` | Tools to explicitly capture | ### Project Config Per-repo overrides in `.claude/.supermemory-claude/config.json`. Run `/supermemory:project-config` or create manually: ```json { "apiKey": "sm_...", "baseUrl": "https://api.supermemory.ai", "repoContainerTag": "my-team-project", "signalExtraction": true } ``` | Option | Description | | --- | --- | | `apiKey` | Project-specific API key | | `baseUrl` | Supermemory API URL (use for self-hosted) | | `personalContainerTag` | Override personal container | | `repoContainerTag` | Override team container tag | ## Next Steps Source code, issues, and detailed README. Multi-platform memory for Telegram, WhatsApp, Discord, and more.