Skip to main content

Universal AI coding agent — every model, one terminal

Project description

◆ APEX

The universal AI coding agent. Every model. One terminal.

PyPI version Python 3.11+ License: MIT Docker Stars


Install · Docs · Security · Models · Sponsor


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:

# Launch the TUI
apex --tui

# Or via npm
bun run tui

# Or directly
cd tui-frontend && bun run start

Keybindings

Key Action
Tab Switch agent
Ctrl+K Model selector
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.
  • 75+ Tools: File, Code, Shell, Git, Web, Database, Docker, K8s, Cloud, Security
  • MCP/LSP: Server status monitoring
  • Theme: Dark (#0d1117), Cyan (#00e5ff), Green (#00ff88)

🔒 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 deletion
  • curl | 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
Homebrew brew 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

Sponsor APEX →


🤝 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

MIT — built with ❤️ in Gabon 🇬🇦 by @Ggboykxz


If APEX helps you, please ⭐ the repo — it means everything to an indie developer.

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

apex_ai-1.0.0.tar.gz (222.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apex_ai-1.0.0-py3-none-any.whl (155.4 kB view details)

Uploaded Python 3

File details

Details for the file apex_ai-1.0.0.tar.gz.

File metadata

  • Download URL: apex_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 222.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for apex_ai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5dbe9b69ffca46b4ac66bd6dd1cb871fcfa52d3071e17ed77a7a16b7987beae5
MD5 42cf458454ecfdc01b6a1ab2b07980f3
BLAKE2b-256 9b4a098666427b5288e095c645079eb7034def9ce015d384f67edfc24d0e13c9

See more details on using hashes here.

File details

Details for the file apex_ai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: apex_ai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 155.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for apex_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1129a77234efb4e176c59479bb81cf19c8ec6bea51785911fc889825c3fb3c9
MD5 4aa56910e0e3dabc1dd0fd305f4818d9
BLAKE2b-256 6be4c7c86f702d48d78ef5fc14c723ace01116b05b85a659846c881e63751507

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page