Skip to content
Esc
navigateopen⌘Jpreview
Sign up
On this page

CLI

Install and use the Baz CLI for AI-assisted manual code review in the terminal.

The Baz CLI is the terminal surface of Baz. Where the plugin brings Baz into a coding agent, the CLI walks a human through a pull request: a structured walkthrough of the change, questions answered in place, comments posted back to the provider, and requirement verification against linked tickets.

Install

npm install -g @baz-scm/cli

New to Baz? Sign up for a free 14-day trial, no credit card required.

Running the CLI

The CLI runs in one of two modes, decided at runtime by how you start it.

Mode How to start it What you get
Baz baz Repository context from your Baz account, walkthroughs aware of linked tickets and specifications, and requirement verification
Token GH_TOKEN=… ANTHROPIC_TOKEN=… baz Walkthrough review and commenting using only your own credentials, with no requirement verification from Baz

In Baz mode, run the CLI without tokens. If you are not authenticated, you are prompted to sign in to Baz and grant repository access.

baz

Token mode uses your own GitHub Personal Access Token and Anthropic token, and both must be provided.

GH_TOKEN=your_github_pat ANTHROPIC_TOKEN=your_anthropic_key baz

Walkthrough review

Baz guides you through a pull request step by step. The walkthrough presents a structured view of the change, highlights what matters, and lets you skip low-impact parts, moving forward and backward through the review at any time. You can pause it to ask questions about the intent of the change or about specific code paths.

Commenting and review actions

During the review you can read existing comments and add new ones from the CLI, and they are posted back to GitHub immediately. With sufficient permissions, you can also approve or merge the pull request without leaving the terminal.

Verifying requirements

In Baz mode, the CLI verifies the pull request against linked requirements, which typically come from tickets or specifications connected in Baz. The review shows where the implementation matches the requirements and where it does not, so gaps can be addressed during review rather than after merge.

FAQ

Do I need a Baz account to use the CLI?

No. Token mode runs on your own GitHub PAT and Anthropic token and supports walkthrough review and commenting. Requirement verification and repository context from Baz need Baz mode.

How is the CLI different from the Baz plugin?

The plugin gives a coding agent indexed search across your organization’s repositories plus the plan and review commands. The CLI is for a person reviewing a pull request in the terminal, with a guided walkthrough, comments, and approval or merge.

Which mode am I in?

Whichever you started. Passing both GH_TOKEN and ANTHROPIC_TOKEN puts the CLI in token mode; starting it with no tokens puts it in Baz mode and prompts you to sign in if needed.

Was this page helpful?