The oneprompt command-line tool
Every command, flag and exit code of the oneprompt CLI, with examples for people and for scripts.
In short
onepromptpackages your build into a deterministic.opkg, validates it locally, deploys it, promotes it and verifies that it is really live.- Install it from oneprompt.games with one command:
curl -fsSL https://oneprompt.games/install.sh | sh, ornpm install -gfrom our site on any system. - It stores your agent token in the operating system's keychain, never in a plain file.
- Every command can print stable JSON with
--json, and exit codes tell scripts and agents exactly what kind of problem happened.
Install
The CLI is published on oneprompt.games itself. It is one file that needs only Node.js 22 or newer (check with node --version).
On macOS or Linux, the install script downloads it, checks its SHA-256 checksum and puts it in ~/.local/bin:
curl -fsSL https://oneprompt.games/install.sh | sh
On any system with npm, including Windows, install it straight from our site:
npm install -g https://oneprompt.games/cli/oneprompt-cli.tgz
Check that it works:
oneprompt --version
The current version, its download links and checksums are listed at https://oneprompt.games/cli/latest.json, and every file's SHA-256 is in https://oneprompt.games/cli/SHA256SUMS. To install somewhere else, set ONEPROMPT_INSTALL_DIR before running the script. To update, run the same command again.
Before you start
You need an agent token for commands that talk to OnePrompt (everything except package and validate). Create one in Dashboard → Agent tokens; see Account security and agent tokens.
Signing in
oneprompt auth login
Paste the token when asked. The CLI checks it with the API and stores it in the macOS Keychain or, on Linux, in the Secret Service keyring (through secret-tool). It prints the token's scopes.
You can also pipe the token in, which is handy in scripts:
printf '%s' "$MY_TOKEN" | oneprompt auth login
Where no keychain is available (for example on Windows, in CI or in a container), set the environment variable ONEPROMPT_TOKEN instead. If ONEPROMPT_TOKEN is set, it always wins over the keychain.
Related commands:
oneprompt auth statusshows who the token belongs to and its scopes.oneprompt auth logoutremoves the stored token.--profile <name>keeps several tokens side by side (for example--profile work). The default profile isdefault.
Projects
oneprompt project create --name "Star Hopper"
oneprompt project create --name "Star Hopper" --slug star-hopper
oneprompt project list
oneprompt project get <project-id>
Without --slug, the link is generated from the name. With --slug, the link must be 3 to 40 lowercase letters, digits and single dashes; if it is taken, the error SLUG_TAKEN comes with suggestions. Each project create run creates a new project, so do not run it twice by accident.
Packaging
oneprompt package --manifest oneprompt.yaml --output star-hopper.opkg
--manifestdefaults tooneprompt.yamlin the current folder;--outputdefaults topackage.opkg.- The package contains
oneprompt.yaml, your content root (for examplegame/) and the optionalmeta/folder. Nothing else is packed. - Files are sorted and timestamps fixed, so the same input always produces the same file and the same SHA-256.
- System clutter (
.DS_Store,Thumbs.db,__MACOSXand similar) is skipped silently. Version-control folders (.git,.svn,.hg) are skipped with aCONTENT_SKIPPEDwarning. Symbolic links are refused; copy the real file instead. - Images, audio, video, fonts and already-compressed files (
.br,.gz,.unityweband so on) are stored without recompression, so packing is fast.
The command prints the file count, size, unpacked size and SHA-256.
Validating
oneprompt validate star-hopper.opkg
This runs the same checks as our servers: paths, limits, manifest, entrypoint, unsafe files and compressed files. It does not need a token and never runs your game. Local success is a good sign, but the service validates again with its current policy (for example, the malware scan happens on our side).
Deploying
oneprompt deploy star-hopper.opkg --project <project-id> --promote
What happens, in order:
- The package is validated locally. If that fails, nothing is uploaded.
- It is uploaded. Large packages are uploaded in parts, with retries.
- A deployment is created and the CLI waits for our validation (up to
--timeoutseconds, 600 by default). - With
--promote, the deployment becomes the live release. - The CLI opens a short-lived team preview link and checks that your entrypoint is served as HTML by this exact deployment (for up to
--verify-timeoutseconds, 20 by default).
If verification fails, you get VERIFICATION_FAILED: the release was promoted, but the check did not see it in time. The CLI never rolls back on its own. Open the game from the dashboard to check, and roll back if needed.
Without --promote, the deployment is validated and left ready, and the CLI tells you how to promote it later.
Rerunning deploy after a crash or network error is safe: the upload is resumed rather than duplicated.
Other flags:
--environmentdefaults toproduction, which is the environment players see.--timeout <seconds>and--verify-timeout <seconds>change the waiting times.
Inspecting and rolling back
oneprompt deployment get <deployment-id> --project <project-id>
oneprompt logs <deployment-id> --project <project-id>
oneprompt rollback --project <project-id> --to <deployment-id> --reason "bad build"
rollback makes any ready deployment the live release again, instantly and without rebuilding. It is also how you promote a deployment you created without --promote. More in Deployments, releases and rollback.
Capabilities
oneprompt capabilities
Shows what the platform accepts right now: runtimes (web only), package limits, error codes, upload settings and your quotas.
Output for scripts and agents
Add --json to any command. You get exactly one JSON object on standard output:
{ "ok": true, "command": "deploy star-hopper.opkg", "result": { "deployment_id": "…", "status": "active" } }
or, on failure:
{ "ok": false, "command": "deploy star-hopper.opkg", "exit_code": 4, "error": { "code": "PACKAGE_INVALID", "message": "…", "details": { "issues": [] } } }
Each issue has a code, a path (where the problem is), a message and usually a hint.
Exit codes
0: success.2: usage error: a missing flag, an unknown command, or a request the API found invalid or could not find (HTTP 400 or 404, for example a wrong project id).3: authentication or permission problem (HTTP 401 or 403: a missing, expired or revoked token, a missing scope, or an action your role may not do).4: validation failed (HTTP 413 or 422: the package or a request was rejected; read the issues).5: conflict (HTTP 409: for example a state that does not allow the action).6: a temporary or verification problem (timeouts, the service being briefly unavailable,VERIFICATION_FAILED). Usually safe to retry.7: a local file problem (file not found, no keychain).
Global options
--json: stable machine-readable output.--api <url>: a different API address (or setONEPROMPT_API_URL). The default ishttps://api.oneprompt.games.--profile <name>: which stored token to use.--help: the built-in summary of all commands.