Getting started
Install the cubic CLI using one of the following methods:curl (recommended)
npx
cubic to open the CLI and start a review.

Authentication
The first time you runcubic, it will automatically open your browser to sign in with your cubic.dev account. Once authenticated, you’re all set — no extra steps needed.
If you run into any authentication issues, press Ctrl+L to log out and re-authenticate.
When to use local review
Use one of these two workflows:- Default: GitHub review only: Push your branch, let cubic review the PR on GitHub, then fix the comments. This is the simplest setup and the best default for most teams.
- Advanced: local review plus GitHub review: Run local review before you push so you can iterate on your code before opening a PR, then rely on GitHub review as the final pass.
Use it with your coding agent
Most teams use the cubic CLI together with a coding agent:- Ask your coding agent to
"review my code"while you are working. - Run
cubic reviewwhen you want an explicit local pass in the terminal. - Re-run the local review after fixes, then push and rely on the GitHub PR review as the final pass.
If you have not connected cubic to your editor yet, start with
Connect cubic to your IDE.
Add this to AGENTS.md, CLAUDE.md, or .cursorrules
Use this snippet if you want your coding agent to follow the default GitHub-first workflow:
Common Workflows
The CLI adapts to different stages of your development process.
1. Review Uncommitted Changes (Default)
Review code you are currently working on, before you commit.2. Review a Pull Request (Branch Review)
Compare your current branch against a base branch (e.g.,main) to catch issues before opening a PR.
3. Review a Specific Commit
Analyze changes introduced by a specific commit hash or reference.4. Custom Instructions
Focus the review on specific concerns like security or performance.Command Reference
The primary command iscubic review.
Options
| Option | Alias | Description |
|---|---|---|
--json | -j | Output results as JSON (for CI/automation) |
--base [branch] | -b | Review against a base branch (PR-style). Auto-detects base if no branch specified |
--commit <ref> | -c | Review a specific commit |
--prompt <instructions> | -p | Custom review instructions |
--base, --commit, and --prompt are mutually exclusive.
Output Formats
Text Output (Default)
Human-readable output with colored priority labels, designed for interactive use.JSON Output
Structured output for tools and automation.AI attribution tracking
The cubic CLI installs git-ai during setup to tag AI-assisted commits with git notes. These notes power the AI coding analytics dashboard for tool usage and authorship trends. Attribution tracking is enabled by default. git-ai shows a brief AI vs human authorship summary after each commit.Opting out at install time
Set theCUBIC_DISABLE_GIT_AI environment variable to skip git-ai during installation:
Managing tracking after installation
Usecubic stats to enable, disable, or check the status of AI attribution tracking at any time:
cubic stats disable removes git-ai hooks and persists your preference so future upgrades will not re-enable it. cubic stats enable re-installs git-ai and clears the opt-out flag.