CLI overview

Install the Rosebud CLI, and how its output, exit codes, state and credentials work.

The Rosebud CLI publishes browser games and makes game assets. It's open source under Apache-2.0: rosebudai/rosebud-cli.

Install

You need Node.js 22 or later. It works on macOS, Linux and Windows.

npm install --global @rosebudai/cli
rosebud --version

Or run any command without installing: npx @rosebudai/cli <command>. pull, login and the assets commands need 0.2.0 or later; if one is reported as an unknown command, run the install again to update.

Commands

CommandWhat it does
rosebud publishCreates a new game from a build folder or ZIP.
rosebud connectPrints a private link that lets you approve updates from this CLI.
rosebud statusShows whether access is pending, active, revoked or expired.
rosebud updateReplaces the game's files and publishes them to the same link.
rosebud disconnectRevokes this CLI's access. The game stays online.
rosebud pullBrings the game's current files, including Rosebud edits, into a folder.
rosebud loginAsks you to approve this CLI or agent to make assets with your credits and publish into your account.
rosebud whoamiShows the login's status and your credit balance.
rosebud logoutRevokes the login and removes it from this computer.
rosebud assets modelsLists models with their inputs, prices and licenses.
rosebud assets quoteChecks inputs and prices an asset, free.
rosebud assets createMakes an asset, waits for it and saves the file.
rosebud assets statusShows a job's progress and, when done, its asset.
rosebud assets listLists your assets, newest first.
rosebud assets downloadSaves an existing asset's file.

Global options

OptionDefaultDetails
--state <file>.rosebud/project.jsonWhere the game's details are saved. Use one per game.
--timeout-ms <ms>120000How long to wait for Rosebud. For assets create it bounds the whole wait, default 600000. Each file upload gets one extra second per 32 KiB on top.
--helpLists commands and options.
--versionPrints the installed version.

Output

Every command except --help and --version prints one JSON object: results on stdout, errors on stderr. Many results include a next_action that says what to do next.

Errors look like this:

{
    "error": {
        "code": "media_path",
        "message": "Move assets/Hero.PNG to assets/hero.png and update references.",
        "kind": "api",
        "outcome": "rejected",
        "status": 400,
        "filename": "assets/Hero.PNG"
    }
}

outcome is not_sent, rejected or unknown; with not_sent, nothing was released. limit is a number when Rosebud reports one. Asset errors include the job_id or asset_id once one is known.

A request that Rosebud throttles (HTTP 429) waits out its Retry-After and is sent again, for up to a minute in all. A longer wait fails with throttled and retry_after_seconds. A publish or update request is never sent again on its own.

Exit codes

ExitMeaning
0Success. Check status or whoami to see whether approval is still pending.
2Local input or usage error. Fix the command or build.
3Rosebud rejected the request. Read error.code before retrying.
4The outcome is unknown. See Troubleshooting.
130, 143Stopped by Ctrl+C or SIGTERM (interrupted). The state lock is released.

State and credentials

  • .rosebud/project.json holds the game's ID, play link and last accepted version, but no secrets. Keep .rosebud/ out of Git and outside your build folder.
  • Credentials (game connections and the login) are kept in ~/.config/rosebud/credentials with private file permissions. Set ROSEBUD_CREDENTIALS_DIR to use another folder.
  • The CLI locks the state file while it runs. Run commands against one state file one at a time. A lock left by a process that no longer runs is taken over by the next command.

On this page