CLI

Baz CLI lets you review pull requests from the terminal with AI guidance. It helps you focus on meaningful changes and move through reviews faster.

Here is the revised GitBook version with setup centered on the two supported ways to run Baz CLI. It stays practical and usage-focused.

Installation

Install the CLI globally.

npm i -g @baz-scm/cli

Node.js 22 or later is required.

Setup and Running Baz

Baz CLI can be run in one of two modes. The mode is determined at runtime based on how you start the CLI.

Baz Mode

Baz mode connects the CLI to your Baz account and repository context. This mode enables walkthroughs that are aware of linked tickets and specifications.

Run the CLI without tokens.

If you are not authenticated, you will be prompted to sign in to Baz and grant repository access.

Token Mode

Token mode runs the CLI using your own credentials without connecting to Baz services.

Both tokens must be provided.

This mode supports walkthrough reviews and commenting, but does not include requirement verification from Baz.

Walkthrough Review

Baz can guide 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. You can move forward and backward through the review at any time.

You can pause the walkthrough and ask questions about the intent of the change or specific code paths.

Commenting and Review Actions

During the review, you can read existing comments and add new ones directly from the CLI. Comments are posted back to GitHub immediately.

If you have sufficient permissions, you can approve the pull request or merge it from the CLI.

Verifying Requirements

In Baz mode, the CLI verifies the pull request against linked requirements. These typically come from tickets or specifications connected in Baz.

The review highlights where the implementation matches the requirements and where it does not, so gaps can be addressed during review.

Last updated