CLI
yes is the command-line tool for publishing and updating games on the Yes platform. One command runs the full pipeline: build → optimize → zip → upload.
Install
npm install -g @playonyes/cli
Requires Node.js 20+. Verify the install:
yes --version
Quickstart
Sign in once, then push a build whenever you want to publish.
# 1. authorize this terminal (opens your browser)yes login# 2. from your game folder, push a buildcd my-gameyes push ./dist
The first run walks you through a short wizard — detecting your build command from package.json, asking whether to enable optimization, and creating a yes.config.json file. After that, yes push is a single non-interactive command.
Commands
yes login#yes login
Authorize the current terminal via an OAuth-style browser handoff. The CLI starts a short-lived local server on 127.0.0.1, opens studio.yes.gg/cli-auth in your browser, and receives a dedicated CLI token. The token is stored at ~/.config/yes/auth.json (Unix) or under %APPDATA%/yes-cli/ (Windows). CLI tokens are independently revocable.
Example
yes login# → opens browser, sign in, click Authorize# ✓ Logged in as you@example.com
yes logout#yes logout
Revoke the CLI token on the server and remove the local credential file. If YES_TOKEN is set in the environment, logout will not revoke it — unset the variable instead.
Example
yes logout
yes push [dir]#yes push [dir] [flags]
The main publishing command. Runs the configured build, applies optimization to a temp directory, zips the result, and uploads it to the Yes platform. Each step is optional and controllable via flags. If yes.config.json has a buildCommand (e.g. 'npm run build'), push offers to run it before zipping.
Flags
| Name | Type | Description |
|---|---|---|
--build? | boolean | Force-run the configured build command, no prompt. |
--skip-build? | boolean | Skip the build step, no prompt. |
--build-command? | string | Set or override the build command for this project (persisted to yes.config.json on first run). |
--optimize? | boolean | One-shot override to optimize for this push (not persisted). |
--skip-optimize? | boolean | One-shot override to skip optimization (not persisted). |
--yes? | boolean | CI mode: never prompt. Fails if any required input is missing. |
--dry-run? | boolean | Run the full pipeline but skip the upload step. |
--draft? | boolean | Upload as a draft (not visible to players until published). |
--name? | string | Game name (used on first push to create the game record). |
--description? | string | Game description. |
--tags? | string | Comma-separated tags. |
--thumbnail? | string | Path to a thumbnail image. |
--preview? | string | Path to a preview video. |
Example
# typical local useyes push# CI: never prompt, push as a draft for QA reviewyes push ./build --yes --draft# one-off: force a rebuild even if config says skipyes push --build
yes optimize [dir]#yes optimize [dir] [flags]
Preview optimization savings without writing an artifact. Runs the optimizer against your build folder, prints a savings report, and leaves no files behind. Useful for deciding whether to set optimize: true in yes.config.json. Optimization includes WebP image conversion (with HTML/CSS/JS reference rewriting), esbuild JS/CSS minification, and html-minifier-terser for HTML.
Flags
| Name | Type | Description |
|---|---|---|
--quality <n>? | number | WebP/JPEG quality 1–100. Default 80. |
--no-images? | boolean | Skip image conversion in the preview. |
--no-minify-js? | boolean | Skip JS minification. |
--no-minify-css? | boolean | Skip CSS minification. |
--no-minify-html? | boolean | Skip HTML minification. |
--no-rewrite-refs? | boolean | Skip rewriting image references in HTML/CSS/JS. |
Example
yes optimize ./buildyes optimize ./build --quality 70yes optimize ./build --no-images
yes link <gameId>#yes link <gameId>
Link the current directory to an existing game by writing a yes.config.json file. Use this when you want a fresh checkout to push to a game that already exists on the platform — copy the game ID from the studio dashboard.
Example
yes link gm_a1b2c3d4# ✓ wrote yes.config.json
Config & CI
yes.config.json
Created automatically on first push. Commit this to your repo so the whole team pushes to the same game.
{"gameId": "gm_a1b2c3d4","buildCommand": "npm run build","buildDir": "dist","optimize": true}
Scripted / CI use
Set YES_TOKEN to bypass the local credential file. When the env var is set, yes login is a no-op.
# in your CI jobYES_TOKEN=yes_xxx yes push ./dist --yes --draft
Environment variables
| Variable | Default | Purpose |
|---|---|---|
YES_TOKEN | — | Bearer token override for scripted use. |
YES_API_URL | http://localhost:8080 | Backend base URL. |
YES_STUDIO_URL | https://studio.yes.gg | Studio base URL for the login handoff. |