CLI Overview
The Codity CLI brings AI-powered code review, security scanning, risk analysis, repository chat, test generation, and more directly to your terminal. Run reviews before you push, scan for vulnerabilities locally, plan changes with chat, and generate tests without leaving your workflow.
Installation
Install the Codity CLI with a single command:
curl -fsSL https://cli.codity.ai/install.sh | sh
This script detects your operating system and architecture, downloads the latest release, and places the codity binary in your PATH.
After installation, verify it works:
codity
Quick Start
- Authenticate — Link your Codity account:
codity login
- Initialize your repo — Generate AI context for better results:
codity init
- Index your repo for chat — Make repository context available to Codity:
codity index
- Run a review — Review your staged changes:
codity review --staged
- Scan for vulnerabilities — Check for security issues:
codity scan --staged
- Analyze risk — Check the rollout and regression risk of a change:
codity risk-analysis --staged
- Ask questions or plan work — Open interactive chat:
codity chat
Updating
To update the CLI to the latest version:
codity update
Available Commands
| Command | Description |
|---|---|
login | Authenticate with your Codity account |
logout | Clear stored credentials |
init | Initialize repository and generate AI context |
index | Index the current repository for workspace chat |
chat | Ask questions and plan features in an interactive terminal chat |
review | AI-powered code review, with optional full review mode |
risk-analysis | Analyze regression, rollout, and blast-radius risk |
scan | Security vulnerability scanning |
context | Manage project context files |
pr | Pull request comment tools |
debug | Generate structured debug prompts |
clismith | Natural language to shell commands |
jira | JIRA integration |
config | View and manage configuration |
doctor | Health check for Codity services |
update | Update CLI to latest version |
Global Options
| Option | Description |
|---|---|
--json | Output machine-readable JSON for supported commands, useful for agents and CI workflows |
For combined review, security, and code quality output, see Full Review and JSON Output.
Configuration
The CLI stores configuration in ~/.codity/config.yaml. You can override any setting with environment variables prefixed with CODITY_:
| Variable | Description |
|---|---|
CODITY_ENV | Environment (local or production) |
CODITY_API_URL | Override API endpoint |
CODITY_ACCESS_TOKEN | JWT access token |
CODITY_REFRESH_TOKEN | Refresh token |
CODITY_USER_ID | User ID |
CODITY_WORKSPACE_ID | Workspace to operate in |
CODITY_AUTH_PROVIDER | Auth provider (github, gitlab, etc.) |
Getting Help
Every command supports the --help flag:
codity --help
codity review --help
codity chat --help
codity context generate --help