Install/run via CLI
CLI mode is best suited for immediate, one-time code reviews.
Last updated
CLI mode is best suited for immediate, one-time code reviews.
Last updated
Bito Inc. (c) 2024
Prerequisites: Before proceeding, ensure you've completed all necessary prerequisites for self-hosted AI Code Review Agent.
Start Docker: Ensure Docker is running on your machine.
Repository Download: Download the AI Code Review Agent GitHub repository to your machine.
Extract and Navigate:
Extract the downloaded .zip file to a preferred location.
Navigate to the extracted folder and then to the “cra-scripts” subfolder.
Note the full path to the “cra-scripts” folder for later use.
Open Command Line:
Use Bash for Linux and macOS.
Use PowerShell for Windows.
Set Directory:
Change the current directory in Bash/PowerShell to the “cra-scripts” folder.
Example command: cd [Path to cra-scripts folder]
Adjust the path based on your extraction location.
Configure Properties:
Open the bito-cra.properties file in a text editor from the “cra-scripts” folder. Detailed information for each property is provided on Agent Configuration: bito-cra.properties File page.
Set mandatory properties:
mode = cli
pr_url
bito_cli.bito.access_key
git.provider
git.access_token
Note: Valid values for git.provider are GITHUB, GITLAB, or BITBUCKET.
Optional properties (can be skipped or set as needed):
git.domain
code_feedback
static_analysis
dependency_check
dependency_check.snyk_auth_token
review_scope
exclude_branches
exclude_files
exclude_draft_pr
Note: Detailed information for each property is provided on Agent Configuration: bito-cra.properties File page.
Check the Required Access Tokens guide to learn more about creating the access tokens needed to configure the Agent.
Run the Agent:
On Linux/macOS in Bash: Run ./bito-cra.sh bito-cra.properties
On Windows in PowerShell: Run ./bito-cra.ps1 bito-cra.properties
This step might take time initially as it pulls the Docker image and performs the code review.
Final Steps:
The script may prompt values of mandatory/optional properties if they are not preconfigured.
Upon completion, a code review comment is automatically posted on the Pull Request specified in the pr_url property.
Note: To improve efficiency, the AI Code Review Agent is disabled by default for pull requests involving the "main" branch. This prevents unnecessary processing and token usage, as changes to the "main" branch are typically already reviewed in release or feature branches. To change this default behavior and include the "main" branch, please contact support.
AI-generated pull request (PR) summary
Changelist showing key changes and impacted files in a pull request.
AI code review feedback posted as comments on the pull request.