Skip to content

majmichu1/ApexCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ApexCode β€” The Ultimate AI Coding Agent

License: MIT Go Version

ApexCode combines the best features from Claude Code, OpenCode, Aider, Codex CLI, Gemini CLI, and more into a single, superior tool that outperforms all of them.

πŸš€ Features

Core Capabilities

  • Multi-Agent Swarms β€” Spawn sub-agents with isolated contexts for parallel task execution
  • MemPalace Memory System β€” Revolutionary memory architecture using the method of loci (Wings/Rooms/Halls/Drawers)
  • MCP Integration β€” Full Model Context Protocol support with 300+ existing integrations
  • LSP Code Intelligence β€” Language Server Protocol bridge for completions, diagnostics, and symbol navigation
  • Tree-Sitter Repo Map β€” AST-based codebase analysis with graph ranking
  • Git Safety System β€” Auto-stash, branch protection, pre-commit checks
  • Background Daemon β€” Persistent service with memory consolidation and proactive suggestions

LLM Provider Support

  • Cloud: OpenAI, Anthropic, Google, Groq, AWS Bedrock, Azure, OpenRouter
  • Local: LM Studio (priority), Ollama, any OpenAI-compatible server
  • Model Routing: Auto-select model based on task complexity
  • Fallback: Automatic provider failover

πŸ“¦ Installation

Quick Install

curl -fsSL https://apexcode.dev/install.sh | sh

Build from Source

git clone https://github.com/apexcode/apexcode.git
cd apexcode
go mod download
go build -o apex ./cmd/apex
sudo mv apex /usr/local/bin/

Homebrew (macOS/Linux)

brew tap apexcode/apexcode
brew install apexcode

🎯 Usage

Start Interactive Mode

apex

Run a Single Task

apex "fix the authentication bug in auth.py"

Initialize Project

apex --init

This creates a APEX.md file for project-specific context.

⌨️ Keyboard Shortcuts

Key Action
Enter Send message
Tab Toggle Plan/Build mode
Ctrl+C / Ctrl+Q Quit
? Toggle help

Plan Mode (Read-Only)

  • Analyze code without making changes
  • Ask questions about the codebase
  • Safe for exploring unfamiliar code

Build Mode (Read/Write)

  • AI can read and modify files
  • Execute commands and fix bugs
  • Full agent capabilities

πŸ”§ Configuration

Configuration is stored in ~/.config/apexcode/config.json:

{
  "provider": "openai",
  "providers": {
    "openai": {
      "api_key": "sk-...",
      "model": "gpt-4o"
    },
    "anthropic": {
      "api_key": "sk-ant-...",
      "model": "claude-sonnet-4-20250514"
    },
    "lmstudio": {
      "base_url": "http://localhost:1234/v1",
      "model": "local-model"
    }
  }
}

Or use environment variables:

export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export GOOGLE_API_KEY=...

🧠 MemPalace Memory System

ApexCode uses MemPalace (by Milla Jovovich) for persistent memory:

  • Wings β†’ Top-level categories (project, personal, topics)
  • Rooms β†’ Subtopics within wings
  • Halls β†’ Category metadata (facts, events)
  • Drawers β†’ Actual content chunks
  • Tunnels β†’ Cross-domain bridges between rooms
  • AAAK Compression β†’ Deterministic abbreviation scheme
  • Knowledge Graph β†’ Temporal fact tracking in SQLite
  • 170-Token Wake-Up β†’ Minimal context loading on startup

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Terminal UI (Bubble Tea)          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          Go Core (Agent Orchestrator)       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Agent Loop  β”‚ Tool Router  β”‚ Security β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚      TypeScript Plugin Runtime (Node)       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ MCP Servers β”‚ LSP Bridge   β”‚ Plugins  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          LLM Provider Abstraction           β”‚
β”‚  (OpenAI, Anthropic, Google, LM Studio,     β”‚
β”‚   Groq, Ollama, Bedrock, Azure, OpenRouter) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Comparison with Other Tools

Feature ApexCode Claude Code OpenCode Aider
Multi-agent swarms βœ… βœ… (hidden) ❌ ❌
MemPalace memory βœ… ❌ ❌ ❌
MCP integration βœ… βœ… βœ… ❌
LSP support βœ… βœ… βœ… ❌
Tree-sitter map βœ… ❌ ❌ βœ…
Local models (LM Studio) βœ… (priority) ❌ βœ… βœ…
Git safety βœ… βœ… ❌ βœ…
Background daemon βœ… βœ… (hidden) ❌ ❌
Plugin system βœ… Limited Limited ❌
Multi-provider βœ… All Anthropic only βœ… 75+ βœ… Many

🀝 Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests.

πŸ“ License

This project is currently closed-source. Future licensing plans are under consideration.

πŸ™ Acknowledgments

  • MemPalace by Milla Jovovich & Ben Sigman β€” Revolutionary memory architecture
  • Aider β€” Pioneer CLI coding assistant with tree-sitter repo maps
  • OpenCode β€” Open-source AI coding agent with excellent TUI
  • Claude Code β€” Inspired many features from the leaked source
  • Charmbracelet β€” Beautiful terminal UI libraries
  • Tree-sitter β€” Incremental parsing library

Built with ❀️ by the ApexCode team

About

A free plugin for opencode that reduces your token usage and introduces background activity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors