CLI preview
Review a theme before changing it.
Audit and plan local shadcn theme changes, with brand locks and a before-and-after preview.
Source preview
@usecolorbox/cli is not published on npm. The package is currently private and UNLICENSED while release terms are finalized. These commands are for an authorized Colorbox checkout, not a public npm installation.
The CLI runs locally with Node 24. Running it does not require an account, API key, or network request.
Audit an existing theme
From the repository root, install dependencies with npm ci, then check the included example. Substitute your CSS path for your own theme.
npm ci
npm run colorbox -- audit examples/shadcn-starter/app/globals.css --jsonGenerate a review and patch
The planner keeps primary and sidebar-primary locked. Add --lock for other tokens you want to preserve. Output files must not already exist.
The CLI never edits the source CSS. Open the generated HTML locally, inspect both modes, and review the patch before applying it.
npm run colorbox -- plan examples/shadcn-starter/app/globals.css \
--intent repair --lock ring \
--preview /tmp/colorbox-review.html \
--patch /tmp/colorbox-change.patch --jsonApply only after review
Confirm the source CSS SHA-256 still matches sourceHash in the JSON report. If it changed, rerun the planner. Then check and apply the reviewed patch, and audit again.
git apply --check /tmp/colorbox-change.patch
git apply /tmp/colorbox-change.patch
npm run colorbox -- audit examples/shadcn-starter/app/globals.css --jsonSupported scope
The CLI supports explicit :root and .dark theme blocks, either at the top level or together inside @layer base. It checks supported opaque color literals and known text/background token pairs.
Dynamic expressions, ambiguous selectors, transparency, and unsupported checked colors block plans. It does not resolve your complete CSS cascade or audit rendered components.
- Exit 0
- Passing check or successful plan.
- Exit 1
- Invalid or unsupported input.
- Exit 2
- Blocked plan or failing checks. Blocked plans do not emit a patch.