Skip to main content
Alpha release — The cubic CLI is currently in alpha. We’re iterating fast and would love your feedback! Reach out at [email protected] or open an issue on GitHub.
The cubic CLI brings a lightweight version of cubic’s AI code review directly into your terminal. It’s exceptionally fast, accurate, and designed to work seamlessly with AI IDEs. cubic catches bugs in your local changes and generates a context-rich prompt for you to paste into your AI IDE (like Cursor) to automatically fix them. It automatically syncs with your custom rules, past feedback, and repository settings from cubic cloud to ensure consistent reviews. Key Features:
  • Local Analysis: Catch bugs and security issues before you commit.
  • Context-aware: Uses your repository’s custom rules, learnings, and settings.
  • One-key Fixes: Generate prompts to fix issues instantly in your IDE.
  • Flexible Modes: Review uncommitted changes, branches, or specific commits.

Getting started

Install and launch the cubic CLI:
pnpm add -g @cubic-dev-ai/cli && cubic
After installation, type cubic to open the CLI and start a review. cubic CLI home screen showing review preset options

Authentication

The first time you run cubic, 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.

Using with AI coding assistants

When using Claude Code, Codex, or other AI coding assistants, you can instruct them to use cubic for code review:
Review my changes using the cubic CLI: cubic --json
AI assistants can parse the JSON output to understand and fix issues.

Common Workflows

The CLI adapts to different stages of your development process. cubic CLI review results showing prioritized issues

1. Review Uncommitted Changes (Default)

Review code you are currently working on, before you commit.
cubic review

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.
# Auto-detect base branch
cubic review --base

# Explicit base branch
cubic review --base main

3. Review a Specific Commit

Analyze changes introduced by a specific commit hash or reference.
cubic review --commit HEAD~1

4. Custom Instructions

Focus the review on specific concerns like security or performance.
cubic review --prompt "check for XSS vulnerabilities"

Command Reference

The primary command is cubic review.
cubic review [options]

Options

OptionAliasDescription
--json-jOutput results as JSON (for CI/automation)
--base [branch]-bReview against a base branch (PR-style). Auto-detects base if no branch specified
--commit <ref>-cReview a specific commit
--prompt <instructions>-pCustom review instructions
Note: --base, --commit, and --prompt are mutually exclusive.

Output Formats

Text Output (Default)

Human-readable output with colored priority labels, designed for interactive use.
[P0] src/api/auth.ts:45
   SQL injection vulnerability in user lookup
   User input is concatenated directly into SQL query without parameterization.

JSON Output

Structured output for tools and automation.
cubic review --json
{
  "issues": [
    {
      "priority": "P0",
      "file": "src/api/auth.ts",
      "line": 45,
      "title": "SQL injection vulnerability in user lookup",
      "description": "User input is concatenated directly into SQL query without parameterization."
    }
  ]
}

Limitations

Usage is unlimited while the CLI is in alpha, subject to rate limits to ensure fair access for all users.