CLI overview
The YoFix CLI (yofix) lets you deploy preview environments, run visual
regression tests, manage environment variables, and read build logs from
your terminal or CI, without opening the dashboard and without a git push.
npm install -g @yofix/cliyofix logincd your-project && yofix deployEvery command also speaks JSON, so the same binary that you use by hand drives your CI pipeline and AI agents. See Agents, JSON and MCP.
Install
npm install -g @yofix/cliThe package name is @yofix/cli and it installs a single binary, yofix.
You can install it with any package manager:
npm install -g @yofix/cli # npmpnpm add -g @yofix/cli # pnpmyarn global add @yofix/cli # yarnRequires Node.js 20 or newer. To run it once without installing:
npx @yofix/cli deployUpdate
Check whether a newer version is published, and upgrade with the same command you installed with:
yofix update # report the latest versionnpm install -g @yofix/cli # upgrade in placeyofix update --check reports only, which is useful in scripts that want
to warn without printing an upgrade command.
Check the version
yofix --version # prints the version and exitsyofix version # same, but supports --jsonThe basic flow
Most sessions look like this:
yofix login # authenticate (browser device flow)cd ~/code/your-projectyofix link # link this directory to a YoFix projectyofix deploy # package and deploy a previewyofix deploy --prod # ship to productionyofix logs --follow # stream the latest buildyofix link writes a small .yofix/project.json so later commands know
which project you mean. The CLI walks up from your working directory to
find it, the same way git finds .git, so subdirectories of a linked
repo work too.
Global options
These flags work on every command. The full table, the JSON envelope, and exit codes live in Global options and output.
| Flag | What it does |
|---|---|
--json | Emit a machine-readable JSON envelope on stdout |
--cwd <dir> | Run as if from a different working directory |
--team <slug> | Override the active team for this command |
--project <slug> | Override the linked project slug |
--token <token> | Use this bearer token instead of stored credentials |
-y, --yes | Skip confirmation prompts |
--no-input | Fail instead of prompting when input is required |
--debug | Show stack traces and verbose error context |
--host <url> | Override the API host (default https://app.yofix.ai) |
Getting help
yofix --help # top-level command listyofix deploy --help # flags and arguments for one commandyofix doctor # diagnose setup issues (Node, keychain, API)yofix status # auth, linked project, API reachabilityNext
- Authentication: log in, use tokens, and run in CI.
- Deploy from your machine: the full deploy workflow.
- Command reference: every command and flag.