Getting Started

How to Run Your First AI Code Review with Zento

Ship faster. Break nothing.

5 min read By Sarah Jenkins

Prerequisites

Before running your first review, ensure you have the following ready:

  • A GitHub account with write access to the repository you want to review.
  • Node.js installed (v14 or higher) for the CLI installation.
  • A Zento account (free signup available on the homepage).
Step 01

Install the Zento CLI

The easiest way to interact with Zento is via our command-line interface. Open your terminal and run the following command to install the global package:

$ npm install -g @zentohq/cli

After installation, verify it worked by typing:

$ zento --version
Step 02

Authenticate with GitHub

To read your repository data, Zento needs authorization. Run the login command:

$ zento auth login

This will open your default browser and prompt you to log in to your Zento account and authorize the GitHub integration. Once complete, you should see a success message in your terminal.

Step 03

Run zento review on an open PR

Navigate to the directory of your repository and select an open Pull Request. Run the review command followed by the PR number:

$ zento review 42
Terminal output showing zento review command with AI analysis results

Zento will analyze the changed files, run a set of heuristic tests, and generate a comprehensive report of potential bugs, security vulnerabilities, and style issues.

Step 04

Interpret the Output

Zento categorizes issues into three severity levels to help you prioritize fixes:

Error

Blocks the build. Critical bugs or security vulnerabilities that must be addressed before merging.

Warning

Non-blocking issues like deprecated functions or minor performance bottlenecks. Review recommended but not required.

Suggestion

Refactoring tips, style improvements, and minor optimizations. Great for improving code quality over time.

Step 05

Merge or Iterate

Once you've reviewed the flagged lines, you have two options:

Iterate: Fix the issues in your editor, commit the changes, and run zento review again until the report is clean.

Merge: If an issue is a false positive or intentional, you can dismiss it directly from the CLI output. Zento learns from your decisions to improve future reviews.

Troubleshooting Common Errors

Command not found

If you see "zento: command not found," ensure you ran the npm install with sudo on Linux/macOS or as Administrator on Windows.

Auth Failed

Ensure your browser is not in "incognito" mode. If the popup doesn't appear, try clearing your cookies for zento.dev and running the login command again.

PR not found

Check that you are running the command inside the repository folder and that the PR number exists in the current branch context.

Next Steps: Automate on Push

Don't run the CLI manually every time. Connect Zento to your CI/CD pipeline to trigger reviews automatically on every push.

Add this step to your GitHub Actions workflow file:

# .github/workflows/zento.yml
- name Run Zento Review
run: zento review ${{ github.event.pull_request.number }}
About the Author

Sarah Jenkins

Sarah is a Developer Advocate at Zento. She loves open source, debugging legacy monoliths, and teaching engineers how to ship safer code.

Read more articles →
SJ