Open-source AI coding assistant for VS Code and JetBrains with chat, agent, edit and autocomplete modes, now part of Cursor.

fx
Small open-source coding agent CLI written in Zig, with shell-style output and a library for embedding the agent in other software.
What is fx?
fx is a coding agent harness and command-line tool that its site describes as tiny, open and native. It is written in Zig and ships as a 6.66 MiB binary, and its output reads more like a Unix shell than an IDE, printing the conversation into your terminal. You install it with a one-line setup script on macOS or Linux, then pick a model with /model, adjust reasoning effort, and use /fast or the opt-in Ultrafast tier where supported. By default fx runs on Vercel's AI Gateway, but it can also run on a ChatGPT plan through Codex, a Grok plan, or any server that speaks the OpenAI Chat Completions API, including local models. The /usage command and fx usage report spend and tokens, and libfx lets JavaScript apps embed the same agent. fx is open source under Apache-2.0, so the tool is free and you pay only your model provider for usage.
Use cases
- Code with an agent in the terminal
- Call an agent from shell scripts
- Run coding tasks in CI pipelines
- Embed an agent in a JavaScript app
- Connect an editor over ACP
- Run an agent on a local model
- Review a branch with fx ask
Who it's for
Why use fx
- A single small binary with no runtime installs the same way on a laptop, a CI runner or a sandbox.
- Output that behaves like a shell keeps your terminal history and usual tools useful.
- Model-agnostic setup lets you move between hosted models, plan-based sign-in and local servers.
- Built-in usage commands show spend and tokens without leaving the terminal.
- libfx lets teams embed the same agent core in their own software.
fx features
- Single native binary written in Zig
- Shell-style output in terminal scrollback
- Model picker with per-provider memory and reasoning effort
- Fast mode and opt-in Ultrafast tier for eligible OpenAI models
- Runs on AI Gateway, ChatGPT or Grok plans, or custom OpenAI-compatible servers
- Subagents with their own model and effort
- Provider order and strict routing through AI Gateway
- Usage reporting with /usage, fx usage and fx credits
- libfx library for embedding the agent in JavaScript apps
- Scriptable one-shot prompts with fx ask and JSON output
fx integrations
How to get started with fx
- Run the setup script from fx.sh to install the binary on macOS or Linux.
- Start fx in a project and choose a provider and model with /provider and /model.
- Work in the terminal conversation, or send one-shot prompts from scripts with fx ask.
- Check spend with /usage or fx usage, and embed the agent in your own app through libfx when you need to.
fx limitations
- Command-line only, with no graphical interface
- Model usage is billed by your chosen provider, not by fx
- Ultrafast costs more and works only with eligible OpenAI models through AI Gateway
- Installer supports macOS and Linux
fx pricing
fx is open source, so you can use and self-host it for free.
Prices can change and may vary by country or exclude tax. Check the official pricing page.
fx alternatives
The main fx alternatives listed on Debuly are Claude Code, Gemini CLI, Aider, OpenCode, Pi and Qwen Code. The table compares pricing and platforms; order is A–Z.
| Tool | Pricing | Starting price | Platforms |
|---|---|---|---|
| fx | Open source | — | CLI, macOS, Linux, API |
| Aider | Open source | — | CLI, Self-hosted, Web |
| Claude Code | Paid | — | macOS, Linux, Windows, Web |
| Gemini CLI | Open source | — | CLI, macOS, Linux, Windows |
| OpenCode | Freemium | $10/mo | CLI, Web |
| Pi | Open source | — | CLI, macOS, Linux, Windows |
| Qwen Code | Open source | — | CLI, macOS, Windows, Linux |
Aider
Open-source AI pair programming tool that runs in your terminal and edits code in your local git repository using the LLM you choose.
Open sourceVisit Aider (official site)
Claude Code
Anthropic's coding agent that fixes bugs, writes tests and runs migrations from your terminal, IDE, desktop app, web or Slack.

Gemini CLI
Open-source command-line agent from Google that runs Gemini models in your terminal to read, edit and automate work in local projects.
Open sourceVisit Gemini CLI (official site)
OpenCode
Open-source AI coding agent for terminal, desktop and IDE, with optional low-cost Go model subscriptions and a team Console
FreemiumVisit OpenCode (official site)
Pi
Open-source, MIT-licensed terminal coding agent and TypeScript toolkit you extend with skills, extensions, prompt templates and themes.
Open sourceVisit Pi (official site)
Qwen Code
Free open-source coding agent from the Qwen team that runs in a terminal, IDE, desktop app or chat and works with many model providers.
Open sourceVisit Qwen Code (official site)
fx FAQ
How much does fx cost?
fx itself is free under the Apache-2.0 license. You pay your model provider for usage, for example through AI Gateway, a ChatGPT plan or a Grok plan.
Is fx open source?
Yes. The site describes it as open source under Apache-2.0, model-agnostic and suitable for local and cloud inference.
Which models and providers does fx support?
By default it runs on AI Gateway. It can also use a ChatGPT plan through Codex, a Grok plan, or any OpenAI Chat Completions-compatible endpoint, for example a local model server.
Can I use fx in scripts or from my app?
Yes. fx ask runs one-shot prompts from scripts, and the libfx library lets JavaScript apps create the same agent with their own credentials and tools.
How do I see what fx costs me?
Use /usage inside fx or run fx usage in a terminal to see spend, requests and tokens from your provider, and fx credits to check an AI Gateway balance.
What are alternatives to fx?
Other terminal coding agents include Claude Code, Gemini CLI, Aider and Pi.
Sources & verification
Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.
| Source | Type | Accessed |
|---|---|---|
| fx.sh | official | |
| github.com/vercel-labs/fx | repository | |
| fx.sh/docs/using-fx/usage-and-costs | docs | |
| fx.sh/docs/configure-fx/models | docs | |
| fx.sh/docs/lib/providers | docs | |
| fx.sh/ | official |
Image credits
- Logo: from fx.sh · fetched · Vendor trademark, used only to identify the product; removed on request
- Cover: none collected yet, so a generated tile is shown.
Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.




