░█▀█░█▀▀░█▀▀░
░█▀█░█░░░█▀▀░
░▀░▀░▀▀▀░▀▀▀░
English | 中文
A terminal-based AI coding agent built with C++17. It provides an interactive TUI (Terminal UI) powered by FTXUI, supporting tool-use workflows through OpenAI-compatible APIs or GitHub Copilot.
- Interactive TUI -- FTXUI-based terminal interface with streaming responses, input history, and mouse support
- Agent Loop -- Multi-turn conversation with automatic tool calling and user confirmation
- Dual Provider
- OpenAI-compatible -- Connect to any API that implements the OpenAI chat completions interface (local LLMs, cloud endpoints)
- GitHub Copilot -- Device-flow OAuth authentication with token persistence
- Built-in Tools
Bash-- Execute shell commandsFileRead/FileWrite/FileEdit-- Read, create, and patch filesGrep-- Regex search across filesGlob-- Find files by glob pattern
- Cross-platform -- Windows and Linux/macOS support
- CMake >= 3.20
- C++17 compiler (MSVC 2019+, GCC 9+, Clang 10+)
- Git
- vcpkg
# Fetch the FTXUI submodule used by the local overlay port
git submodule update --init --recursive
# Install dependencies for your target triplet
<vcpkg-root>/vcpkg install \
cpr \
nlohmann-json \
ftxui \
--triplet <triplet> \
--overlay-ports=$PWD/ports
# Configure (adjust toolchain path and triplet as needed)
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=<triplet> \
-DVCPKG_OVERLAY_PORTS=$PWD/ports
# Build
cmake --build build --config ReleaseCommon triplets:
x64-linuxarm64-linuxx64-windowsx64-osxarm64-osx
The executable will be output to build/acecode on Ninja single-config builds, or under build/<config>/ on multi-config generators.
The repository includes .github/workflows/package.yml, which builds and uploads artifacts for:
- Linux x64
- Linux arm64
- Windows x64
- macOS x64
- macOS arm64
You can trigger it manually with Actions > package > Run workflow, or let it run automatically on pull requests, pushes to main, and version tags (v*).
On Windows, cpr depends on libcurl which must be >= 8.14 for proper TLS certificate handling. The CMake build will fail early if it detects an older version. Make sure your vcpkg checkout is recent enough.
Config file location: ~/.acecode/config.json (created automatically on first run).
{
"provider": "copilot",
"openai": {
"base_url": "http://localhost:1234/v1",
"api_key": "your-api-key",
"model": "local-model"
},
"copilot": {
"model": "gpt-4o"
}
}| Field | Description |
|---|---|
provider |
"copilot" or "openai" |
openai.base_url |
API endpoint URL |
openai.api_key |
API key for the endpoint |
openai.model |
Model name to request |
copilot.model |
Copilot model name (default gpt-4o) |
./build/Release/acecodeMIT
