AI code review CLI running a local code review in a terminal
Macroscope
Macroscope
Product

AI Code Review CLI: Local, Command Line, and Terminal Code Review Before You Push (2026)

An AI code review CLI runs a full AI code review on your local branch from the command line, before you push. How local AI code review works, what local vs cloud actually means for your source code, and how the Macroscope, CodeRabbit, and Greptile CLIs differ.

An AI code review CLI is a command-line tool that runs a full AI code review on the branch sitting on your laptop, before you push anything to GitHub. It reads your diff, finds correctness bugs, explains them in your terminal, and in the better implementations hands the findings straight to your coding agent so the bugs get fixed before a pull request exists.

If you have searched for a terminal code review tool, a command line code review tool, or a local AI code review tool, this is the category you landed on. It is also the category where the vocabulary is muddiest, because "local" gets used for two completely different things: reviewing local git state, and running inference on your own hardware. This guide separates them.

For most of the history of AI code review, the pull request was the trigger. You wrote code, you pushed, you opened a PR, a bot commented, you fixed, you pushed again. That loop works. It is also the slowest possible place to learn that you shipped an off-by-one error, because every lap costs a push, a CI run, and a context switch.

The AI code review CLI collapses that loop to seconds and moves it to where you already are.

Short answer: An AI code review CLI runs the same AI code review you would get on a GitHub pull request, locally, against your current branch. The Macroscope CLI brings the same correctness reviewer that runs on your GitHub pull requests into your local agent workflow, so Claude Code, Codex, Cursor, or OpenCode can validate and fix issues before you push.

The important distinction is not "AI review, but in a terminal." A terminal UI is not worth changing your workflow for. What is worth it is your pull request reviewer moved earlier, with the agent that wrote the code doing the fixing.

TL;DR: What an AI Code Review CLI Gives You

  • Pre-push AI code review. Review the branch you are on right now, no pull request required, no CI wait.
  • Agent-native output. The findings go to your coding agent, which validates each one, discards false positives, and fixes the real bugs one at a time.
  • Worktree isolation. The Macroscope CLI reviews an isolated snapshot of your work, including uncommitted changes, so you can keep typing while the review runs.
  • A loop, not a one-shot. Autoloop repeats review, validate, fix, re-review for up to five passes until a clean run.
  • Usage-based pricing. Macroscope is $0.05 per KB of diff for GitHub code review and $0.01 per Agent Credit (1,000 free every month) for CLI reviews, with a $100 credit on a new workspace, no card required, and free for qualified open source projects. No per-seat fee, ever.
  • "Local" means local git state, not local inference. No mainstream AI code review CLI runs the model on your laptop. What you get instead is SOC 2 Type II handling and a contractual no-training policy on your source code, covered below.
  • It does not replace GitHub PR review. It front-runs it. The two surfaces do different jobs, and the section below spells out which one you need.

What Is an AI Code Review CLI?

An AI code review CLI is a binary you install on your machine that performs AI code review on local git state and reports findings to your terminal or your coding agent. The defining trait is the trigger: a command you type, not a webhook GitHub fires.

Three properties separate a real AI code review CLI from "an LLM I asked to look at my diff":

  1. It reviews a diff, with repository context. Not one file, not one function. The branch against its base, with awareness of the code the diff touches.
  2. It produces structured findings. A location, a severity, an explanation, and usually a proposed fix, in a format an agent can act on rather than prose a human has to interpret.
  3. It is the same reviewer your team already trusts. The value of an AI code review CLI comes from running the identical review that will run on the pull request, so a clean local pass means a clean GitHub PR review.

That third point is the one people skip, and it matters most. A local reviewer that is weaker than your PR reviewer just adds a step. A local reviewer that is the same engine turns the PR into a formality.

Why Did AI Code Review Move Into the Terminal?

Because coding agents changed the shape of the work. A developer running Claude Code, Codex, or Cursor does not write fifty lines and push. They generate a few hundred lines, read them, redirect, generate more, and only stop when the feature looks done. By the time a pull request opens, the diff is large and the author's memory of writing it is thin, because an agent wrote most of it.

Two consequences follow.

The volume broke the old loop. Across Macroscope customers, each seat now produces roughly 1.8x more commits, 1.9x more code reviews, and 1.7x larger reviews year over year. Pushing every draft to GitHub so a bot can look at it is a lot of round trips for changes that are still moving.

