From the terminal

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 build
cd my-game
yes 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
NameTypeDescription
--build?booleanForce-run the configured build command, no prompt.
--skip-build?booleanSkip the build step, no prompt.
--build-command?stringSet or override the build command for this project (persisted to yes.config.json on first run).
--optimize?booleanOne-shot override to optimize for this push (not persisted).
--skip-optimize?booleanOne-shot override to skip optimization (not persisted).
--yes?booleanCI mode: never prompt. Fails if any required input is missing.
--dry-run?booleanRun the full pipeline but skip the upload step.
--draft?booleanUpload as a draft (not visible to players until published).
--name?stringGame name (used on first push to create the game record).
--description?stringGame description.
--tags?stringComma-separated tags.
--thumbnail?stringPath to a thumbnail image.
--preview?stringPath to a preview video.
Example
# typical local use
yes push
# CI: never prompt, push as a draft for QA review
yes push ./build --yes --draft
# one-off: force a rebuild even if config says skip
yes 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
NameTypeDescription
--quality <n>?numberWebP/JPEG quality 1–100. Default 80.
--no-images?booleanSkip image conversion in the preview.
--no-minify-js?booleanSkip JS minification.
--no-minify-css?booleanSkip CSS minification.
--no-minify-html?booleanSkip HTML minification.
--no-rewrite-refs?booleanSkip rewriting image references in HTML/CSS/JS.
Example
yes optimize ./build
yes optimize ./build --quality 70
yes optimize ./build --no-images

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 job
YES_TOKEN=yes_xxx yes push ./dist --yes --draft

Environment variables

VariableDefaultPurpose
YES_TOKENBearer token override for scripted use.
YES_API_URLhttp://localhost:8080Backend base URL.
YES_STUDIO_URLhttps://studio.yes.ggStudio base URL for the login handoff.