Brua
Install
npx @meginhufr/brua-cli --help
GitHub: Meginhufr/brua-cli

Command line

Push images and animations into change sets for review, pull the released ids into your code, and read what the current release serves.

One file, no dependencies, Node 24 or later. It calls only what the public API reference describes.

Settings

Flag Environment
--api-url BRUA_API_URL The API, https://api.brua.dev by default
--key BRUA_API_KEY A project API key. Pushing takes assets:write; reading, pulling and finding change sets by name take delivery:read. Give a pipeline's key both.
--project BRUA_PROJECT The project's id

Errors are one line on stderr and a non-zero exit, 2 when the key is refused. --json prints results as JSON for scripts.

push

Shell
npx @meginhufr/brua-cli push hero.jpg --alt en="Red wool blanket" --alt nb="Rødt ullpledd" --change-set "Spring campaign"

creates the asset on the first push and a new version after that, uploads the source, waits until processing is done and puts the version in a change set, where a person reviews and merges it. The asset is named after the file unless --id says otherwise.

  • Alt text per project language: --alt en="…", --alt-file alt.json, or a sidecar hero.alt.json beside hero.jpg. A new version keeps the newest version's alt text when none is given.
  • The first push also takes --preset flexible|fixed|animated, --width and --height for fixed and animated assets, --color-schemes any|any-dark|both, --languages none|optional|required, --scales single|individual, --still-fit match|fill and --decorative.
  • Slots instead of a file, for fixed and animated assets and per-language files: --slot any.still.source=icon.png --slot dark.still.source=icon-dark.png. A slot the preset doesn't have is refused before anything is uploaded.
  • The change set: --change-set "Spring campaign" by name, opened when there is none, or by id; left out, a new change set holds just this change. --no-wait uploads and stops; --no-submit waits for processing but leaves the version out of change sets.

Processing that fails ends the push with the code, such as aspect_mismatch.

pull

Shell
npx @meginhufr/brua-cli pull src/brua/assets.ts

writes the project's released asset ids as constants, so a reference to an asset that doesn't exist is a compile error and a rename shows up as a diff. The extension picks the language, or --language typescript|swift|kotlin|csharp|json; --namespace sets the Kotlin package or C# namespace; --all includes assets with no release yet. Names are the ids in camel case, flat: hero and hero-summer become hero and heroSummer. --check writes nothing and exits 1 when the file is out of date, for CI.

Reading

get <id> [--lang en] The delivery API's response for the current release
versions <id> The asset's versions and their status
change-sets The project's change sets
submit <name or id> Sends a change set for review
project The project's name and languages

Next