Debuly
fx logo

fx

Small open-source coding agent CLI written in Zig, with shell-style output and a library for embedding the agent in other software.

Open source

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

  • Developers
  • DevOps engineers
  • Tool builders
  • AI researchers

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

  • Vercel AI Gateway
  • ChatGPT
  • Codex
  • Grok
  • OpenRouter
  • OpenAI
  • Anthropic

How to get started with fx

  1. Run the setup script from fx.sh to install the binary on macOS or Linux.
  2. Start fx in a project and choose a provider and model with /provider and /model.
  3. Work in the terminal conversation, or send one-shot prompts from scripts with fx ask.
  4. 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.

fx compared with its alternatives
ToolPricingStarting pricePlatforms
fxOpen source—CLI, macOS, Linux, API
AiderOpen source—CLI, Self-hosted, Web
Claude CodePaid—macOS, Linux, Windows, Web
Gemini CLIOpen source—CLI, macOS, Linux, Windows
OpenCodeFreemium$10/moCLI, Web
PiOpen source—CLI, macOS, Linux, Windows
Qwen CodeOpen source—CLI, macOS, Windows, Linux
  1. 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.

  2. Claude Code

    Anthropic's coding agent that fixes bugs, writes tests and runs migrations from your terminal, IDE, desktop app, web or Slack.

  3. 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.

  4. OpenCode

    Open-source AI coding agent for terminal, desktop and IDE, with optional low-cost Go model subscriptions and a team Console

  5. Pi

    Open-source, MIT-licensed terminal coding agent and TypeScript toolkit you extend with skills, extensions, prompt templates and themes.

  6. 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.

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.

SourceTypeAccessed
fx.shofficial
github.com/vercel-labs/fxrepository
fx.sh/docs/using-fx/usage-and-costsdocs
fx.sh/docs/configure-fx/modelsdocs
fx.sh/docs/lib/providersdocs
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.