SuperAPI AI Directory

baz-cli

Baz CLI is a command-line-based AI-assisted human code review tool designed to solve the problem of code review becoming a bottleneck after AI-accelerated coding. It supports two usage modes: standalone mode (bring your own GitHub Personal Access Token and Anthropic token) and integrated mode (connect to the Baz service). Core features include AI-guided PR walkthroughs, reading PR summaries and code diffs, viewing comments, and creating comments, approving, and merging PRs directly in the terminal. Integrated mode also supports connecting to ticketing systems such as Jira, Linear, and YouTrack, and provides AI-based spec review. The tool requires Node.js 22 or higher and can be run interactively in the terminal.

Open website

About this tool

Baz CLI is a command-line tool for AI-assisted human code review, hosted in the GitHub repository baz-scm/baz-cli and published as the NPM package @baz-scm/cli.

Purpose The goal of this tool is to alleviate the problem of code review becoming a development bottleneck. As AI-assisted coding accelerates development speed, human reviewers still need to review every change, understand context, catch edge cases, and ensure quality, resulting in lengthy reviews. Baz CLI, through AI guidance, helps reviewers focus on what matters and quickly skip over the less important parts.

Main capabilities According to official information, the core features of Baz CLI include:

  • AI-guided PR walkthrough: AI provides intelligent, context-aware navigation to guide you through pull request review.
  • Read summaries, diffs, and public comments: view PR summaries, inspect code diffs, and view all existing comments in one interface.
  • Create comments, approve, and merge: perform actions directly in the CLI, including adding comments, approving PRs, and merging when ready.
  • Integrated mode-exclusive capabilities: integrate with ticketing systems (such as Jira, Linear, YouTrack) to view related tickets in order to understand the full context of a PR; provide spec review, using AI to verify whether the implementation conforms to the ticket spec.

Usage Baz CLI provides two modes:

  1. Standalone mode (bring your own keys): use your own GitHub Personal Access Token (PAT) and Anthropic token to directly review any pull request. This mode requires no Baz service integration, and data remains in the user's own hands.
  2. Integrated mode (Baz experience): connect to Baz for full functionality, including AI assistant, spec review, better context, and comprehensive code review. The official source mentions that new users can sign up for a 14-day free trial with no credit card required.

Environment requirements and configuration:

  • Requires Node.js 22 or higher.
  • Standalone mode requires a GitHub PAT and an Anthropic token. Permission scopes for the GitHub token: Contents requires read and write (for merging PRs and resolving comments; if only reviewing and approving, read-only is sufficient), Pull Requests requires read and write (for creating comments and approving PRs; if only reading PR content, read-only is sufficient).
  • Integrated mode requires a Baz account; optionally integrate Jira,Linear, YouTrack, etc. to obtain ticket context.
  • Mode detection logic: standalone mode is enabled when both GH_TOKEN and ANTHROPIC_TOKEN are set; integrated mode is enabled when neither is set (requires a Baz user); an error occurs when only one of the tokens is set (standalone mode requires both tokens).
  • Environment variables are read at runtime, with no need to rebuild the CLI.
  • Other environment variables include: BAZ_LOG_LEVEL (log level: fatal, error, warn, info, debug), NODE_ENV (development, production).

Review interface features:

  • Review screens (comments, requirements, chat) adapt to the terminal window. When comments, diffs, and the conversation cannot all be displayed at the same time, the content area scrolls, while the input box and prompts remain on screen. A status line below the content shows the visible range, for example ↑↓ lines 12-30 of 84. The view follows new chat output unless the user has scrolled up.
  • When there is scrollable content, the CLI requests terminal mouse support to respond to the scroll wheel; at this point the terminal's own click selection is suspended, and most terminals restore it when Option (macOS) or Shift is held down.
  • Colors adapt to the terminal background; COLORFGBG is used for detection, otherwise a dark background is assumed.
  • Theme-related variables: BAZ_THEME (auto by default, dark, light, none disables colors), BAZ_TERMINAL_BACKGROUND (dark/light overrides automatic detection), NO_COLOR (any non-empty value disables colors).
  • Individual colors can be overridden via BAZ_COLOR_* variables, using hexadecimal values or none to keep them unstyled.
  • Theme files are checked in order: $BAZ_THEME_FILE, ./.baz/theme.json, ~/.baz/theme.json, ~/.config/baz/theme.json. Available keys include main, accent, text, success, warning, error, info, fileHeaderBg, fileHeaderFg, diffAddedBg, diffAddedFg, diffDeletedBg, diffDeletedFg, diffSelectedBg, diffSelectedFg, diffContextFg, lineNumberFg. Environment variables take precedence over files, non-string values in files are ignored, and background colors will not be used without a readable foreground color. When colors are disabled, lines pointed to by comments are displayed in bold.

Developer-related:

  • Clone the repository and install dependencies.
  • Available scripts and development workflow: create a .env file for local configuration; run npm run dev to enter watch mode; TypeScript compiles automatically; use npm run dev to test after changes; run npm run lint:fix and npm run format:fix before committing.
  • Contributions are welcome, and the process includes: creating a branch from main, following the code style, testing thoroughly, and submitting a PR with a clear description.
  • Issue feedback: you can open an issue in the GitHub repository.

Use cases

  • Development teams need to quickly review large numbers of AI-assisted code changes.
  • Developers who want to complete PR review, comments, approval, and merging directly within the terminal.
  • Teams using the Baz service and integrating ticket systems such as Jira, Linear, and YouTrack, who need to conduct code review by combining ticket context and specification review.

Limitations

  • Requires Node.js 22 or higher.
  • Standalone mode requires preparing your own GitHub PAT and Anthropic token, and configuring the permission scopes correctly.
  • Integrated mode requires a Baz account, and ticket system integration can be configured optionally.
  • Mode detection depends on environment variables, and improper token configuration will cause errors.
  • Details such as charges, pricing, and specific effects that are not provided in the materials are not currently available.