Rift CLI v1.0
The local-first capture engine. A short-lived Go binary that installs into Git hooks and agent hooks, captures every AI session, and writes it Git-natively — without a daemon, a proxy, or a service in the data path.
Rift CLI v1.0 is in active development. The commands and behaviour documented below are the design target — they will change before release. Join the waitlist to be notified the moment the CLI is ready to install.
# Overview
The CLI is a single Go binary distributed via Homebrew, Scoop, and a static install.sh for Linux and offline-air-gapped environments. There is no long-running process: hooks fire on lifecycle events, the binary updates session state and writes to the appropriate Git location, then exits.
The CLI never blocks a Git commit. Local capture targets sub-100ms p50, sub-500ms p95. Slow paths — provider reconciliation, Cloud sync, AI summarisation — run asynchronously after the commit completes.
# Installation
The full install is three commands. The first creates a thin .rift/ config folder at the repo root and bootstraps the orphan rift/checkpoints/v1 branch. The second wires Rift into your assistant.
# Install the CLI
brew install rift
# Inside a Git repo, bootstrap Rift
rift init
# Enable the agent you use today
rift enable --agent claude-codeRun rift enable --agent <name> for each assistant your team uses. The plugin protocol lets you add any agent that ships rift-agent-<name> on $PATH.
# What the CLI does
- Captures sessions from supported AI assistants into local-only shadow branches, then condenses each session into a signed checkpoint commit on
rift/checkpoints/v1at commit time. - Redacts every byte via a two-pass pipeline — ~260+ vendor secret patterns plus entropy detection, credentialed-URI detection, PII passes, and your org's custom redactor packs. A
RedactedBytesGo wrapper makes it a compile error to write un-redacted bytes to a synced path. - Computes attribution at session, commit, PR, file, hunk, and line granularity, with an explicit confidence score that drops when squash-merges or rebases rewrite history.
- Estimates cost locally from captured token counts and a versioned price table — ~5-10% accurate against provider truth, available the moment a session ends.
- Hash-chains every event and anchors a per-checkpoint Merkle leaf into the commit graph.
rift verifyre-derives the chain at any time. - Syncs to Rift Cloud in encrypted batches as a parallel transport — the Git branch remains the source of truth, the Cloud is a low-latency index.
# Supported agents
First-party integrations at v1.0 cover the AI assistants engineering teams use most often today:
- Claude Code
- Codex / OpenAI CLI
- Cursor
- GitHub Copilot CLI
- Gemini CLI
- OpenCode
- Factory Droid
Beyond this list, the plugin protocol lets any agent be added by dropping a binary on $PATH:
$PATH/rift-agent-<name> info
$PATH/rift-agent-<name> install-hooks
$PATH/rift-agent-<name> parse-hook <event> # JSON over stdin/stdout
$PATH/rift-agent-<name> read-transcript# Hooks
rift enable installs into Git's standard hook surface. Each hook is owned by a focused part of the capture pipeline.
| Hook | Purpose |
|---|---|
| prepare-commit-msg | Inject the Rift-Checkpoint trailer (opt-out per commit). |
| commit-msg | Validate and finalise the trailer. |
| post-commit | Condense shadow session into a checkpoint; trigger sync. |
| post-rewrite | Re-align checkpoint linkage after amend / rebase. |
| pre-push | Optionally push the audit branch; flush pending sync. |
| post-merge | Detect feature-branch merge; reconcile attribution. |
# Commands
A subset of the v1.0 command surface. The full surface and stable contracts ship with the GA binary.
Setup & lifecycle
rift init # bootstrap .rift/ + checkpoint branch
rift enable --agent claude-code # install hooks for an agent
rift status # current session, sync state, install health
rift doctor # diagnose stuck sessions or missing hooksSessions & checkpoints
rift session list
rift session show sess_01j...
rift checkpoint list
rift checkpoint show ckpt_01j...
rift checkpoint explain HEAD # explain a commit's AI work
rift checkpoint search "billing retry"PRs & costs
rift pr cost 4821
rift pr explain 4821
rift cost summary --since 30d
rift cost by-model --since quarter
rift cost by-team --since monthSync & verify
rift sync # flush pending batches to Rift Cloud
rift sync status
rift verify # re-derive the local hash chain
rift verify --since <date># What's coming
v1.0 is the local capture engine and the dashboard primitives. The next releases layer in the analytics depth engineering leadership actually buys for.
- Forecasting commands — Monte Carlo cost forecasts, model-switch and tool-rollout scenarios from the CLI.
- Scenario engine — capacity and headcount-aware planning with P10/P50/P90 ranges your CFO will accept.
- IDE extensions — VS Code, JetBrains, and Cursor surfaces for per-file AI contribution heatmaps and session inspectors.
- BYOK + self-hosted control plane — customer-managed encryption keys via AWS KMS / Azure Key Vault / GCP KMS, and an Enterprise on-prem deploy.
We're inviting the first 100 teams as soon as Rift CLI v1.0 is stable. Join the waitlist to be in that cohort.