claude-cc
v2.0.2
Published
Claude Code Context — auto-resume sessions per git branch
Maintainers
Readme
Claude Code Context
Auto-resume Claude Code sessions per git branch.
ccc wraps the Claude Code CLI and automatically resumes the last session for your current branch — so switching branches never loses your context.

Install
npm install -g claude-ccRequires claude (curl -fsSL https://claude.ai/install.sh | bash) and python3.
Usage
Use ccc instead of claude:
$ git checkout feature/a
$ ccc
Resuming session for branch: feature/a
$ git checkout feature/b
$ ccc
Resuming session for branch: feature/b
$ git checkout -b feature/c
$ ccc
Starting new session for branch: feature/cEach branch gets its own session. ccc accepts the same flags as claude — outside a git repo it behaves identically.
How it works
- Reads the current branch with
git branch --show-current - Scans
~/.claude/projects/<project>/for session history - Finds the most recent session that started on this branch
- Runs
claude --resume <session-id>, or a freshclaudeif none found
No config, no server, no dependencies — just bash and Python stdlib.
License
MIT
