Skip to the content.

Installation

Local Installation

# Clone the plugin
git clone https://github.com/iam-dev/cc-sessions.git ~/.cc-sessions-plugin

# Install dependencies and build
cd ~/.cc-sessions-plugin
npm install
npm run build

# Start Claude Code with the plugin
claude --plugin-dir ~/.cc-sessions-plugin

Load Automatically in All Sessions

Add to your Claude Code settings file:

Global settings (~/.claude/settings.json):

{
  "plugins": ["~/.cc-sessions-plugin"]
}

Project-level settings (.claude/settings.json in your project):

{
  "plugins": ["~/.cc-sessions-plugin"]
}

Option 2: Install as NPM Package

# Install globally
npm install -g @iam-dev/cc-sessions

This gives you access to CLI commands but requires manual setup for hooks.

CLI Usage

# Show last session
cc-sessions show

# List all sessions
cc-sessions list

# Search sessions
cc-sessions search "authentication"

# Export a session
cc-sessions export <session-id> --format md

Verify Installation

After installation, start a new Claude Code session and you should see:

cc-sessions: Plugin loaded

Run /sessions to verify the plugin is working:

/sessions

If no previous sessions exist, you’ll see a message indicating that. After your first session ends, the memory will be saved automatically.

Requirements

Troubleshooting

Plugin not loading?

  1. Check the plugin path is correct:
    ls ~/.cc-sessions-plugin/dist/index.js
    
  2. Verify the build succeeded:
    cd ~/.cc-sessions-plugin && npm run build
    
  3. Check Claude Code is using the plugin:
    claude --plugin-dir ~/.cc-sessions-plugin --help
    

Sessions not being saved?

  1. Check that auto-save is enabled:
    cat ~/.cc-sessions/config.yml | grep enabled
    
  2. Verify the config file exists:
    ls -la ~/.cc-sessions/config.yml
    
  3. Check for errors in the session end hook:
    CC_MEMORY_DEBUG=true claude --plugin-dir ~/.cc-sessions-plugin
    

Database errors?

  1. Check database exists:
    ls -la ~/.cc-sessions/index.db
    
  2. Verify SQLite is working:
    sqlite3 ~/.cc-sessions/index.db "SELECT COUNT(*) FROM sessions;"
    

Updating

To update to the latest version:

cd ~/.cc-sessions-plugin
git pull
npm install
npm run build

Uninstalling

  1. Remove the plugin directory:
    rm -rf ~/.cc-sessions-plugin
    
  2. Remove from Claude Code settings (if added)

  3. Optionally remove saved data:
    rm -rf ~/.cc-sessions