Installation
Install CodeAnt CLI globally using npm:Authentication
Login with CodeAnt AI
Authenticate with your CodeAnt AI account using browser-based OAuth:app.codeant.ai by default) in a browser for authentication. The CLI polls for login completion automatically (timeout: 10 minutes). On a self-hosted instance, set the API base URL and dashboard URL first.
Your API key is saved to ~/.codeant/config.json.
To log out:
SCM Platform Tokens
To use PR management and code review features, store authentication tokens for your SCM platform:
Azure DevOps also needs your organization URL. Set
AZURE_DEVOPS_ORG_URL (for example https://dev.azure.com/my-org), or add "azureDevOpsOrgUrl": "https://dev.azure.com/my-org" to the existing ~/.codeant/config.json.
Alternative: Platform CLI Tools
If you have GitHub CLI (gh) or GitLab CLI (glab) installed and authenticated, CodeAnt will automatically use their tokens as a fallback.
Token Resolution Order:
- Environment variables (highest priority)
- Platform CLI tools (
gh auth token,glab auth token) - Stored tokens in
~/.codeant/config.json
Self-Hosted / Enterprise Setup
Custom API Base URL
For self-hosted CodeAnt deployments, set a custom API base URL:CODEANT_API_URL environment variable.
Dashboard URL
codeant login opens the dashboard URL, the address of your CodeAnt AI web app, to sign you in. The CLI asks the API base URL for it. If sign-in fails with Could not determine the dashboard URL, set it explicitly:
codeant get-dashboard-url, and clear the setting with codeant remove-dashboard-url. You can also set the CODEANT_DASHBOARD_URL environment variable.
Self-Hosted SCM Platforms
CodeAnt auto-detects self-hosted SCM instances from your git remote URL. You can also explicitly configure base URLs:Quick Start
Once installed and authenticated, try scanning your staged files:Next steps
Run your first review
Run codeant review on your local changes and explore the available review scopes.
Customize review options
Choose file filters and severity thresholds for command-line reviews.