AI has revolutionized software development. With AI assistants, developers can write code faster than ever, generating entire features, refactoring complex systems, and implementing patterns in minutes instead of hours. But as development velocity accelerates, code review has become the bottleneck.
While AI helps you write code at unprecedented speed, human reviewers still need to review every change, understand context, catch edge cases, and ensure quality. This creates a frustrating mismatch: you can ship tons of code, but reviews take hours or days.
Let AI guide you through reviews, helping you focus on what matters while skimming through the rest. Get intelligent insights, automated analysis, and context-aware suggestions, thoughtful and logical ordering that lets you get through all those reviews fast - all in your terminal!
- Two Ways to Use Baz CLI
- Features
- Requirements
- Review Flow
- Environment Variables
- Development
- Contributing
- Links
Interactive CLI experience with real-time AI chat 
Understand the gist - does the PR fulfil its objectives? 
Baz CLI offers two modes to fit your workflow:
Use your own GitHub Personal Access Token (PAT) and Anthropic token to review any pull request directly.
Perfect for:
- Reviewing PRs without Baz service integration
- Your data remains yours
Setup:
npm i -g @baz-scm/cli GH_TOKEN=your_github_pat ANTHROPIC_TOKEN=your_anthropic_api_key bazConnect with Baz to get the full experience: AI assistant, spec review, better context, and comprehensive code review.
π‘ New to Baz? Sign up for a free 14-day trial - no credit card required!
Perfect for:
- Teams using Baz for code review workflows
- Integrated issue tracking and spec reviews to lead the review
- Collaborative review processes
Setup:
npm i -g @baz-scm/cli baz- π€ AI-Guided PR Walkthrough β Let AI guide you through pull requests with intelligent, context-aware navigation
- π Read Summaries, Diffs, and Open Comments β View comprehensive PR summaries, examine code diffs, and see all existing comments in one place
- π¬ Create Comments, Approve, and Merge β Take action directly from the CLI: add comments, approve PRs, and even merge when ready
- π Integrated Context with Your Ticketing System β Connect with Jira, Linear, or YouTrack to see related tickets and understand the full context of each PR
- π Spec Reviews β Understand how each PR meets requirements with AI-powered spec review that validates implementation against ticket specifications
- Node.js 22 or later (see
enginesinpackage.json) - Standalone Mode: GitHub PAT and Anthropic token. For GitHub, make sure your fine-grained personal access token has the following scopes:
- Contents -
Read and write- to allow merging PRs and resolving comments. If you only want to review and approve,Readis enough. - Pull Requests -
Read and write- to allow creating comments and approving the PR. If you only want to read PR content,Readis enough.
- Contents -
- Integrated Mode: Account in Baz
- Optional: Jira, Linear, YouTrack, etc. integrated in baz for ticket context
- Pull Request Selection β Choose the PR to review (use back option to change repository)
- Review Step Selection β Choose to let the AI walk you through the PR, or drive the review yourself and ask the AI questions - it's your call!
- Review Actions β Finally - create comments, approve and even merge the PR.
The CLI respects the following environment variables:
LOG_LEVELβ Set logging verbosity (fatal,error,warn,info,debug)NODE_ENVβ Environment mode (development,production)- All configuration variables above
Mode Detection:
- If both
GH_TOKENandANTHROPIC_TOKENare set β Standalone mode - If neither token is set β Integrated mode (requires a baz user)
- If only one token is set β Error (both tokens required for standalone mode)
Environment variables are read at runtime, so you can adjust them without rebuilding the CLI.
- Node.js 22+
- npm
- Git
Clone the repository and install dependencies:
git clone https://github.com/baz-scm/baz-cli.git cd baz-cli npm install| Script | Description |
|---|---|
npm run dev | Start the CLI in watch mode with tsx for rapid iteration |
npm run build | Generate compiled output in dist/ using TypeScript |
npm run lint | Run ESLint checks with caching |
npm run lint:fix | Auto-fix ESLint issues |
npm run format:check | Verify source files with Prettier |
npm run format:fix | Format source files with Prettier |
- Create a
.envfile with your local configuration - Run
npm run devto start in watch mode - Make your changes β TypeScript will compile automatically
- Test your changes with
npm run dev - Run
npm run lint:fixandnpm run format:fixbefore committing
We welcome contributions! Here's how you can help:
- Fork the repository and create your branch from
main - Make your changes following our code style
- Test thoroughly β ensure all existing tests pass
- Submit a pull request with a clear description of your changes
- Follow the existing code style and conventions
- Run
npm run lint:fixandnpm run format:fixbefore committing - Write clear commit messages
- Add tests for new features when applicable
Found a bug or have a feature request? Open an issue and we'll take a look!
- GitHub: baz-scm/baz-cli
- NPM Package: @baz-scm/cli
- Baz on GitHub: baz-scm
Made with β€οΈ by the Baz team
β Star us on GitHub if you find this project helpful!
