A tiny, open, native coding agent for the terminal.
ffx is a native coding agent written in Zig. It is a community fork of fx focused on provider freedom: use OpenAI, Anthropic, DeepSeek, OpenRouter, PPQ, MiniMax, Zhipu/GLM, Z.AI, OpenCode, or compatible custom endpoints without a mandatory Vercel login.
- Direct and custom AI providers.
- Persistent configuration in
~/.ffx/settings.json. /connect-providerfor adding a provider connection./switch-providerand/providerfor selecting the active provider./modelswith dynamic provider tabs, model discovery, and favorites.- Skills, subagents, MCP, and project instructions.
- A small native binary designed for embedding.
Build with Zig 0.16 or newer:
git clone https://github.com/afa7789/ffx.git
cd ffx
zig build --release=safe
./zig-out/bin/ffxOr use the installer:
curl -fsSL https://raw.githubusercontent.com/afa7789/ffx/main/setup.sh | bashffx
ffx ask "explain the changes in this repository"Inside a session:
/connect-provider
/switch-provider
/provider
/models
/help
For an OpenAI-compatible custom endpoint, use /connect-provider or set:
export FFX_PROVIDER_API_KEY="..."
export FFX_PROVIDER_BASE_URL="https://models.example.com/v1"
./zig-out/bin/ffxExisting settings are loaded from ~/.ffx/settings.json at startup and can be
changed without editing configuration files by hand. Older ~/.fx settings
are still accepted for migration, while new state is written to ~/.ffx.
The current directory becomes the primary workspace. Enter a prompt, or run
/help to browse interactive commands. Saved conversations can be listed and
resumed with ffx sessions and ffx session resume last.
Use /trace to create a private diagnostic, /feedback to open the feedback
form, and /permissions to inspect the active permission policy.
zig build
zig build test
zig fmt src/The landing page lives in web/index.html and is published
through GitHub Pages.