What is it?
What it is
fx is a tiny, open-source, embeddable coding agent CLI written in Zig, designed for research and integration into larger systems, offering a Unix‑shell‑like interface and model‑agnostic support for Vercel AI Gateway, OpenAI Codex, and Grok.
Why it exists
To provide a minimal, high‑performance AI‑assisted coding tool that can be used as a standalone CLI or embedded in other applications, avoiding heavyweight TUIs while giving developers fine‑grained control over prompts, permissions, and extensibility.
Who should use it
Developers and researchers building AI-powered coding workflows who want a lightweight, embeddable agent harness; teams integrating fx as a native binary or WebAssembly module into editors, CI pipelines, or custom tools via the Agent Client Protocol; users comfortable with a Unix-shell-style CLI rather than a heavy TUI; contributors working in Zig or those interested in studying a minimal, performance-oriented implementation.
Who should avoid it
Users seeking a polished, production-stable product (the project is explicitly experimental); developers who need a full IDE-like terminal UI with rich visualizations rather than a shell-like CLI; non-technical end users unfamiliar with command-line tools, OAuth provider logins, or configuring AI model subscriptions; organizations unwilling to accept experimental-software risk; contributors not willing to build with Zig 0.16.0+ from source.
Stars over time
+42 stars in the last 2 days
How it works
A quick walkthrough in plain English
How fx works
Step 1 of 3
You interact with it
Open fx, send a request, or connect it to your stack.
Features
Advantages
- High performance due to Zig implementation
- Extremely small binary footprint (7.8 MiB)
- Model-agnostic with multiple provider support
- Embeddable in other applications via WASM or native binary
- Open source under Apache-2.0 license
- Minimalist design avoids bloat of heavy TUIs
- Strong permission and session management
- Extensible through skills and MCP integration
- Experimental but actively developed with good docs
- Supports both local and cloud inference
Disadvantages
- Experimental status — use at own risk
- WebAssembly SDK is experimental
- Requires terminal familiarity for full utilization
- Young project may have missing features or bugs
- Building from source requires Zig 0.16.0+
- MCP trust approval can be manual and workspace-scoped
- Limited pre-built integrations compared to established IDEs
- Some advanced features (subagents, skills) have learning curve
- CLI-centric design may not suit GUI-oriented users
Installation
cloud
fx login fx setup # Optionally use provider-specific login: fx login codex fx login grok
native
curl -fsSL https://fx.sh/setup.sh | bash # Or build from source: git clone https://github.com/vercel-labs/fx.git cd fx zig build -Doptimize=ReleaseSafe ./zig-out/bin/fx
FAQ
How do I install fx?
Use the official setup script: `curl -fsSL https://fx.sh/setup.sh | bash`.
How do I sign in to fx with an AI provider?
Use `fx login` for Vercel AI Gateway, `fx login codex` for OpenAI ChatGPT subscription, or `fx login grok` for xAI. Sessions are stored locally (e.g., `~/.fx/chatgpt-auth.json` or `~/.fx/grok-auth.json`) and refreshed automatically.
How do I run fx from a project directory?
Navigate to your project folder and run `fx`. The current directory becomes the primary workspace. Use `/help` to browse interactive commands, and press Enter to queue a follow-up or Ctrl+Enter to steer the active turn at its next model boundary.
Can fx be embedded in other applications?
Yes, fx provides WebAssembly modules `createFxAgent()` and `createFxTerminal()` for JavaScript hosts, and `fx acp` for Agent Client Protocol integration with editors. The WebAssembly SDK is experimental.
How do I add external tools via MCP in fx?
Use `fx mcp add NAME COMMAND [ARGS...]` for local servers or `fx mcp add --transport http NAME URL` for Streamable HTTP. Pending servers require trust approval via `/mcp trust approve <server>` or `fx mcp trust approve <server>`.
How does fx handle permissions and safety reviews?
fx starts in `auto` mode where routine actions run directly. Unresolved actions receive one narrow safety review based on the request. Use `/permissions remember`, `/permissions`, and `/permissions revoke` to manage persistent rules. `--prompt-permissions` enables approval prompts when stdin is a TTY.
Featured in Videos
YouTube tutorials and walkthroughs for fx
Alternatives
Similar projects ranked by category, topics, and text overlap.