Universal AI coding agent — every model, one terminal
Project description
◆ APEX
The universal AI coding agent. Every model. One terminal.
APEX runs any LLM in your terminal as a coding agent — Anthropic, OpenAI, Google, Groq, Mistral, DeepSeek, Ollama (local), and 100+ more via litellm. Switch models mid-session. Track costs live. Never leave your terminal.
✨ Why APEX?
| APEX | OpenCode | Claude Code | Aider | |
|---|---|---|---|---|
| Every model (100+) | ✅ | ⚠️ | ❌ | ⚠️ |
| Switch model mid-session | ✅ | ❌ | ❌ | ❌ |
| Works offline (Ollama) | ✅ | ❌ | ❌ | ✅ |
| Beautiful TUI | ✅ | ✅ | ✅ | ❌ |
| File tree + tool log | ✅ | ❌ | ❌ | ❌ |
| Command palette (⌘K) | ✅ | ❌ | ❌ | ❌ |
| Live token cost tracker | ✅ | ❌ | ❌ | ✅ |
| Session persistence | ✅ | ❌ | ✅ | ❌ |
| Shell security | ✅ | ❌ | ❌ | ❌ |
| OpenTUI + React TUI | ✅ | ❌ | ❌ | ❌ |
| 6 themes (dracula, nord, etc.) | ✅ | ❌ | ❌ | ❌ |
| Permission system | ✅ | ❌ | ❌ | ❌ |
| Rate limiting | ✅ | ❌ | ❌ | ❌ |
| API key management | ✅ | ❌ | ❌ | ❌ |
pip install |
✅ | ❌ | ❌ | ✅ |
| Built in Africa 🇬🇦 | ✅ | ❌ | ❌ | ❌ |
🎨 TUI
APEX features a modern terminal UI built with OpenTUI + React. The TUI connects to the APEX backend via HTTP SSE for real-time token streaming, live cost tracking, and context percentage monitoring.
# Launch the TUI (starts backend HTTP server + Bun frontend automatically)
apex --tui
Keybindings
| Key | Action |
|---|---|
Tab |
Switch agent |
Ctrl+K |
Model selector |
Ctrl+L |
Clear messages + reset metrics |
Ctrl+O |
Toggle sidebar |
Ctrl+T |
Toggle tools panel |
? |
Help panel |
Escape |
Close overlay |
Ctrl+Q |
Quit APEX |
Features
- 5 Agents: Coder, Architect, Reviewer, DevOps, Analyst
- 100+ Models: OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, xAI, etc.
- Live Metrics: Token streaming (prompt/completion), per-message cost, total spent, context %
- Agent Theming: Title bar, status bar, and borders change color per agent
- 75+ Tools: File, Code, Shell, Git, Web, Database, Docker, K8s, Cloud, Security
- MCP/LSP: Server status monitoring
- HTTP Backend: Local SSE server on port 8080, error banners with auto-dismiss
🔒 Security
APEX includes comprehensive security features to protect your system:
Shell Command Analysis
APEX analyzes shell commands before execution and blocks dangerous patterns:
from apex.shell_security import shell_analyzer
analysis = shell_analyzer.analyze("rm -rf /tmp/test")
# safe: False, category: DANGEROUS, warnings: [...]
Blocked patterns:
rm -rf /— System-wide deletioncurl | sh— Download and execute- Fork bombs, direct disk writes
Permission System
Ruleset-based permission control for tool execution:
from apex.permission import permission_manager, PermissionAction
# Add custom rules
permission_manager.add_rule("run_command", PermissionAction.ASK)
# Check permission
can_execute, reason = permission_manager.can_execute_tool("run_command")
Rate Limiting & API Keys
Database-backed rate limiting with workspace-based API keys:
from apex.rate_limiter import create_rate_limiter
from apex.api_key import create_key_manager
limiter = create_rate_limiter(use_sqlite=True)
manager = create_key_manager()
# Create API key
workspace = manager.create_workspace("my-project", "user_123")
api_key, info = manager.create_key(workspace.workspace_id, "prod")
HTTP API Security
from apex.http_api import HTTPServer
server = HTTPServer(
host="127.0.0.1",
port=8080,
require_auth=True, # API key required
)
See SECURITY.md for full documentation.
⚡ Installation
One-line install (recommended)
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Ggboykxz/APEX/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/Ggboykxz/APEX/main/install.ps1 | iex
Package managers
| Method | Command |
|---|---|
| uv (fastest) | uv tool install apex-ai |
| pipx (isolated) | pipx install apex-ai |
| pip | pip install apex-ai |
| Docker | docker run -it -v $(pwd):/workspace ghcr.io/ggboykxz/apex |
From source
git clone https://github.com/Ggboykxz/APEX
cd APEX
pip install -e ".[dev]"
GitHub Codespaces
APEX is pre-configured in .devcontainer.json — just open the repo in Codespaces!
🚀 Quick Start
# 1. Set your API key
export ANTHROPIC_API_KEY=sk-ant-...
# 2. Launch APEX
apex
# 3. Ask anything
> fix the authentication bug in auth.py
> add TypeScript types to all functions
> write tests for the payment module
Switch models anytime:
apex --model gpt-4o # Start with GPT-4o
apex --model gemini-2 # Start with Gemini 2
apex --model ollama-llama3 # Local, no API key needed
apex --tui # Launch with Terminal UI
🤖 Supported Models
Anthropic (Claude)
export ANTHROPIC_API_KEY=sk-ant-...
apex --model claude-sonnet # Recommended
apex --model claude-opus # Most powerful
apex --model claude-haiku # Fastest
OpenAI
export OPENAI_API_KEY=sk-...
apex --model gpt-4o
apex --model o1
apex --model o3-mini
Google Gemini
export GEMINI_API_KEY=...
apex --model gemini-2
apex --model gemini-flash
Groq (Ultra-fast inference)
export GROQ_API_KEY=gsk_...
apex --model llama-groq
apex --model mixtral-groq
🔒 Ollama (100% local, no API key)
# Install Ollama first: https://ollama.com
ollama pull llama3
apex --model ollama-llama3 # No API key needed!
DeepSeek
export DEEPSEEK_API_KEY=...
apex --model deepseek-chat
apex --model deepseek-coder
Meta Llama
apex --model llama-3
apex --model llama-3.1
Mistral & Mixtral
export MISTRAL_API_KEY=...
apex --model mistral
apex --model mixtral
Qwen
apex --model qwen2
apex --model qwen2.5
🛠️ What APEX Can Do
- Read & edit files — understands your whole codebase
- Run commands — tests, builds, installs, git
- Search code — grep-style across your project
- Fix bugs — diagnoses, patches, and verifies
- Write features — complete implementations
- Refactor code — preserves your style
- Write tests — pytest, jest, go test, and more
- Explain code — line by line if needed
🎨 Configuration
# ~/.apex/config.json
{
"model": "claude-sonnet",
"theme": "apex-dark",
"auto_commit": false,
"max_tool_rounds": 20
}
# .env (project or ~/.apex/.env)
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GROQ_API_KEY=gsk_...
💖 Sponsors
APEX is free and open source. If it saves you time, consider sponsoring.
🥇 Gold Sponsors
Your logo here — become a sponsor
🥈 Silver Sponsors
Your logo here
🥉 Individual Backers
🤝 Contributing
git clone https://github.com/Ggboykxz/APEX
cd APEX
pip install -e ".[dev]"
pytest
bun run tui:dev # Launch TUI in dev mode
See CONTRIBUTING.md for guidelines.
📄 License
Proprietary — All rights reserved by Ggboykxz.
See LICENSE for full terms. This software is not open source — plagiarism, repackaging, or claiming APEX code as your own is prohibited and may constitute copyright infringement.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apex_ai-1.2.0.tar.gz.
File metadata
- Download URL: apex_ai-1.2.0.tar.gz
- Upload date:
- Size: 313.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12f639dcb537a1ef6e1d93b704b3f911318a965c8907dd55dea586fe80b23dc8
|
|
| MD5 |
f2923e6a79f65caedd4b7cbd808a50fb
|
|
| BLAKE2b-256 |
9a2e53a31e1ea1524bab0f8e464e1965ae9a594bbd0b7ba3f213369cb65a9c73
|
File details
Details for the file apex_ai-1.2.0-py3-none-any.whl.
File metadata
- Download URL: apex_ai-1.2.0-py3-none-any.whl
- Upload date:
- Size: 160.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e759a75f9c6b76b6e338f149d4e861bba65f4c02e57b5fb3d71b3f8c25cb2300
|
|
| MD5 |
339c003cd5600ca350a7b2c2349f2fa5
|
|
| BLAKE2b-256 |
dfbc8e00a8f591c983ca64db62c187f3698e6be0cce2f5ba8f948008a7c7ecae
|