mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-03 05:14:10 +00:00
Markdown ![]() images get auto-rewritten by Mintlify to mintcdn.com URLs and work fine, but JSX-prop image references (icon=, imageUrl=, avatar=, src=) using /images/... are left as literal root-relative paths, which 404 since the docs site is mounted at supermemory.ai/docs. Prefixed all such references with /docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
151 lines
4.7 KiB
Text
151 lines
4.7 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="/docs/images/claude-code-supermemory.png"
|
|
alt="Claude Code + Supermemory"
|
|
className="rounded-lg shadow-lg"
|
|
/>
|
|
</div>
|
|
|
|
[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 set `baseUrl` in project config (or point your install at your local API) and use the API key printed on first boot.
|
|
</Tip>
|
|
|
|
## 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
|
|
```
|
|
|
|
<Note>
|
|
**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
|
|
```
|
|
</Note>
|
|
|
|
## 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:
|
|
|
|
<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>
|
|
|
|
## 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
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="GitHub Repository" icon="/docs/images/github-icon.svg" 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>
|