| title | description |
|---|---|
Quickstart |
Get started with Cortex CLI in 5 minutes |
- A modern terminal emulator (iTerm2, Alacritty, Windows Terminal, etc.)
- API key from your chosen AI provider (Anthropic, OpenAI, Google, etc.)
Verify the installation:
cortex --versionSet your API key as an environment variable:
# Anthropic (Claude)
export ANTHROPIC_API_KEY="your-api-key"
# OpenAI
export OPENAI_API_KEY="your-api-key"
# Google (Gemini)
export GOOGLE_API_KEY="your-api-key"Or login using the CLI:
# Interactive login
cortex login
# Login with API key from stdin
echo "your-api-key" | cortex login --with-api-keyFor OAuth-based providers:
cortex login --device-authFollow the on-screen instructions to complete authentication.
Start the terminal user interface:
cortexThis opens an interactive chat interface where you can:
- Ask questions about your codebase
- Request code changes
- Run commands
- Use slash commands
Start with a specific task:
cortex "explain the architecture of this project"For quick, one-off tasks:
cortex run "add error handling to the main function"Create an AGENTS.md file to help Cortex understand your project:
# In your project root
cortex run "create an AGENTS.md file documenting this project"Or use the /init slash command in the TUI.
| Shortcut | Action |
|---|---|
Enter |
Send message |
Shift+Enter |
New line |
Ctrl+C |
Cancel current operation |
Ctrl+D |
Exit Cortex |
/ |
Open command menu |
↑ / ↓ |
Navigate history |
Tab |
Autocomplete |
| Command | Description |
|---|---|
/help |
Show available commands |
/model |
Change AI model |
/agent |
Switch agent |
/clear |
Clear conversation |
/compact |
Compact conversation history |
/edit |
Edit a file |
/undo |
Undo last change |
/redo |
Redo last undone change |
/diff |
Show changes |
/share |
Share session |
# Or use cortex login
cortex login status
```
# Or full auto mode (use with caution)
cortex --full-auto
```
- Documentation: docs.cortex.foundation
- GitHub Issues: github.com/cortexlm/cortex-cli/issues
- Discord: discord.gg/cortex