Getting Started with Cody CLI
Cody CLI is AINative Studio's AI-powered terminal coding assistant. It runs in your terminal and uses AI to help you write, refactor, and understand code.
Installation
npm (recommended)
npm install -g @ainative/cody-cli
npx (no install required)
npx @ainative/cody-cli
curl installer (macOS / Linux)
curl -fsSL https://ainative.studio/install-cody.sh | sh
Homebrew
brew tap ainative-studio/cody
brew install cody
Authentication
Sign in with your AINative account:
cody auth login
Or set an API key directly:
export ANTHROPIC_API_KEY=your-sk-key
export ANTHROPIC_BASE_URL=https://api.ainative.studio
ℹ️API Key Format
AINative API keys use the sk_ prefix. Get yours at ainative.studio/dashboard/api-keys.
First Run
Interactive mode
cody
Single prompt
cody -p "Explain this codebase"
Print mode (pipe-friendly)
cody --print "What does this function do?"
Specify a model
cody --model qwen-coder-7b -p "Fix this bug"
Key Concepts
- Tools — Cody can read/write files, run bash commands, search codebases, and more.
- MCP Servers — Connect external tools via the Model Context Protocol.
- Memory — Cody persists context across sessions automatically.
- CODY.md — Place instructions for Cody in a
CODY.mdfile at your project root.