fx logo

fx

Unix like coding agent

ZigAI AgentsZigApache-2.0 2.6k 304
Website GitHub

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

2.6k2.6k
Aug 30, 2026Sep 1, 2026

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

Tiny embeddable native coding agent
Minimalist Unix-shell-like CLI output
7.8 MiB binary size
Model-agnostic support (OpenAI Codex, xAI Grok, Vercel AI Gateway)
Embeddable as native binary or WebAssembly (fx-core.wasm, fx-term.wasm)
ACP (Agent Client Protocol) for editor integration
Extensible via skills, MCP servers, and subagents
Permission system with auto-review and persistent rules
Session management with tab titles and resume capability
Trace and diagnostic generation
JSON and quiet output modes
Durable terminal sessions with bounded-read handles

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.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for fx

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
fx | MushyBook