Skip to content

isene/CC-sessions

Repository files navigation

CC-sessions

Ruby Gem Version Unlicense

A simple tool for bookmarking and resuming Claude Code sessions with tags.

Claude Code sessions are tied to directories, making it hard to remember where you were working on specific projects. This tool lets you tag sessions with meaningful names and quickly resume them.


Features

  • Bookmark sessions with /bm tag1 tag2 inside Claude Code
  • Check bookmark with /bm? to see current tags
  • Resume sessions with cc tag from anywhere
  • Interactive list with cc -l (arrow keys or j/k to navigate)
  • Running indicator shows green next to active sessions in cc -l
  • Auto-follow continuations — when Claude creates a new session (context reset), cc detects it and resumes the latest session automatically
  • Delete bookmarks with d in list or cc -d tag
  • Auto-install the /bm command and permission on first run
  • Zero dependencies - pure Ruby

Installation

From RubyGems (Recommended)

gem install cc-sessions

From Source

git clone https://github.com/isene/CC-sessions.git
cd CC-sessions
./install.sh

Usage

Bookmarking Sessions

Inside a Claude Code session, use the /bm command:

/bm rtfm ruby filemanager   # Bookmark with tags
/bm?                        # Show current bookmark status

This bookmarks the current session with three tags. You can later resume it using any of those tags.

Resuming Sessions

cc                     # Continue session in current dir, or start new
cc <tag>               # Resume session bookmarked with <tag>
cc -l, --list          # Interactive list (↑/↓/j/k, Enter, d=delete, q=quit)
cc -d, --delete <tag>  # Delete bookmark matching <tag>
cc -h, --help          # Show help

First Run

On first run, cc automatically:

  1. Installs the /bm command to ~/.claude/commands/
  2. Adds auto-accept permission to ~/.claude/settings.json

This enables /bm to work without confirmation prompts.

Files

File Purpose
~/.cc-sessions/bookmarks.json Stores your bookmarks
~/.claude/commands/bm.md The /bm command definition
~/.claude/settings.json Permission for auto-accept

Example Workflow

# Start working on RTFM project
cd ~/projects/rtfm
claude

# Inside Claude Code, bookmark it
/bm rtfm ruby filemanager

# Later, from anywhere
cc rtfm    # Instantly back in that session

# Or browse all bookmarks
cc -l      # Pick from interactive list

Requirements

  • Ruby 2.7+
  • Claude Code CLI (claude)

License

This software is released into the public domain under The Unlicense.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors