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

  1. Authenticate — Link your Codity account:
codity login
  1. Initialize your repo — Generate AI context for better results:
codity init
  1. Run a review — Review your staged changes:
codity review --staged
  1. Scan for vulnerabilities — Check for security issues:
codity scan --staged
  1. 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

CommandDescription
loginAuthenticate with your Codity account
logoutClear stored credentials
initInitialize repository and generate AI context
reviewAI-powered code review
scanSecurity vulnerability scanning
test-genAI-powered test generation
contextManage project context files
prPull request comment tools
debugGenerate structured debug prompts
clismithNatural language to shell commands
jiraJIRA integration
configView and manage configuration
doctorHealth check for Codity services
updateUpdate CLI to latest version

Configuration

The CLI stores configuration in ~/.codity/config.yaml. You can override any setting with environment variables prefixed with CODITY_:

VariableDescription
CODITY_ENVEnvironment (local or production)
CODITY_API_URLOverride API endpoint
CODITY_ACCESS_TOKENJWT access token
CODITY_REFRESH_TOKENRefresh token
CODITY_USER_IDUser ID
CODITY_WORKSPACE_IDWorkspace to operate in
CODITY_AUTH_PROVIDERAuth provider (github, gitlab, etc.)

Getting Help

Every command supports the --help flag:

codity --help
codity review --help
codity context generate --help