Skip to content
Start free

yoyo CLI

The yoyo CLI lets you deploy from your terminal instead of the web editor — ideal for projects you already keep in a local folder or a Git repo, and for AI coding agents that need a single command to publish.

To give an agent tools instead of a terminal, use the Yoyo MCP server.

On macOS or Linux, run the install script:

Terminal window
curl -fsSL https://yoyo.codes/install.sh | sh

It downloads the build for your OS and CPU, verifies its checksum, and puts yoyo in ~/.local/bin. Run it again to upgrade. Set YOYO_INSTALL_DIR to install somewhere else, or YOYO_VERSION to pin a version.

Or use a package manager — Homebrew:

Terminal window
brew install yoyo-codes/tap/yoyo

mise:

Terminal window
mise use -g github:yoyo-codes/cli

On Windows, download the zip from the releases page and put yoyo.exe on your PATH.

Create an API token in Yoyo (Settings → API Tokens), then:

Terminal window
yoyo auth # prompts for the token
yoyo auth --token <TOKEN> # non-interactive

Or skip auth and set YOYO_TOKEN in the environment — handy for CI and agents.

From a folder that isn’t linked to a Yoyo project yet, give it a name — the CLI creates the project and deploys in one step:

Terminal window
yoyo deploy --name my-demo

…and you’re live at my-demo-<username>.yoyo.codes. After the first deploy the folder is linked, so later deploys are just:

Terminal window
yoyo deploy

New projects are public. Add --private to create a private project instead — that needs Pro.

Other ways to start:

  • yoyo init — create a project for the current folder interactively.
  • yoyo link <project-name> — link the folder to a project you already created in the editor.
Command / flag What it does
yoyo deploy ./dist Deploy a specific directory (e.g. build output)
--dry-run Show what would be uploaded or deleted
--no-delete Don’t delete remote files missing locally
--force, -f Send every file, not just the ones that changed
--private Create the new project as private (requires Pro)
--json Machine-readable output (for agents and scripts)
yoyo watch Re-deploy automatically as files change
yoyo status Show the linked project and pending changes
yoyo open Open the project in your browser

yoyo deploy sends your changes in as few requests as it can: up to 100 files or about 4 MB each, so a 300-file site goes up in three or four requests, well inside the API’s rate limit. Assets go first and HTML pages last, so a page never goes live before the files it loads. Deletions are sent with the last request.

Before sending anything, the CLI checks your plan’s per-file and storage limits, so a deploy that would fail doesn’t change half your site. If a request does fail partway (a dropped connection, say), the files already sent stay live: run yoyo deploy again and it sends only what’s left.

yoyo deploy --json prints one object:

{
"success": true,
"project": { "id": "…", "name": "my-demo", "url": "https://my-demo-alice.yoyo.codes" },
"uploaded": ["css/style.css", "index.html"],
"deleted": ["old.html"],
"warnings": ["Referenced file is not in the project: js/app.js (from index.html)"],
"duration_ms": 640
}
  • uploaded lists files that were new or changed. A file you sent whose content was already on Yoyo isn’t listed.
  • warnings are likely problems with the site after the deploy, such as no index.html at the root, TypeScript that nothing compiles, or a page that references a missing file. They never block a deploy. It’s always an array.
  • On failure, success is false, error holds the message, and the exit code is 1.
  • --dry-run --json adds "dry_run": true and lists what would change.

The CLI is free on every plan, including Free — along with API tokens and yoyo watch. You don’t need a subscription to publish from your terminal. See Plans & limits.