fx README

README проекта с github.com/vercel-labs/fx. Одним файлом markdown: README.md.

 ⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀
 ⠀⠀⠀⠀⠀⢰⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
 ⠀⠀⠀⣠⣶⣿⣿⣷⣶⡶⣶⣶⣆⠀⠀⠀⣴⣶⣶⠆
 ⠀⠀⠀⠉⢹⣿⣿⠉⠉⠀⠘⢿⣿⣧⣀⣾⣿⡿⠃⠀             Tiny, open, embeddable, native coding agent.
 ⠀⠀⠀⠀⣼⣿⡏⠀⠀⠀⠀⠀⠻⣿⣿⣿⠟⠀⠀⠀
 ⠀⠀⠀⢀⣿⣿⠃⠀⠀⠀⠀⢠⣦⠘⢿⣿⣷⡀⠀⠀             curl -fsSL https://fx.sh/setup.sh | bash
 ⠀⠀⠀⣸⣿⡟⠀⠀⠀⠀⣰⣿⣿⠗⠀⠻⣿⣿⣄⠀
 ⠀⠀⠀⣿⣿⠇⠀⠀⠀⠾⠿⠿⠋⠀⠀⠀⠘⠿⠿⠦             ⚠ Status: Experimental. Use at your own risk.
  ⠀⣸⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
 ⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

fx

fx is a minimal coding agent CLI that still comes with batteries included. It's one native binary written in Zig, so there is no runtime to install, and it runs the same on your laptop, in CI, or inside an agent sandbox. Its output is closer to a Unix shell than an IDE, because the conversation prints into your terminal's scrollback instead of filling the screen.

fx is meant to be embedded and extended. Scripts call it with fx ask, editors connect over the Agent Client Protocol (ACP), and JavaScript apps run the same agent core through libfx with their own tools. Skills, MCP servers, and your project's AGENTS.md add to what the agent knows and can do.

Vercel Labs Product fx CLI release License: Apache-2.0

Features

Install

curl -fsSL https://fx.sh/setup.sh | bash

fx runs on macOS and Linux, on x86_64 and arm64. The installer puts it in ~/.local/bin. fx checks for updates in the background, and fx upgrade installs the latest release right away. CHANGELOG.md lists what changed in each release. You can also try fx in your browser without installing anything.

Quick start

Sign in with one of these:

fx login                    # Vercel AI Gateway
fx login codex              # ChatGPT subscription
fx login grok               # Grok subscription
fx login vercel --api-key   # AI Gateway API key

Then open a project and start fx:

cd your-project
fx

Type what you want done and press Enter. /help lists the slash commands. If something doesn't work, run fx doctor to check your setup.

To send one request without the interactive shell, use fx ask. Add --json when a script needs to read the result:

fx ask "explain the changes in this repository"
fx ask --json "summarize the failing tests" | jq -r .final_output

Embed and extend

Surface Use it for
fx ask One request from a script or CI job. --json returns structured output, and --resume continues a saved session.
fx acp Editors and other Agent Client Protocol clients, over stdio.
libfx The agent core as a JavaScript library, built as a native Node.js addon and as WebAssembly. createFxAgent() runs an agent with your own tools, MCP clients, and skills, and createFxTerminal() embeds the fx terminal.

The libfx README and the libfx docs cover the API. The WebAssembly build is experimental.

The CLI also picks up these extensions:

Examples

examples/ has small libfx apps you can run with an AI Gateway API key:

Documentation

The manual at fx.sh/docs covers models, permissions, configuration, skills, MCP, sessions, and every CLI and slash command.

For coding agents

To learn fx, read the manual as Markdown. fx.sh/llms.txt indexes every page, fx.sh/llms-full.txt puts the whole manual in one file, and adding .md to any docs URL returns that page as Markdown. For the flags of the installed version, run fx <command> --help.

To run fx from your own tools, use fx ask. It takes the prompt as arguments or on stdin, writes its result to stdout and progress and diagnostics to stderr, and exits with a nonzero status when the request fails. With --json, the final answer is in final_output.

To inspect a user's setup, run fx status --json for configuration and runtime information, or fx doctor --json for health checks. Neither changes the setup.

fx ask uses the user's saved permission mode, which is auto unless they changed it. Pass --full-access only when the user asks for it, because it turns off fx's permission checks.

To change fx itself, read AGENTS.md first, then build and verify the change as described in Contributing.