The agent is a better fix target than a human. When an AI code reviewer flags a real bug, the ideal next action is not "a human reads the comment tomorrow morning." It is "the agent that just wrote this code fixes it now, while the full context of the change is still loaded." A CLI puts the reviewer and the fixer in the same room.

The terminal is simply where the code is being written in 2026. AI code review followed it there.

How Does an AI Code Review CLI Work?

It resolves your local git state into a reviewable diff, sends that for analysis, and streams findings back. The Macroscope flow looks like this:

  1. You run a command. Either the plugin command inside your agent (/macroscope:codereview) or macroscope codereview directly in your shell.
  2. The CLI captures a baseline. Your branch against its base, including work you have not committed.
  3. The review runs. The same correctness-focused review that runs on your GitHub pull requests, not a lighter local imitation.
  4. Findings stream in. They appear as they are found, so you are reading the first issue while the rest are still landing.
  5. Something acts on them. Either you (arrow through issues, expand for the full comment and code snippet, press c to copy one or ⇧C to copy them all) or your agent (validate each finding, drop the false positives, fix the confirmed ones, verify).

Step 5 is where the design philosophies of the different CLIs diverge hardest, and it is worth being precise about it. Printing findings is easy. Producing findings that an agent can safely act on without a human refereeing every line is the hard part.

What Does the Macroscope CLI Actually Do?

It installs a macroscope binary plus optional plugins for Claude Code, Codex, Cursor, and OpenCode, then runs correctness reviews on demand. One install line:

curl -sSL https://raw.githubusercontent.com/prassoai/macroscope-local/main/install.sh | bash

The installer puts macroscope on your PATH, installs the agent plugins for supported local setups, and starts a setup wizard to sign in and pick a workspace. There are then two ways to use it.

From your agent, which is the default most people want:

Claude Code: /macroscope:codereview
Codex:       $macroscope:codereview
Cursor:      /codereview
OpenCode:    /macroscope-codereview

Your agent starts a Macroscope review on the current branch, watches for findings as they arrive, explains each issue in plain language, validates whether it is real, ignores false positives, fixes confirmed issues one at a time, then verifies the fix and reports what it addressed.

From the terminal, when you want to drive:

macroscope                              # bare command: setup, or the full review experience
macroscope codereview                   # review the current repo
macroscope codereview /path/to/repo     # review a repo elsewhere on disk
macroscope codereview --base main       # compare against a specific base
macroscope codereview --in-place        # skip worktree isolation
macroscope codereview --raw             # machine-readable streaming output

On a terminal this launches the full-screen interactive review. The supported codereview flags are --base <ref> (a branch, tag, or commit), --in-place, --interactive, --tui (an alias for --interactive), --raw, and --debug. There is no macroscope status or macroscope agent: the CLI surface is code review, and the other products live elsewhere.

Scripting It: Machine-Readable Streaming Output

macroscope codereview --raw skips the TUI and streams issue_event=<json> records to stderr as each finding lands. This is the piece that makes the CLI programmable rather than just pretty, and it is what the agent plugins themselves consume.

Alongside the issue events you get a few load-bearing machine tokens on stderr: review_worktree=<path> for the isolated worktree the review ran against, review_id=<jwt> for the run, and a terminal issue_status=completed or issue_status=failed. Raw mode also engages automatically when stdout is not a terminal, so plugin and CI invocations behave predictably without anyone passing a flag.

That means a pre-push hook, a wrapper script, or your own agent harness can consume findings as a stream and decide what to do with them, rather than scraping a terminal UI.

What Is Worktree Isolation and Why Does It Matter?

By default macroscope codereview runs in an isolated git worktree, so the review analyzes a fixed snapshot while you keep working on your branch. This sounds like plumbing. In practice it changes the ergonomics completely.

Without isolation, a local review has to review whatever is on disk at the moment it reads each file. If you keep editing during a review that takes a minute, the findings drift out of sync with the code, and you get comments about lines you already deleted. So most tools implicitly ask you to sit still, or to commit and stash first.

Macroscope creates a fresh worktree under <repo>/.worktrees/macroscope-review-<short_sha>, captures your uncommitted changes there as a baseline commit, and reviews that. You do not commit, you do not stash, you do not stop typing, and the findings stay pinned to a fixed snapshot rather than to files that moved under them. The path is emitted as review_worktree=... so a calling agent knows exactly what was reviewed.

