CLI Overview
The Codity CLI brings AI-powered code review, security scanning, test generation, and more directly to your terminal. Run reviews before you push, scan for vulnerabilities locally, and generate tests — all 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
- Run a review — Review your staged changes:
codity review --staged
- Scan for vulnerabilities — Check for security issues:
codity scan --staged
- Generate tests — Create unit tests for your changes:
codity test-gen --staged
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 |
review | AI-powered code review |
scan | Security vulnerability scanning |
test-gen | AI-powered test generation |
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 |
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 context generate --help