``` ⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢰⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⣠⣶⣿⣿⣷⣶⡶⣶⣶⣆⠀⠀⠀⣴⣶⣶⠆ ⠀⠀⠀⠉⢹⣿⣿⠉⠉⠀⠘⢿⣿⣧⣀⣾⣿⡿⠃⠀ Tiny, open, embeddable, native coding agent. ⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⠻⣿⣿⣿⠟⠀⠀⠀ ⠀⠀⠀⢀⣿⣿⠃⠀⠀⠀⠀⢠⣦⠘⢿⣿⣷⡀⠀⠀ curl -fsSL https://fx.sh/setup.sh | bash ⠀⠀⠀⣸⣿⡟⠀⠀⠀⠀⣰⣿⣿⠗⠀⠻⣿⣿⣄⠀ ⠀⠀⠀⣿⣿⠇⠀⠀⠀⠾⠿⠿⠋⠀⠀⠀⠘⠿⠿⠦ ⚠ Status: Experimental. Use at your own risk. ⠀⣸⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ``` fx is a coding agent CLI written in Zig: a small native binary that is open source (Apache-2.0), model-agnostic, and embeddable as a harness in larger systems. Its interface stays closer to a Unix shell than an IDE in the terminal. ## Highlights - **Any model:** Vercel AI Gateway, ChatGPT or Grok subscriptions, or your own OpenAI-compatible endpoint such as Ollama or OpenRouter - **Any interface:** interactive shell, one-shot `fx ask` for scripts, or embedded through libfx and ACP - **Shell-like output:** inline rendering that preserves your terminal scrollback - **Extensible:** skills, MCP servers, and subagents

Vercel Labs Product fx CLI release License: Apache-2.0

## Install ```bash curl -fsSL https://fx.sh/setup.sh | bash ``` ## Get started Sign in with one of: - `fx login`: Vercel AI Gateway - `fx login codex`: ChatGPT subscription (OpenAI Codex OAuth) - `fx login grok`: Grok subscription (xAI OAuth) - `fx setup`: AI Gateway API key Then start the interactive shell from a project: ```bash cd your_project fx ``` Or make a one-shot request: ```bash fx ask "explain the changes in this repository" ``` Inside the shell, run `/help` to browse interactive commands. ## Documentation Visit [fx.sh/docs](https://fx.sh/docs) for the full manual: sessions, models, custom model connections, permissions, configuration, skills, MCP, subagents, embedding, and the complete CLI and slash command references. Agents can read any page as Markdown by appending `.md` to its URL, or fetch [llms-full.txt](https://fx.sh/llms-full.txt) for everything in one file. ## Custom model connections Add named connections for any OpenAI Chat Completions endpoint, including local servers such as Ollama and gateways such as OpenRouter, in `~/.fx/settings.json`, then select one for the profile or a single invocation: ```bash fx provider local FX_PROVIDER=openrouter FX_MODEL=openai/gpt-4.1 fx ask "review this change" ``` See [Custom model connections](https://fx.sh/docs/configure-fx/custom-model-connections) for connection JSON, model metadata, and behavior details. ## Themes fx ships with `fx-dark` and `fx-light` and follows your terminal's light or dark mode. Pin a variant with `FX_THEME=light` or `FX_THEME=dark`, or drop a VS Code format theme at `~/.fx/themes/.json` and select it with the `theme` setting or `FX_THEME=` per launch. See [Configuration](https://fx.sh/docs/configure-fx/configuration) for all environment variables. ## Embed fx fx builds as a native binary or WebAssembly. Applications embedding fx can provide network transport, session storage, configuration, permission handling, and terminal I/O. | Surface | Use | | --- | --- | | `fx acp` | Connect the native agent to editors and other Agent Client Protocol clients. | | `createFxAgent()` | Embed the agent core in a JavaScript host with `fx-core.wasm`. | | `createFxTerminal()` | Embed the interactive terminal with `fx-term.wasm`. | The SDK is published to npm as [libfx](https://www.npmjs.com/package/libfx). See the [WebAssembly SDK](sdk/README.md) and the runnable Node.js, browser, Next.js, and Nuxt [examples](examples/README.md). The WebAssembly SDK is experimental. ## Build from source Building fx requires [Zig 0.16.0+](https://ziglang.org/download/): ```bash git clone https://github.com/vercel-labs/fx.git cd fx zig build -Doptimize=ReleaseSafe ./zig-out/bin/fx ``` Run the test suite with `zig build test`. See [CONTRIBUTING.md](CONTRIBUTING.md) for development and contribution guidelines. ## Security Report security vulnerabilities through the [contact page](https://fx.sh/contact) instead of a public issue. ## License [Apache-2.0](LICENSE). Third-party licenses and attributions are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). ## Credits Interface sounds by [cuelume](https://github.com/Danilaa1/cuelume).