Buildfyio CLI
Install
npm i -g @fyio/buildfyio-cli # binary: buildfy buildfy login
Deploy
cd my-app buildfy link # link this directory to a project buildfy deploy # production deploy of the current branch buildfy deploy --preview # preview deploy buildfy deploy --branch dev # deploy a specific branch
Logs
buildfy logs # latest deployment, build stream buildfy logs dpl_abc123 --stream deploy # build | deploy | runtime
Why a build failed
Returns the failure reason, the diagnosis with a suggested fix, and only the error lines. Reach for this before buildfy logs — the raw log runs to thousands of lines and the root cause is rarely in the tail. With --json it is meant to be piped straight into an AI agent.
buildfy errors # newest failed deployment buildfy errors dpl_abc123 # a specific one buildfy errors --json # machine-readable, for agents and CI
Environment variables
buildfy env pull --env production --file .env.local buildfy env pull --no-secrets # skip secret-marked values buildfy env push --env preview --file .env.local buildfy env push --secret # store every new variable as a secret (default: guess by name) buildfy env set DATABASE_URL=postgres://... --secret
Multi-app projects
A project can hold several apps (the project itself is the primary app). Name the app explicitly: the primary app often shares the project name, and a domain bound to the wrong app serves the wrong site.
buildfy components ls # apps and their root dirs buildfy deploy --app web # deploy ONE app; plain deploy releases every app buildfy project show buildfy project set --production-branch main --auto-deploy on
Domains
buildfy domains ls buildfy domains add app.example.com --app web # asks for the app if you omit --app buildfy domains verify app.example.com buildfy domains redirect example.com www.example.com # 301, same path; --off removes buildfy domains rm old.example.com
Cron jobs
Schedules are UTC. The runner calls the path on the public URL and sends Authorization: Bearer $CRON_SECRET when that env var is set.
buildfy cron ls buildfy cron add nightly "0 3 * * *" /api/cron/nightly --method GET buildfy cron runs nightly # time, HTTP status, duration, error buildfy cron set nightly --schedule "30 3 * * *" --disable buildfy cron rm nightly
API tokens and CI
Tokens are the same ones as Dashboard → Settings → Tokens. In CI, set BUILDFY_TOKEN and skip buildfy login entirely.
buildfy tokens create --name ci --scopes read,deploy --expires 90d buildfy tokens create --name agent --scopes read,env:read --org my-team # one workspace only buildfy tokens ls buildfy tokens revoke apt_… # CI: no login step BUILDFY_TOKEN=bfy_… buildfy deploy --prod --branch main
Wire up an AI agent
Registers Buildfyio as an MCP server in your agent and mints a scoped token for it.
buildfy mcp install claude-code # or: claude-desktop | cursor | windsurf buildfy mcp install cursor --scopes read,deploy
Self-hosted / custom API
Point the CLI at another Buildfyio API with BUILDFY_API_URL (defaults to https://api.buildfyio.com).