CLI command reference
Every yaya command with its flags, grouped by job, plus the environment variables it reads.
Last updated
Before you start
- The
yayacommand on your machine. - A key. Run
yaya login keyonce. See Use the yaya CLI.
Flags and environment
Every command accepts --base-url <url> to use another origin for that run.
YAYA_BASE_URL: the origin for one run. The CLI does not save it.YAYA_API_KEY: a workspace key for one run.YAYA_ACCOUNT_KEY: an account key for profile, email and billing commands.YAYA_SESSION_TOKEN: a signed-in session for account keys, variables and support.
Set up and sign in
yaya setup --base-url <url> [--api-key-env YAYA_API_KEY]
yaya login [key] [--base-url <url>] [--key-stdin | --account-key-env <name>]
yaya login --agent --email <address> [--base-url <url>]
yaya login --agent --claim-file <file> --base-url <url>yaya login --agent --email requests an inbox confirmation without creating a workspace or saving credentials. Open the emailed link and click Claim account to download a one-time credential file. Run yaya login --agent --claim-file <file> --base-url <url> with the same yaya address used for signup to verify and privately save the workspace key and workspace ID, then delete the downloaded file. Keep the file private; the claim link works only once.
Publish
yaya publish --dir <folder> [--tenant-id <id>]
yaya publish anonymous --dir <folder> [--expires-in-seconds <n>]
yaya publish create [--idempotency-key <key>] [--json <body>]
yaya tenant publish --tenant-id <id> [--idempotency-key <key>]publish anonymous needs no account. The site stays live for up to 24 hours unless you claim it. publish create returns "not implemented" until the POST /api/v1/publish route ships.
Live files and versions
yaya files list --slug <slug> [--cursor <cursor>]
yaya files read --slug <slug> --path <path>
yaya files head --slug <slug> --path <path>
yaya versions list --tenant-id <id>
yaya versions restore --tenant-id <id> --version-id <id> [--expected-live-version-id <id>]
yaya versions delete --tenant-id <id> --version-id <id>Pass --expected-live-version-id to stop a restore if someone else published first.
Mounts
yaya mounts list [--tenant <slug>]
yaya mounts create --slug <slug> --mount-path <path> [--tenant <slug>]
yaya mounts get --mount-path <path> [--tenant <slug>]
yaya mounts update --mount-path <path> --slug <slug> [--tenant <slug>]
yaya mounts delete --mount-path <path> [--tenant <slug>]Vanity subdomains and domains
yaya vanity roots [--tenant <slug>]
yaya vanity get [--tenant <slug>]
yaya vanity claim [--name <subdomain>] [--tenant <slug>]
yaya vanity release [--tenant <slug>]
yaya vanity availability --name <subdomain> [--tenant <slug>]
yaya vanity reprovision [--tenant <slug>]
yaya domains search --q <query>
yaya domains check --host <hostname>Profile
yaya profile get
yaya profile patch [--enabled true|false] [--add-new-sites true|false] [--bio <text|null>] [--link <url|null>]
yaya profile username --username <name>
yaya profile sites list
yaya profile sites add --slug <slug>
yaya profile sites remove --slug <slug>Account
yaya account email-change status
yaya account email-change start --new-email <address>
yaya account email-change cancel
yaya account email-change confirm --code-stdin
yaya account keys list
yaya account keys mint --name <text> --scopes <scope[,scope...]> [--expires-at <iso8601>]
yaya account keys revoke --key-id <id>
yaya payment-methods list
yaya payment-methods setup
yaya payment-methods set-default --id <pm_id>
yaya payment-methods delete --id <pm_id>confirm --code-stdin reads the code from standard input so it stays out of your shell history.
Workspaces, analytics and support
yaya workspace list [--tenant <slug>]
yaya analytics get [--range 7d] [--tenant <slug>]
yaya support send --subject <text> --message <text> [--tenant <slug>]
yaya api openapi [--paths]Drives and variables
yaya drive default [--tenant <slug>]
yaya drive files put --drive-id <id> --path <remote> --file <local> [--content-type <type>] [--tenant <slug>]
yaya drive files read --drive-id <id> --path <remote> [--tenant <slug>]
yaya drive files delete --drive-id <id> --path <remote> [--tenant <slug>]
yaya variables list [--tenant <slug>]
yaya variables get --name <VAR_NAME> [--tenant <slug>]
yaya variables set --name <VAR_NAME> (--value-stdin | --value-env <name>) [--allowed-upstreams <host[,host]>] [--tenant <slug>]
yaya variables delete --name <VAR_NAME> [--tenant <slug>]Fix common problems
The CLI prints the usage text. The command or subcommand is not one it knows. Check the spelling against the lines above.
An error names a flag. A required flag is missing. Add it and run the command again.
401 or 403. See Fix API authentication errors.
Was this guide helpful?
Still stuck? Email support@yaya.page.