> ## Documentation Index
> Fetch the complete documentation index at: https://supermemory-capy-add-llmstxt-summary-and.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Supermemory plugin for Claude Code. Keeps memory across coding sessions.

<img src="https://mintcdn.com/supermemory-capy-add-llmstxt-summary-and/RZUchfWXNk8FOiN_/images/claude-code-supermemory.png?fit=max&auto=format&n=RZUchfWXNk8FOiN_&q=85&s=cfd6a2a7bf1f90528d4d9d190183af5b" alt="Claude Code + Supermemory" className="rounded-lg" width="2044" height="1574" data-path="images/claude-code-supermemory.png" />

[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 theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
# 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 theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  /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 the [API Keys](https://console.supermemory.ai/keys) page in the console, then add it to your shell profile:

<Tabs>
  <Tab title="macOS / Linux (zsh)">
    ```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
    echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.zshrc
    source ~/.zshrc
    ```
  </Tab>

  <Tab title="macOS / Linux (bash)">
    ```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
    echo 'export SUPERMEMORY_CC_API_KEY="sm_..."' >> ~/.bashrc
    source ~/.bashrc
    ```
  </Tab>

  <Tab title="Windows (PowerShell)">
    ```powershell theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
    [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 theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
SUPERMEMORY_CC_API_KEY=sm_...    # Required
SUPERMEMORY_DEBUG=true           # Optional: enable debug logging
```

### Global settings

Create `~/.supermemory-claude/settings.json`:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "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 theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "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="https://mintcdn.com/supermemory-capy-add-llmstxt-summary-and/RZUchfWXNk8FOiN_/images/github-icon.svg?fit=max&auto=format&n=RZUchfWXNk8FOiN_&q=85&s=997e915bbbc7ec5808a4cced93759dbc" href="https://github.com/supermemoryai/claude-supermemory" width="16" height="16" data-path="images/github-icon.svg">
    Source code, issues, and detailed README.
  </Card>

  <Card title="Cursor plugin" icon="https://mintcdn.com/supermemory-capy-add-llmstxt-summary-and/RZUchfWXNk8FOiN_/images/cursor-logo.svg?fit=max&auto=format&n=RZUchfWXNk8FOiN_&q=85&s=19113ff7ed218f8ac503f4891850e18d" href="/integrations/cursor" width="512" height="512" data-path="images/cursor-logo.svg">
    Memory for your Cursor chats.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.