If you would rather review in place, macroscope codereview --in-place skips the worktree. One behavior worth knowing: base auto-detection only runs for the isolated-worktree flow, so with --in-place and no --base, the comparison is against HEAD and only uncommitted changes get reviewed. Pass --base explicitly to include committed branch changes. And if there is genuinely nothing to review, the CLI returns an actionable error instead of a silent empty pass.

Does an AI Code Review CLI Review Uncommitted Changes?

With Macroscope, yes. With some competitors, no, and this is the single biggest behavioral difference between local AI code review tools.

Greptile's CLI documents that it reviews committed changes that have not been merged, and ignores uncommitted changes. So the mental model is "commit first, then review." CodeRabbit's CLI reviews uncommitted changes in your working directory. Macroscope captures uncommitted work-in-progress as the baseline and reviews it in an isolated worktree.

If you work the way most agent users work, in long uncommitted stretches, "commit before you can review" is a real tax. It pushes you into ceremony commits whose only purpose is to make the reviewer look at your code.

CLIReviews uncommitted workIsolation while reviewingTrigger surface
Macroscope CLIYes, WIP captured as baselineIsolated git worktree by defaultAgent plugin or macroscope codereview
CodeRabbit CLIYes, working directoryReviews in placecoderabbit / cr in terminal
Greptile CLINo, committed-not-merged onlyReviews in placegreptile review in terminal
Cursor /reviewYes, within CursorIn-editorSlash command in the Cursor agent input

Details as of July 2026 from each vendor's official docs and launch posts.

What Is Autoloop, and Why Is a Loop Better Than a Review?

Autoloop runs the review, validate, fix, re-review cycle locally until no further issues are found, up to five passes. One command:

Claude Code: /macroscope:autoloop
Codex:       $macroscope:autoloop
Cursor:      /autoloop
OpenCode:    /macroscope-autoloop

The reason a loop matters is regressions. A single review pass tells you about the bugs in the code you wrote. It says nothing about the bugs introduced by the fixes. Every experienced engineer has fixed a null check and broken a boundary condition in the same edit. Loop mode reviews, fixes in your working tree, commits the fixes, then reviews again to catch exactly that.

Loop mode is entirely local. It does not open pull requests, talk to GitHub, or wait on remote checks. Use it when you want the reviewer to keep driving rather than stopping after one pass.

AI Code Review CLI vs GitHub PR Review: Which Do You Need?

Both, and for different reasons. They are not competing surfaces, and treating the CLI as a replacement for GitHub code review is the most common mistake teams make with these tools.

AI code review CLIGitHub PR review
TriggerYou, on demandEvery pull request, automatically
TimingBefore the pushAfter the push
AudienceYou and your agentThe whole team, plus the merge gate
EnforceableNo, you can skip itYes, via required checks
Best atFast iteration on unfinished workConsistent coverage, auditability, blocking bad merges

The CLI raises the floor of what reaches your pull request. GitHub PR review guarantees that floor exists for everyone, including the teammate who has not installed anything and the agent that opened a PR at 3am. A required check nobody can skip is worth a great deal, and no local tool provides it.

The right setup is boring: run the CLI while you work, keep automated GitHub code review on every PR, and let Approvability auto-approve the pull requests that are genuinely safe so humans spend their attention on the ones that are not.

Which Tools Offer an AI Code Review CLI in 2026?

Macroscope, CodeRabbit, and Greptile all ship a CLI; Cursor ships an in-editor equivalent; Claude Code can review a diff but is not a dedicated reviewer. A quick map of the category:

  • Macroscope CLI. Agent-first. Plugins for Claude Code, Codex, Cursor, and OpenCode, worktree isolation, autoloop, and the same review engine that runs on your GitHub PRs. Billed with Agent Credits.
  • CodeRabbit CLI. Terminal UI plus an --agent / --prompt-only mode for piping into coding agents. Free tier is limited to 3 reviews per hour, and unlimited agentic use runs through a usage add-on billed per file reviewed on top of a per-seat plan.
  • Greptile CLI. greptile review on the current branch, with --json and --agent output modes. Reviews committed-not-merged changes only, and ignores uncommitted work. Requires Node 22 or newer for the npm and script installs.
  • Cursor /review. Runs Bugbot and Security Review as a pre-commit gate from the Cursor agent input. In-editor rather than a terminal binary, and Cursor-only.
  • Claude Code. A general coding agent that will happily review a diff if asked, with no dedicated review engine, no team-wide consistency, and no shared configuration. Anthropic's separate managed Claude Code Review product is PR-based, Team and Enterprise only, and lands around $15 to $25 per review.

