Introduction
Quick Start
Install the CLI, save a checkpoint of a git repository, and check it from a fresh session.
Install
bashpip install contextbridge-cli contextbridge --helpThe package is
contextbridge-clion PyPI ↗; the command it installs iscontextbridge.Initialize the repository
bashcd your-repo contextbridge initThis creates a
contextbridge/folder (state.json,graph.json,sessions.json,HANDOFF.md) and, if it is missing, a.contextbridgeignorefile.Run your tests through ContextBridge
bashcontextbridge run -- python3 -m unittestThe command runs normally. ContextBridge records its exit code, duration, the last lines of output (secrets redacted) and the workspace state it ran against.
textE1 `python3 -c print('ok')` -> PASSED (exit 0, 0.06s)Save a checkpoint
bashcontextbridge save --objective "Add login" --next "Write the logout handler"A checkpoint stores the branch, the HEAD commit, every uncommitted file with its SHA-256, and a fingerprint of the whole workspace. It also rewrites
HANDOFF.md.Check it from a fresh session
bashcontextbridge resume --checktext## Resume safety gate: READY No conflicts detected. Proceed with the Next action and keep verifying with tests. No drift: workspace matches the checkpoint. [exit 0]Edit a file and run it again. The verdict changes, and the exit code with it:
text## Resume safety gate: REVIEW_REQUIRED Do not edit yet. Inspect each item below, reconcile it with the code or the user, then proceed. [WARN ] app.py: new uncommitted change since checkpoint [WARN ] no passing test run matches the current workspace state; re-run tests before trusting 'done' [exit 1]contextbridge resume(without--check) prints the same gate result followed by the full handoff, ready to paste into a new session.
Where to go next
- What ContextBridge is and what it does not do.
- The resume gate: every verdict and finding explained.
- Use it with Claude as a Claude Code plugin or a Claude skill.
- CLI reference for every command and option.