Feedback

Run /feedback inside fx to open the feedback form, or open an issue. If something looks wrong in your terminal, /trace creates a private diagnostic trace that you can share as a link from fx.sh/share (share feedback).

Contributing

You need Zig 0.17.1 to build fx:

git clone https://github.com/vercel-labs/fx.git
cd fx
zig build
./zig-out/bin/fx

Test your changes with the freshly built ./zig-out/bin/fx, because a bare fx may be an older copy on your PATH.

zig build test runs the unit tests, which sit next to the code they cover. The end-to-end tests in tests/e2e/ drive the built binary through tmux and need Bun.

The source is laid out like this:

fx/
├── src/
│   ├── main.zig     entry point that wires everything together
│   ├── core/        agent loop, sessions, config, permissions, MCP, skills
│   ├── builtins/    built-in tool specs, providers, and the system prompt
│   ├── tools/       built-in tools: files, shell, web, skills, subagents
│   ├── ui/          terminal rendering and input
│   ├── gateway/     model provider transport
│   ├── mcp/         MCP engine
│   └── acp/         Agent Client Protocol server
├── sdk/             libfx, the JavaScript library
├── tests/           end-to-end tests and model evals
└── benchmarks/      startup, memory, and latency benchmarks

Read CONTRIBUTING.md before you open a pull request. It covers verification, CI, and PR labels. If a coding agent is helping you, point it at For coding agents.

Security

Report vulnerabilities through the contact page instead of a public issue.

License

Apache-2.0. Third-party licenses and attributions are in THIRD_PARTY_NOTICES.md.

Credits

Interface sounds by cuelume.

fx (vercel-labs/fx)

Ищем в базе…

3.9K ·GitHub
Что это?fx — харнесс и CLI для агента-кодера в духе Unix, написанный на Zig, созданный для исследований и встраивания в более крупные системы, с сильным упором на минимализм и производительность.
fx больше похож на утилиту Unix shell или на полноценный терминальный IDE?fx стремится ощущаться как команда Unix shell, а не тяжёлый терминальный IDE, сохраняя минималистичный стиль вывода CLI и форм-фактор.
Как начать работать с fx над проектом?Запустите бинарник fx из папки проекта; текущий каталог становится основным рабочим пространством, затем вы вводите промпт или выполняете /help, чтобы посмотреть команды.
Нужен ли API-ключ или можно использовать подписку ChatGPT или Grok?Можно войти с API-ключом Vercel AI Gateway, авторизоваться с подходящей подпиской ChatGPT через OpenAI Codex OAuth или с подходящей подпиской Grok через xAI OAuth.
Что будет, если сохранённая сессия fx повредится?Можно выполнить «fx session recover», чтобы скопировать валидированный префикс повреждённой сессии в новую, но записи после точки повреждения отбрасываются, а команды не выполняются повторно.
Можно ли встроить fx в другой продукт со своей аутентификацией?Да, хосты, подставляющие аутентификацию провайдера на сетевой границе, могут установить FXAUTHMODE=host-managed, и fx не будет сам читать, обновлять или записывать локальные учётные данные провайдеров моделей.
Насколько велик бинарник fx?Около 7.8 МиБ — это отражает фокус проекта на минимализме и производительности во всём: в системном промпте, инструментах и наборе функций.
Что происходит, когда разговор становится слишком длинным для контекстного окна модели?Как только активный запрос достигает 80% доступной ёмкости входа, fx автоматически суммирует сессию в свежее контекстное окно; то же переключение можно запустить вручную командой /compact.
При входе через ChatGPT или Grok мои токены идут через Vercel?Нет, токены OAuth и OpenAI Codex, и xAI Grok хранятся локально (в ~/.fx/chatgpt-auth.json или ~/.fx/grok-auth.json) и никогда не отправляются в Vercel AI Gateway или друг другу.
Что делает /trace, когда fx ведёт себя странно?Он создаёт приватный Markdown-диагностический файл с логами, контекстом сессии, состоянием рантайма, разрешениями и недавними событиями отрисовки, чтобы помочь отладить проблему.
Какие есть похожие проекты?casbin-gateway, Raven, mixdog, claw-code, operator-memory, MiMo-Code, endo, openrig
Автор
vercel-labs
Размер
116.9 MB
Звёзды
3.9K
Возраст
3 мес
Коммиты · 90 дней