If you want the head-to-heads: Macroscope vs CodeRabbit, Macroscope vs Greptile, and Macroscope vs Cursor Bugbot.

How Much Does Local AI Code Review Cost?

Macroscope CLI reviews are billed with Agent Credits at $0.01 per credit, with 1,000 credits included free every month. Credits are computed from the raw LLM cost of the run plus a 5% markup, divided by $0.01. GitHub code review is priced separately at $0.05 per KB of diff reviewed with a 10 KB minimum, which works out to about $0.95 for a typical 19 KB pull request.

The structural difference from the rest of the category is that nothing here is per seat.

ToolModel50 engineers, 500 PRs/month
Macroscope$0.05/KB reviewed, 10 KB min; CLI via Agent Credits at $0.01/credit with 1,000 free monthly~$475/mo at a $0.95 historical average per review
CodeRabbit$24 to $30 per seat per month, plus a per-file usage add-on for unlimited CLI reviews~$1,200 to $1,500/mo before CLI add-ons
Greptile~$30 per seat per month with 50 reviews included and $1 per additional review, and overages counted per author rather than pooled~$1,500/mo before overage

Per-seat pricing made sense when a seat meant one human writing one PR at a time. In 2026 a single seat drives an agent that opens PRs all day, so a flat fee per human charges you for headcount while the work scales with something else entirely. Usage-based pricing tracks the work: you pay for diffs reviewed and credits burned, and you cap it. Macroscope defaults to a $10 per-review cap and a $50 per-PR cap, both adjustable, plus a hard monthly workspace spend limit.

New workspaces get $100 in usage credit with no card required, and Macroscope is free for qualified non-commercial open source projects. More on the model: usage-based pricing for developer tools.

Does Local AI Code Review Mean My Code Never Leaves My Laptop?

No, and this is the most important misunderstanding in the category. When people say "local AI code review tool" they usually mean one of two very different things:

  1. Local git state. The reviewer reads the branch on your machine, including uncommitted work, and runs before you push. This is what every AI code review CLI on the market does, Macroscope included.
  2. Local inference. The model runs on your hardware and no source code goes anywhere. This is what nobody in this category does, because frontier-model correctness review needs frontier models.

The Macroscope CLI is the first kind. Your diff is sent to Macroscope for analysis, which is what makes a local review as good as the review that runs on your GitHub pull request. Any tool claiming CLI review quality on par with cloud review while promising your code never leaves the machine is describing a smaller model, and you will feel the difference in what it catches.

So the real question is not local versus cloud. It is what happens to your code on the cloud side.

How Macroscope handles it:

  • SOC 2 Type II, with controls published in a public trust center at trust.macroscope.com and a request-access workflow for the audit report.
  • No training on your source code. Not by Macroscope, and not by the model providers. Inference routes through OpenAI and Anthropic under agreements that prohibit training on customer IP, with Standard Contractual Clauses covering cross-border transfer.
  • Encrypted in transit and at rest, with hard isolation between customers.
  • Scoped context, not repository dumps. Reviews reason over a structured representation of your code with scoped context rather than shipping your whole repository to a model on every run.

If your security review asks "where does our code go and who trains on it," those are the four answers that matter. The full version is in AI code review security: SOC 2, data privacy, and how your code is protected.

Can a CLI Enforce Engineering Standards on Every Pull Request?

No. A CLI cannot enforce anything, and if enforcement is what you are shopping for, you want custom AI code review rules that run as a GitHub check run. This is worth separating clearly, because "AI tool that enforces engineering standards on every PR" and "AI code review CLI" get asked as if they were the same question and they are opposites: one is a voluntary local pass, the other is a gate.

Macroscope's answer to enforcement is Check Run Agents, and they are a remote surface, not a CLI one. You do not configure or run them through the CLI. You commit them to your repo, they trigger on GitHub pull request events, and they appear as GitHub check runs. Each one is a markdown file in .macroscope/check-run-agents/*.md with YAML frontmatter, written in plain English rather than a rule DSL:

  • title names the check as it appears in the GitHub Checks UI
  • conclusion: failure makes a violation fail the check run, where the default neutral is non-blocking
  • include and exclude scope the check to the paths it applies to
  • model, reasoning, and effort tune how much thinking the agent puts in
  • waitsFor holds the agent until named CI steps finish, so it can judge test or build results

