Skip to content

Deploy from your machine

yofix deploy builds and deploys the code in your working directory right now. It does not need a git push, a connected repository, or even a commit. The CLI packages your source, uploads it, and waits for the build to finish.

This is the fastest way to preview a local change, and the building block for CI pipelines.

One-time setup

Link the directory to a project so the CLI knows where to deploy:

Terminal window
yofix link

This writes .yofix/project.json. You only do it once per project; later commands (including from subdirectories) find it automatically.

Deploy a preview

Terminal window
yofix deploy

You will see the source get packaged, uploaded, and built:

✔ Packaged 1.8 MB
✔ Uploaded — build queued
build: building
build: ready
✔ Deployed (preview) — ready
deployment: dpl_4f2a9c
url: https://your-branch.yofix.dev

By default the command blocks until the build reaches a terminal state and exits non-zero if the build fails, so you can chain it safely.

Deploy to production

Terminal window
yofix deploy --prod

What gets uploaded

In a git repository, the CLI archives the repository root and uses git ls-files so your .gitignore is honored exactly: tracked and untracked files ship, ignored files and node_modules do not. Rooting at the repo root means a monorepo app deployed from a subdirectory still ships the workspace root (yarn.lock, packages/*, turbo config) so the build can resolve workspace dependencies. The project’s configured root directory selects which app to build: run from a subdirectory, upload the repo root.

Outside a git repository, the CLI archives the current directory minus a small default exclude set (.git, node_modules, .yofix, .next, dist, .turbo, .cache).

To exclude additional paths, add a .yofixignore file (same syntax as .gitignore). Files at the archive root and at your working directory are both applied.

Recording metadata

The deploy is tagged with your current branch and commit so it shows up correctly in the activity feed. Override either:

Terminal window
yofix deploy --branch release/v2 --message "Hotfix: checkout total"

Not waiting (CI)

Return as soon as the build is queued instead of blocking:

Terminal window
yofix deploy --no-wait

The command prints the deployment ID and a follow command. Combine with --timeout to cap how long a waiting deploy will block:

Terminal window
yofix deploy --timeout 900 # give up waiting after 15 minutes

Flags

FlagDefaultDescription
--prodpreviewDeploy to production instead of a preview
-m, --message <message>commit messageDeploy message to record
--branch <branch>current git branchBranch label to record
--no-waitwaitsReturn as soon as the build is queued
--timeout <seconds>600Give up waiting after this many seconds

On failure the command exits 10 (YF_DEPLOY_BUILD_FAILED); on timeout it exits 8 (YF_TIMEOUT). See exit codes.

Watching and logs

Terminal window
yofix logs --follow # stream the latest build
yofix watch # block until the latest build for a branch finishes
yofix inspect dpl_4f2a9c --logs

Next