Ballmac UI home

CLI commands

Every ballmac command and option, generated from the CLI's own help text.

On this page

This page is generated from packages/cli/src/index.ts. To change it, change the source and run pnpm docs:generate.

Run ballmac through npx @ballmac/cli. This page lists every command and option the tool prints in ballmac --help.

pnpm dlx @ballmac/cli <command> [options]

ballmac add <item…>

Install items with shadcn and start tracking them

OptionWhat it does
--with-testsalso install the tests that ship with the items
--no-installdo not install the test packages (print them instead)

ballmac outdated [item…]

Which tracked items have a newer version, and what changed

OptionWhat it does
--jsonmachine-readable output
--exit-codeexit 1 when something is behind (for CI)

ballmac update [item…]

Merge new versions into your copies (your edits are kept)

OptionWhat it does
--dry-runshow what would change and write nothing

ballmac diff <item>

What you changed since you installed an item

ballmac track [item…]

Start tracking items you installed with plain shadcn

OptionWhat it does
--rebasedeclare your files up to date with the latest version

ballmac check [path…]

Audit your app for what agents and people get wrong: missing states, unlabelled controls, fixed colours, endless motion, overflow on phones

OptionWhat it does
--ruleslist the rules and exit
--format <f>pretty (default), json or github (annotations for CI)
--fail-on <level>error (default), warn or never: when to exit with 1
--allshow every finding, not the first few per rule
--offlinedo not read the Ballmac catalogue
--include-libraryalso audit components/ui and components/ballmac
--url <address>also load a running app in a real browser (axe, overflow, console)
--routes <a,b>routes to load with --url (default /)

ballmac verify <registry>

Score any shadcn registry (a URL, a folder or a registry.json) on what can be checked from its source, and write a badge. Needs TypeScript in this project.

OptionWhat it does
--min-score <n>exit 1 when the score is below n (for CI)
--format <f>pretty (default) or json
--out <file>write the scorecard JSON
--badge <file>write the "Ballmac Verified" SVG badge
--item-url <url>where items live when it is not next to registry.json, e.g. https://acme.com/r/\{name\}.json
--limit <n>score only the first n items
--alllist every item that lost points

ballmac test [item…]

Run the Ballmac tests installed in this project

ballmac test add <item…>

Install the tests for items that are already installed

Global options

OptionWhat it does
--cwd <dir>Project folder (default: the current folder)
-v, --versionPrint the version
-h, --helpPrint this help

Environment variables

VariableWhat it does
BALLMAC_UI_URLRegistry to read (default https://ui.ballmac.com)
BALLMAC_LICENSE_KEYYour Ballmac UI Pro key (env or .env.local); needed for Pro items
BALLMAC_SHADCNHow to run shadcn, e.g. "pnpm dlx shadcn@latest" (default: your local copy, else the package manager's runner)