Install APEX
6 installation methods for every platform. Get started in under a minute.
System Requirements
Minimum
- Python 3.11 or later
- At least one API key (or Ollama for free local models)
- Terminal with 256-color support
- 100 MB disk space
Recommended
- Python 3.12+
- pipx for isolated install
- Git for version control integration
- Ollama for free local models
Installation Methods
pipx
AllRecommended method. pipx creates an isolated environment, preventing dependency conflicts with other Python packages.
pipx install apex-aiapex --versionapex tuiAPI Key Setup
APEX needs API keys for cloud models. Set them in ~/.apex/.env, or use the quick setup:
⚡ Quick Setup — APEX Free
Get free coding models with just one command:
apex key sk-or-v1-...Get your key at openrouter.ai/keys — no credit card needed. This single key unlocks 19 free models + 10 Pro models.
# ~/.apex/.env
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GROQ_API_KEY=gsk_...
MISTRAL_API_KEY=...
DEEPSEEK_API_KEY=...
GEMINI_API_KEY=...
COHERE_API_KEY=...
CEREBRAS_API_KEY=...
FIREWORKS_API_KEY=fw_...
TOGETHER_API_KEY=...
HF_API_KEY=hf_...
PERPLEXITY_API_KEY=...
NVIDIA_API_KEY=nvapi-...
OPENROUTER_API_KEY=...OpenRouter ⭐
Models: APEX Free (19 free) + APEX Pro (10 frontier)
OPENROUTER_API_KEYGet Key Anthropic
Models: Claude Sonnet 4.6, Opus 4.5, Claude 4.7
ANTHROPIC_API_KEYGet Key OpenAI
Models: GPT-5, GPT-5 mini, o3, o4-mini
OPENAI_API_KEYGet Key Models: Gemini 3, Gemini 2.5 Pro, Gemini 2.0 Flash
GEMINI_API_KEYGet Key xAI
Models: Grok 4, Grok 3
XAI_API_KEYGet Key Groq
Models: Llama Groq, Mixtral Groq
GROQ_API_KEYGet Key Mistral
Models: Mistral Large, Codestral
MISTRAL_API_KEYGet Key DeepSeek
Models: DeepSeek V4, DeepSeek R2
DEEPSEEK_API_KEYGet Key Cohere
Models: Command R, Command R Plus
COHERE_API_KEYGet Key Cerebras
Models: Llama Cerebras, Qwen Cerebras
CEREBRAS_API_KEYGet Key Fireworks AI
Models: Llama Fireworks, Mixtral Fireworks
FIREWORKS_API_KEYGet Key Together AI
Models: Llama Together, Qwen Together, DeepSeek Together
TOGETHER_API_KEYGet Key Hugging Face
Models: Llama HF, Mistral HF, Qwen HF
HF_API_KEYGet Key Perplexity
Models: Sonar, Sonar Pro
PERPLEXITY_API_KEYGet Key NVIDIA
Models: Llama NVIDIA, Mistral NVIDIA, Qwen NVIDIA
NVIDIA_API_KEYGet Key Cloudflare
Models: Llama CF, Mistral CF, Qwen CF
CLOUDFLARE_API_KEYGet Key Amazon Bedrock
Models: Claude Bedrock, Llama Bedrock, Mistral Bedrock
AWS_ACCESS_KEY_IDGet Key ollama pull llama3, then use apex --model ollama/llama3Platform Notes
macOS
- • Best with curl installer:
curl -fsSL ... | bash - • Or pipx for isolated install:
pipx install apex-ai - • pipx recommended over pip
- • Terminal.app, iTerm2, Warp, Kitty all supported
Linux
- • curl installer works on all distros
- • pipx for isolated install
- • Docker for isolated environments
Windows
- • pip:
pip install apex-ai - • uv:
uv tool install apex-ai - • Docker:
docker run -it ghcr.io/ggboykxz/apex - • WSL2 recommended for best TUI experience
FreeBSD
- • Install via pip or pipx
- • Python 3.11+ from ports or pkg
- • CLI mode fully supported
- • TUI may require xterm compatibility
Upgrade & Troubleshooting
Upgrade
# pip
pip install --upgrade apex-ai
# pipx
pipx upgrade apex-ai
# uv
uv tool upgrade apex-ai
# Check version
apex --versionCommon Issues
"command not found: apex"
Ensure Python bin directory is in your PATH. Try: python -m apex.main
"Authentication failed"
Check your API key in ~/.apex/.env. Run echo $ANTHROPIC_API_KEY
Import errors on startup
Reinstall: pip install --force-reinstall apex-ai
Python version mismatch
Requires Python 3.11+. Check: python --version