Brua
Install
npx @meginhufr/brua-cli pull src/brua/assets.ts
GitHub: Meginhufr/brua-cli

Build and CI

The released ids as typed constants in your code, checked in CI, and new versions pushed from a pipeline into review.

The command line is one file with no dependencies, on Node 24 or later. It takes a project API key, which an admin makes under Settings in the back office: delivery:read to pull and read, assets:write to push.

Install

Nothing to install: npx @meginhufr/brua-cli runs the published package. Settings come as flags or environment variables:

Shell
export BRUA_API_URL=https://api.brua.dev BRUA_PROJECT=<project> BRUA_API_KEY=<project key>

Pull the released ids

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

writes the project's released ids as constants, named in camel case, with a comment per asset:

TypeScript
export const assets = {
  /** Brua, a bridge drawn as an arc over a line · animated, 640×400 */
  bridge: "bridge",
} as const;

The extension picks the language: .ts, .swift, .kt, .cs or .json, with --namespace for the Kotlin package or C# namespace. In CI, --check writes nothing and exits 1 when the file is out of date, so a rename in Brua shows up as a failed build instead of a missing image:

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

Push from a pipeline

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 the named change set, where a person reviews and merges it. Nothing goes live from a pipeline alone.

GitHub Actions

The same code runs as two composite actions from the brua-cli repository:

GitHub Actions
- uses: Meginhufr/brua-cli/action/pull@v1
  with:
    api-key: ${{ secrets.BRUA_API_KEY }}
    project: <project>
    out: src/brua/assets.ts
    check: true
GitHub Actions
- uses: Meginhufr/brua-cli/action/push@v1
  with:
    api-key: ${{ secrets.BRUA_API_KEY }}
    project: <project>
    file: brand/hero.jpg
    alt: |
      en=Red wool blanket
      nb=Rødt ullpledd
    change-set: Spring campaign

Next