Exit Codes
Every failure exits with a distinct code. Use them in CI to tell a fixable config problem from a missing game install.
| Code | Meaning |
|---|---|
0 |
Success. |
1 |
Generic error. Config unreadable, unknown command, unexpected failure. |
2 |
Invalid config. Schema failure, bad JSON, missing packs, missing entry, bad version. |
3 |
Deploy target not found. No com.mojang under any known install, or custom path missing. |
4 |
Ship failure. Manifest validation failed or the zip step failed. |
5 |
Generate failure. Generator conflict without --force, bad flags, unwritable plan. |
6 |
Typecheck failure. tsc --noEmit reported diagnostics. |
7 |
Bundle failure. esbuild could not compile the entry. |
8 |
Init failure. Bad name, non-empty dir without --force, create write failed. |
9 |
Manifest failure. Layout undetected or rewrite failed. |
10 |
Version failure. Bad semver or write failed. |
11 |
Harness failure. A dist reference has no matching file. |
12 |
Publish failure. Bad bump, git tag failed, git push failed. |
JSON reports
bb build --json
$ bb check --json
build, ship, check, harness,
publish, clean, init, manifest, and
version accept --json. Success prints one report object. Failure prints
one error object with the code. Parse stdout, never stderr.