Every field is optional.

That is what "agentic CI" means in practice: an AI agent running as a GitHub check run on every pull request, evaluating your own standards, with the authority to fail the build. Migration guards, logging conventions, API compatibility rules, "never call this deprecated helper," "every new endpoint needs an auth annotation." Things a linter cannot express and a human reviewer forgets on a Friday.

Note that Macroscope's built-in Correctness Check returns SUCCESS or NEUTRAL; only a Check Run Agent with conclusion: failure can actually fail a pull request. Deeper reading: what is agentic CI, Check Run Agents, and custom AI code review agents.

The clean division of labor: the CLI raises the quality of what you push, Check Run Agents decide what is allowed to merge.

Can I Ask Questions About My Codebase?

Yes, through Macroscope's Agent, which is a different surface from the CLI. The CLI is code review only. Worth stating plainly, because "AI codebase understanding" and "AI code review" get treated as one product and they are three: review, codebase Q&A, and engineering status.

Codebase Q&A goes to Macroscope's Agent, which answers natural-language questions about your code and your engineering activity from:

  • Slack, by DM, by tagging @Macroscope in a channel, or in a group DM
  • GitHub, by mentioning @macroscope-app in a PR thread or replying to a review comment
  • The API, triggered programmatically through webhooks

It can also write code and ship pull requests, and it pulls context from Jira, Linear, PostHog, Amplitude, Sentry, LaunchDarkly, BigQuery, and GCP Cloud Logging, plus Datadog and PagerDuty through MCP connectors. Good shapes of question: "why does this service retry twice," "who owns the billing meter code," "what changed in checkout last sprint."

Engineering status is Status, which is the other half of AI codebase understanding: commit summaries, area classification, sprint reports and weekly digests, and productivity stats across both humans and agents, billed at $0.05 per commit processed.

So the full division of labor: your coding agent explores the code in front of you in the terminal, the Macroscope CLI reviews the diff you are about to push, the Agent answers questions spanning the whole repository and the systems around it, and Status tells you what changed and who changed it. Agent usage bills through the same Agent Credits as CLI reviews at $0.01 per credit with 1,000 free per month. A quick Slack question runs around 7 credits (about $0.07); a deep research task can run around 470 credits (about $4.70).

What Happens to the Bugs the CLI Finds Too Late?

They get fixed on the pull request by Fix It For Me, which is the AI code fixer half of the platform. A local review pass will not catch everything, and some code never goes through a local pass at all, because an agent opened the PR directly.

When Macroscope flags a bug in a GitHub pull request, you can reply to the review comment or DM @Macroscope in Slack and it will write the fix, push it to the branch, and report back. That is the same review-then-fix shape as autoloop, running on the PR instead of your laptop. The "code fixer AI" and the "AI code reviewer" being one system is the point: a reviewer that only complains creates work, and a fixer without a reviewer has nothing reliable to work from.

Beyond review and fixes, the platform side is where a CLI-only tool runs out of road: Check Run Agents for custom checks that can actually fail a PR, Approvability for auto-approving safe pull requests, commit summaries and engineering Status for what changed and who changed it, and Agent access from Slack, GitHub, and the API.

How Do You Get Started With the Macroscope CLI?

  1. Install. Run the install script, then complete the setup wizard to sign in and select a workspace.
  2. Relaunch your agent. If Claude Code, Codex, Cursor, or OpenCode was already open, restart it so the Macroscope command appears.
  3. Open a repo and review. Run the plugin command for your host, or macroscope codereview from the shell.
  4. Let the agent work the findings. Validate, fix, verify, one issue at a time.
  5. Reach for autoloop when you want an unattended pass over a larger change.
  6. Keep GitHub code review on. The CLI improves what you push. The PR check is what protects the branch.

If command not found: macroscope shows up, restart your terminal and confirm ~/.local/bin is on your PATH. Full options are in the CLI docs, and the launch write-up is Introducing Macroscope CLI.

Frequently Asked Questions

What is an AI code review CLI?

An AI code review CLI is a command-line tool that runs AI code review on your local branch before you push. It reads the diff between your branch and its base, finds correctness bugs, and reports them in your terminal or directly to your coding agent so they can be fixed before a pull request exists.

Does an AI code review CLI replace GitHub code review?

No. A CLI is opt-in and local, so it cannot guarantee coverage across a team, cannot block a merge, and never sees the pull requests your agents open without you. Use the CLI to raise the quality of what you push, and keep automated GitHub PR review as the enforced check on every pull request.

Can I run AI code review on uncommitted changes?

With Macroscope, yes. The CLI captures your uncommitted work-in-progress as the review baseline and analyzes it in an isolated git worktree, so you never have to commit or stash first. CodeRabbit's CLI also reviews the working directory, while Greptile's CLI reviews committed-not-merged changes and ignores uncommitted work.

What is the best AI code reviewer for the terminal?

For agent-driven workflows, Macroscope: it ships plugins for Claude Code, Codex, Cursor, and OpenCode, reviews uncommitted work in an isolated worktree, runs a review-fix-verify autoloop, and uses the same engine as your GitHub PR reviews so a clean local pass predicts a clean PR. It also led an independent benchmark of AI code review tools at 48% bug detection on a dataset of real production bugs, at 2.6 average comments per PR.

What are the best CodeRabbit CLI alternatives?

Macroscope is the closest alternative for teams that want local reviews inside a coding agent without a per-seat bill. CodeRabbit's CLI free tier caps you at 3 reviews per hour, and unlimited agentic use is a usage add-on priced per file reviewed on top of a $24 to $30 per-seat plan. Macroscope prices CLI reviews with Agent Credits at $0.01 per credit with 1,000 free monthly, and GitHub code review at $0.05 per KB. See Macroscope vs CodeRabbit and best CodeRabbit alternatives.

What are the best Greptile CLI alternatives?

Macroscope, mainly on workflow. Greptile's CLI ignores uncommitted changes, so you commit before you can review, and it is priced per seat with per-review overage charged per author rather than pooled. Macroscope reviews uncommitted work, isolates the review in a worktree, and bills by usage. See Macroscope vs Greptile and Greptile alternatives.

How much does the Macroscope CLI cost?

CLI reviews are billed with Agent Credits at $0.01 per credit, and every workspace gets 1,000 free credits per month. Credits equal the raw LLM cost of the run plus 5%, divided by $0.01. GitHub code review is separate at $0.05 per KB of diff with a 10 KB minimum, roughly $0.95 for a typical pull request. New workspaces start with $100 of usage credit and no card, and qualified non-commercial open source projects are free.

Which coding agents does the Macroscope CLI work with?

Claude Code, Codex, Cursor, and OpenCode. The installer adds the Macroscope plugin to supported local setups of each, and the review command is /macroscope:codereview in Claude Code, $macroscope:codereview in Codex (a $ prefix, not a slash), /codereview in Cursor, and /macroscope-codereview in OpenCode. Relaunch the agent after installing so the command registers.

Can I use the CLI without a coding agent?

Yes. macroscope codereview opens a full-screen review in your terminal with findings streaming in as they are found. Arrow through issues, expand one for the full comment and code snippet, press c to copy a single finding or ⇧C to copy them all. Use --base <ref> to compare against a specific branch, tag, or commit.

What does worktree isolation do?

It reviews a fixed snapshot of your work in a separate git worktree, so you can keep editing your branch while the review runs without the findings drifting out of sync with your files. It also means you do not need to commit or stash to get a review. Pass --in-place if you would rather review the working tree directly.

How is autoloop different from a normal review?

A normal review is one pass: it reports the bugs in the code as it stands. Autoloop repeats review, validate, fix, commit, re-review for up to five iterations or until a clean pass, which catches regressions introduced by the fixes themselves. It runs entirely locally and never touches GitHub.

Does local AI code review work for agent-written code?

That is the case it is built for. Agent-written diffs are large, arrive fast, and the author often has thinner context on them than on hand-written code, which is exactly when a fast local reviewer pays for itself. Running the review inside the agent that wrote the code also means the fix happens while the full context of the change is still loaded.

Is there a free AI code review CLI?

Macroscope gives every new workspace $100 of usage credit with no card required, includes 1,000 Agent Credits per month, and is free for qualified non-commercial open source projects. CodeRabbit's CLI has a free tier capped at 3 reviews per hour. "Free" in this category usually means rate-limited rather than unmetered, so check the cap before you build a workflow on it.

Is there an AI code review tool that runs locally without sending code to the cloud?

