supermemory/apps/docs/integrations/claude-code.mdx
vorflux 0d2c6c8623 docs: rename Claude Code plugin to supermemory (#1100)
## Summary
- Rename the Claude Code plugin docs references from `claude-supermemory` / `Claude-Supermemory` to `supermemory`
- Update install and command examples to use `/plugin install supermemory` and `/supermemory:logout`

## Testing
- Ran `git diff --check`

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/cc17c7ae-0fb2-4e2c-bb4c-20a66900d720)
- Requested by: Sreeram Sreedhar (sreeram@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.
2026-06-17 06:14:29 +00:00

121 lines
3.5 KiB
Text

---
title: "Claude Code"
sidebarTitle: "Claude Code"
description: "Claude Code Supermemory Plugin — persistent memory across coding sessions"
icon: "/images/claude-code-icon.svg"
---
<div className="w-1/2">
<img
src="/images/claude-code-supermemory.png"
alt="Claude Code + Supermemory"
className="rounded-lg shadow-lg"
/>
</div>
<Warning>
This integration requires the **Supermemory Pro plan**. [Upgrade here](https://console.supermemory.ai/billing).
</Warning>
[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.
<Tip>
**Prefer to keep everything on your machine?** This plugin works with [self-hosted Supermemory](/self-hosting/overview) — run `npx supermemory local`, then `export SUPERMEMORY_API_URL="http://localhost:6767"` and use the API key printed on first boot.
</Tip>
## Get Your API Key
Create a Supermemory API key from the [API Keys](https://console.supermemory.ai/keys) page, then add it to your shell profile so it persists across sessions:
<Tabs>
<Tab title="macOS / Linux (zsh)">
```bash
echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.zshrc
source ~/.zshrc
```
</Tab>
<Tab title="macOS / Linux (bash)">
```bash
echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.bashrc
source ~/.bashrc
```
</Tab>
<Tab title="Windows (PowerShell)">
```powershell
[System.Environment]::SetEnvironmentVariable("SUPERMEMORY_CC_API_KEY", "sm_...", "User")
```
Restart your terminal after running this.
</Tab>
</Tabs>
## Install the Plugin
```bash
# Add the plugin marketplace
/plugin marketplace add supermemoryai/claude-supermemory
# Install the plugin
/plugin install supermemory
```
## How It Works
Once installed, the plugin runs automatically:
- **Context Injection** — On session start, relevant memories are fetched and injected into Claude's context. This includes user preferences, project knowledge, and past interactions.
- **Auto-Capture** — Tool usage is captured and stored during the session for future context.
### What Gets Captured
| Tool | Captured As |
| ----- | --------------------------------------------------- |
| Edit | `Edited src/auth.ts: "old code..." → "new code..."` |
| Write | `Created src/new-file.ts (500 chars)` |
| Bash | `Ran: npm test (SUCCESS/FAILED)` |
| Task | `Spawned agent: explore codebase` |
## Commands
### /supermemory:logout
Log out from Supermemory and clear saved credentials.
```
/supermemory:logout
```
## Configuration
### Environment Variables
```bash
SUPERMEMORY_CC_API_KEY=sm_... # Required
SUPERMEMORY_SKIP_TOOLS=Read,Glob,Grep # Tools to not capture (optional)
SUPERMEMORY_DEBUG=true # Enable debug logging (optional)
```
### Settings File
Create `~/.supermemory-claude/settings.json`:
```json
{
"skipTools": ["Read", "Glob", "Grep", "TodoWrite"],
"captureTools": ["Edit", "Write", "Bash", "Task"],
"maxContextMemories": 10,
"maxProjectMemories": 20,
"debug": false
}
```
## Next Steps
<CardGroup cols={2}>
<Card title="GitHub Repository" icon="github" href="https://github.com/supermemoryai/claude-supermemory">
Source code, issues, and detailed README.
</Card>
<Card title="OpenClaw Plugin" icon="messages-square" href="/integrations/openclaw">
Multi-platform memory for Telegram, WhatsApp, Discord, and more.
</Card>
</CardGroup>