Track and persist implementation plans across Claude Code sessions.
- Automatic Plan Persistence: Plans are automatically saved when sessions end
- Context Restoration: Plans are restored when new sessions start on the same branch
- Commit Tracking: Git commits made during sessions are tracked in plan metadata
- Branch-Based Organization: Each git branch gets its own plan file
- Zero Runtime Dependencies: Single static binary with no external dependencies
Download the latest release for your platform from Releases.
go install github.com/jansmrcka/cpt@latestgit clone https://github.com/jansmrcka/cpt
cd cpt
make buildcd your-project
cpt initThis creates the necessary hooks in .claude/settings.json.
cpt statusShows the plan for the current branch, including tracked commits.
cpt listLists all tracked plans in the repository.
cpt syncManually sync a plan from Claude's session storage. Use --force to overwrite an existing plan.
cpt uses Claude Code hooks to:
- SessionStart: Load the existing plan for the current branch and inject it as context
- SessionEnd: Extract the plan from the session transcript and save it
- PostToolUse (Bash): Track git commits made during the session
Plans are stored in .claude/plans/ in your repository with YAML frontmatter containing metadata.
---
branch: feature/my-feature
source: claude-session
last_updated: 2024-01-15T10:00:00Z
commits:
- abc123
- def456
---
## Plan
1. Implement feature X
2. Add tests
3. Update documentationcpt can be installed as a Claude Code plugin. Run these commands inside a Claude Code session:
/plugin marketplace add jansmrcka/cpt
/plugin install cpt@jansmrcka-cpt
If you cloned the repository locally:
/plugin marketplace add /path/to/cpt
/plugin install cpt@cpt
If you prefer not to use the plugin system, you can set up hooks manually:
# Install the binary first (see Installation section above)
cd your-project
cpt initThis adds the necessary hooks directly to .claude/settings.json in your project.
| Command | Description |
|---|---|
cpt init |
Initialize hooks in the current project |
cpt status |
Show plan status for current branch |
cpt list |
List all tracked plans |
cpt sync |
Sync plan from Claude session storage |
cpt --version |
Show version |
cpt stores plans in .claude/plans/ in your repository root. This directory is created automatically when you run cpt init.
You may want to add .claude/plans/ to your .gitignore if you don't want to commit plans:
# Claude Plan Tracker plans
.claude/plans/
Or commit them if you want to share plans with your team.
# Build
make build
# Run tests
make test
# Run linter
make lint
# Build for all platforms
make build-allMIT