Skip to content
Latchkey

Bruno "bru: command not found" on the runner in CI

The shell could not find the bru executable because the Bruno CLI package is not installed on the runner. Bruno the app and @usebruno/cli are separate, and the CLI is not preinstalled.

What this error means

A step calling bru run ... fails with "bru: command not found" and the job exits with code 127.

bruno
/home/runner/work/_temp/script.sh: line 1: bru: command not found
Error: Process completed with exit code 127.

Common causes

The Bruno CLI is not installed

Hosted runners do not ship @usebruno/cli; without an explicit install the bru binary is absent from PATH.

A local install is not on PATH

A project-local install puts bru under node_modules/.bin, which is not on PATH unless called through npx or a script.

How to fix it

Install the Bruno CLI globally, then run

  1. Install @usebruno/cli globally with npm.
  2. Run the collection with bru run.
  3. Pin the CLI version for reproducibility.
.github/workflows/ci.yml
- run: npm install -g @usebruno/cli
- run: bru run tests/bruno --env ci

Run through npx without a global install

npx fetches and runs the Bruno CLI on demand.

Terminal
npx @usebruno/cli run tests/bruno --env ci

How to prevent it

  • Install @usebruno/cli explicitly before the run step.
  • Prefer npx @usebruno/cli when avoiding a global install.
  • Pin the CLI version so runs are reproducible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →