moderato713 /
ai-agent
Production-grade terminal code agent (Python)
49/100 healthLoading repository dataโฆ
Ggboykxz / repository
Production-grade terminal AI coding agent with 85+ models support, multi-agent system, and rich terminal UI. Built in Gabon ๐ฌ๐ฆ for the world.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
The universal AI coding agent. Every model. One terminal.
Install ยท Docs ยท CLI ยท Security ยท Models ยท Sponsor
APEX runs any LLM in your terminal as a coding agent โ Anthropic, OpenAI, Google, Groq, Mistral, DeepSeek, Ollama (local), and 170+ more via litellm. Switch models mid-session. Track costs live. Never leave your terminal.
| APEX | OpenCode | Claude Code | Aider | |
|---|---|---|---|---|
| Every model (170+) | โ | โ ๏ธ | โ | โ ๏ธ |
| 11 specialized agents | โ | โ | โ | โ |
| Primary + Subagent system | โ | โ | โ | โ |
| Hierarchical JSON config | โ | โ | โ | โ |
| 12 themes (dark/light) | โ | โ | โ | โ |
| Session sharing (URL) | โ | โ | โ | โ |
| Auto-formatting | โ | โ | โ | โ |
| Custom commands (.md) | โ | โ | โ | โ |
| Switch model mid-session | โ | โ | โ | โ |
| Works offline (Ollama) | โ | โ | โ | โ |
| Leader key shortcuts | โ | โ | โ | โ |
| Command palette (Ctrl+P) | โ | โ | โ | โ |
| @file references / !bash | โ | โ | โ | โ |
| Beautiful Ink TUI + WebSocket EventBus |
# 1. Set your API key
export ANTHROPIC_API_KEY=sk-ant-...
# 2. Launch APEX (TUI auto-starts)
apex
# 3. Ask anything
> fix the authentication bug in auth.py
> add TypeScript types to all functions
> write tests for the payment module
apex --model gpt-4o # Start with GPT-4o
apex --model ollama-llama3 # Local, no API key needed
apex --agent architect # Start in read-only architect mode
apex --continue # Resume last session
apex --session mysession # Load a specific session
APEX features a modern terminal UI built with Ink (React for terminals). The TUI connects to the APEX backend via HTTP SSE for real-time token streaming, live cost tracking, and context percentage monitoring. The backend runs on a random localhost port with a WebSocket EventBus for real-time state synchronization, following the OpenCode architecture pattern.
apex # Launch TUI (default)
apex --model gpt-4o # Start with GPT-4o
| Key | Action |
|---|---|
Tab / Shift+Tab | Cycle agents |
Ctrl+P | Command palette |
Ctrl+K | Model selector |
Ctrl+X | Leader key (prefix) |
Ctrl+X N | New session |
Ctrl+X U | Undo |
Ctrl+X R | Redo |
Ctrl+X C | Compact context |
Ctrl+X M | List models |
Ctrl+X T | Theme selector |
Ctrl+X S | Status overview |
Ctrl+X A | Agent list |
Ctrl+X L | Sessions list |
Ctrl+X B | Toggle sidebar |
Ctrl+X E | Open editor |
Ctrl+X X | Export session |
Ctrl+X Q | Quit |
@ | File references (fuzzy search) |
! | Bash commands inline |
? | Help panel |
Ctrl+O | Toggle sidebar |
Ctrl+L | Clear messages |
Ctrl+T | Cycle reasoning variants |
Escape | Close overlay |
Ctrl+Q | Quit |
@filename!commandAPEX has 11 specialized agents organized by type:
| Agent | Color | Description |
|---|---|---|
| Coder | Cyan | Full-access development agent with all tools |
| Architect | Purple | Architecture analysis & design (read-only) |
| Planner | Yellow | Planning & strategy (read-only) |
| Shell | Orange | Infrastructure, DevOps, CI/CD |
| Agent | Description |
|---|---|
| @reviewer | Code review & audit specialist |
| @general | General-purpose multi-task assistant |
| @explore | Fast read-only codebase exploration |
| @scout | External docs & dependency research |
| Agent | Role |
|---|---|
| @compaction | Context window compression |
| @title | Session title generation |
| @summary | Session summary generation |
Custom agents via Markdown files in .apex/agents/*.md or ~/.config/apex/agents/*.md.
apex # Launch TUI (default)
apex run <prompt> # Non-interactive mode
apex serve # Start headless HTTP API server
apex web # Server + web interface
apex gateway start # Start APEX Gateway (proxy + auth + rate limits)
apex gateway key <tier> # Generate a gateway API key
apex gateway status # Show gateway keys and usage
apex auth login # Interactive provider login
apex auth list # List configured providers
apex auth logout # Remove provider config
apex agent create # Interactive agent wizard
apex agent list # List all agents
apex session list # List sessions
apex session delete <id> # Delete a session
apex stats # Token usage & cost stats
apex export <id> # Export session as JSON
apex import <file|url> # Import session
apex upgrade # Upgrade APEX
apex uninstall # Remove APEX
apex mcp add # Add MCP server
apex mcp list # List MCP servers
apex mcp auth <name> # Authenticate MCP server
apex db path # Show database path
apex pr <number> # Fetch & checkout PR
apex attach <url> # Attach to remote backend
apex connect # Interactive provider config
apex init # Initialize project
apex compact # Compact context
apex details # Toggle tool output
apex thinking # Toggle reasoning blocks
apex models [provider] # List models
apex --model <name> # Set model
apex --agent <name> # Set agent
apex --continue # Resume last session
APEX uses hierarchical JSON/JSONC config (like OpenCode):
# Global config
~/.config/apex/apex.json # Main config
~/.config/apex/tui.json # TUI-specific config
# Project config (overrides global)
./apex.json
./apex.jsonc
# Env vars (inline override)
APEX_CONFIG=./custom.json
APEX_CONFIG_CONTENT='{"model": "gpt-4o"}'
{
"$schema": "https://apex-ai.dev/config.json",
"model": "claude-sonnet-4-5",
"theme": "nord",
"agent": {
"code-reviewer": {
"description": "Reviews code for best practices",
"mode": "subagent",
"permission": { "edit": "deny" }
}
},
"command": {
"test": {
"template": "Run tests with coverage",
"description": "Run tests"
}
},
"permission": { "edit": "ask", "bash": "ask" },
"formatter": true,
"lsp": true,
"share": "manual",
"snapshot": true,
"server": { "port": 0, "hostname": "127.0.0.1" },
"watcher": {
"ignore": ["**/node_modules/**", "**/.git/**"]
}
}
{
"model": "{env:APEX_MODEL}",
"provider": {
"anthropic": { "apiKey": "{file:~/.secrets/anthropic-key}" }
}
}
.apex/commands/*.md12 built-in themes with dark/light mode support:
apex ayu catppuccin catppuccin-macchiato
everforest gruvbox kanagawa matrix
nord one-dark system tokyonight
# Via TUI
Ctrl+X T # Theme selector
# Via config
echo '{"theme": "nord"}' > ~/.config/apex/tui.json
Custom themes in ~/.config/apex/themes/*.json or .apex/themes/*.json.
Share conversations with your team:
/share # Create shareable URL โ https://apex-ai.dev/s/abc123
/unshare # Remove shared session
Modes: manual (default) | auto | disabled (set in config)
Auto-formatting support for 11 languages:
Python: ruff
JS/TS/JSON: prettier
Rust: rustfmt
Go: gofmt
Java: google-java-format
C/C++: clang-format
Ruby: rubocop
Scala: scalafmt
Kotlin: ktlint
Swift: swift-format
Zig: zig fmt
# Enable all formatters
echo '{"formatter": true}' > apex.json
# Per-formatter config
echo '{"formatter": {"prettier": {"disabled": true}}}' > apex.json
APEX includes comprehensive security features:
Blocks dangerous patterns: rm -rf /, curl | sh, fork bombs, disk writes.
Fine-grained ALLOW/DENY/ASK per tool with glob pattern support.
Database-backed rate limiting with workspace-based API keys.
Bearer token auth on all endpoints, configurable via config.
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
| 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 |
git clone https://github.com/Ggboykxz/APEX
cd APEX
pip install -e ".[dev]"
APEX Gateway is a built
Selected from shared topics, language and repository descriptionโnot editorial ratings.
moderato713 /
Production-grade terminal code agent (Python)
49/100 healthehtisham145 /
Autonomous CLI Coding Agent โ A production-grade, terminal-based AI coding assistant powered by the Groq API (Llama 3.3 70B). Built with Python, Typer, and Rich, it uses a ReAct (Reason + Act) loop with native tool-calling to read, write, and patch files,
59/100 health| โ |
| โ |
| โ |
| โ |
| Live token cost tracker | โ | โ | โ | โ |
| Shell security analysis | โ | โ | โ | โ |
| File watcher with ignores | โ | โ | โ | โ |
pip install | โ | โ | โ | โ |
| Built in Africa ๐ฌ๐ฆ | โ | โ | โ | โ |