@savvy-web/cli
v1.6.1
Published
The savvy CLI — unified commit, changeset, and lint commands for the Silk Suite
Readme
@savvy-web/cli
The savvy binary — one command for the everyday dev tooling in a Silk Suite project. It sets up changeset, commit and lint conventions, checks them and runs the git hooks behind them, replacing the three separate savvy-changesets, savvy-commit and savvy-lint bins.
Install
npm install --save-dev @savvy-web/cli
# or
pnpm add -D @savvy-web/cliMost projects install @savvy-web/silk instead, which pulls in @savvy-web/cli along with the matching suite versions and the config files the savvy commands expect.
Quick start
Set up a project, then check it:
npx savvy init
# initializes changeset, commit and lint conventions in one pass
npx savvy check
# runs the changeset, commit and lint checks; reports every failure in one passsavvy init and savvy check are the only setup entry points. The command groups expose the remaining per-tool operations:
npx savvy changeset version
# applies pending changesets and bumps package versions
npx savvy lint fmt package-json
# formats package.json files to the Silk Suite conventionsRemove build and cache artifacts across the whole workspace:
npx savvy clean --dry-run
# previews what would be removed across every workspace package and the repo root
npx savvy clean --globs dist,.turbo,coverage
# removes only the given patternsCommands
savvy init— orchestrator that runs changeset, commit and lint setup in one pass.savvy check— orchestrator that runs all three checks and reports every failure (it does not short-circuit).savvy clean— removes build and cache artifacts (dist,.turbo,coverage,node_modules,.rslibby default) from every workspace package (leaves first) and the repo root (last);--globsto customize,--dry-runto preview.savvy commit— the husky/Claude hook handlers (session-start, pre-commit-message, post-commit-verify).savvy changeset— changeset lint, check, transform, version, config validation, and dependency changesets.savvy lint— formatters for package.json, the pnpm workspace file and YAML.
Run any command with --help to see its full surface:
npx savvy changeset --help
# lists the changeset subcommands and their optionsProgrammatic API
The package also exports the assembled command tree and its handlers for embedding savvy in another program:
import { runCli } from "@savvy-web/cli";
await runCli(process.argv);The individual command groups (changesetCommand, commitCommand, lintCommand) and their named handlers are exported from the package root.