Not at frontier review quality. Every mainstream AI code review CLI, Macroscope included, reviews local git state and sends the diff to a hosted service for analysis, because correctness review depends on frontier models. What you should require instead is SOC 2 Type II, a contractual no-training policy covering both the vendor and its model providers, encryption in transit and at rest, and audit evidence on request. Macroscope publishes all of that at trust.macroscope.com, and reviews reason over a structured representation of your code with scoped context rather than shipping your whole repository on every run.

Can I run AI code review in a pre-push hook or a CI script?

Yes. macroscope codereview --raw skips the TUI and streams issue_event=<json> records to stderr as findings arrive, plus review_worktree=<path>, review_id=<jwt>, and a terminal issue_status=completed or issue_status=failed. Raw mode also engages automatically when stdout is not a terminal, so hooks and CI invocations behave predictably. That said, for a team-wide gate the pull request check is the better place: a local hook can be skipped, and Check Run Agents cannot.

What flags does macroscope codereview support?

--base <ref> to compare against a branch, tag, or commit, --in-place to skip worktree isolation, --interactive (or its alias --tui) to force the full-screen review, --raw for machine-readable streaming output, and --debug for verbose logging. You can also pass a repo path, as in macroscope codereview /path/to/repo. Note that the CLI surface is code review only: there is no macroscope status or macroscope agent.

What is the difference between a command line code review tool and a terminal code review tool?

Nothing, they are the same category described two ways. Both mean a binary you run from your shell that reviews your current branch. The distinction that does matter is whether the tool is a dedicated code reviewer (Macroscope, CodeRabbit, Greptile) or a general coding agent you have asked to look at a diff (Claude Code, Codex), because only the first kind applies the same review consistently and matches what runs on your pull requests.

Is Claude Code a code review tool, and what is a good Claude Code alternative?

Claude Code is a terminal coding agent, not a code reviewer: there is no dedicated review engine, no shared severity model, and no consistency between runs or across teammates. The strongest alternative is to keep Claude Code as the fixer and give it a real reviewer to work from, which is what the Macroscope plugin does with /macroscope:codereview inside Claude Code. Anthropic's separate managed Claude Code Review product is pull-request-based, limited to Team and Enterprise plans, and runs roughly $15 to $25 per review.

Can I write custom AI code review rules?

Yes, with Check Run Agents. You write each custom check as a markdown file in .macroscope/check-run-agents/*.md with YAML frontmatter: title for the check name, conclusion: failure to fail the check run on a violation, and include / exclude to scope which paths it applies to. Rules are written in plain English rather than a DSL, so they can express conventions a linter cannot, and they run as a GitHub check run on every pull request.

What AI tool enforces engineering standards on every pull request?

An AI code review CLI cannot, because it is opt-in and local. Enforcement needs a check that runs on every pull request with the authority to fail it, which is what Check Run Agents do: an AI agent evaluates your own standards as a GitHub check run and fails the PR when conclusion: failure is set. This is the pattern usually called agentic CI. Pair it with Approvability so safe pull requests auto-approve and human attention goes to the risky ones.

What is agentic CI?

Agentic CI is the pattern of running AI agents as checks on every pull request, rather than only running deterministic scripts. Instead of a linter matching patterns, an agent reads the change and judges it against instructions written in plain English, then reports a pass or failure as a GitHub check run. Macroscope implements this as Check Run Agents. More detail: what is agentic CI.

Can an AI code review CLI answer questions about my codebase?

The Macroscope CLI is code review only. Codebase Q&A is a separate surface: Macroscope's Agent answers natural-language questions about your codebase from Slack, from GitHub pull request threads, and from the API, and it can also write code and open pull requests, with context from Jira, Linear, Sentry, PostHog, Amplitude, LaunchDarkly, BigQuery, and GCP Cloud Logging plus Datadog and PagerDuty via MCP. Agent usage bills through the same Agent Credits as CLI reviews, with 1,000 free per month.

What AI tool gives codebase understanding beyond code review?

Three distinct things, and it helps to name them separately. Code review catches correctness bugs in a diff. Codebase Q&A answers questions spanning the whole repository, which is Macroscope's Agent from Slack, GitHub, or the API. Engineering status is Status: commit summaries, area classification, sprint reports and weekly digests, and productivity stats across humans and agents at $0.05 per commit processed. A CLI-only reviewer gives you the first and none of the rest.

Review your branch before you push
Install the Macroscope CLI and get correctness reviews inside Claude Code, Codex, Cursor, or OpenCode