@savvy-web/cli 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/841.js +1 -1
  2. package/README.md +72 -0
  3. package/package.json +2 -1
package/841.js CHANGED
@@ -2219,7 +2219,7 @@ const rootCommand = Command.make("savvy").pipe(Command.withSubcommands([
2219
2219
  ]));
2220
2220
  const cli = Command.run(rootCommand, {
2221
2221
  name: "savvy",
2222
- version: "0.2.0"
2222
+ version: "0.2.1"
2223
2223
  });
2224
2224
  const WorkspaceLive = Layer.mergeAll(WorkspaceRootLive, PackageManagerDetectorLive, WorkspaceDiscoveryLive.pipe(Layer.provide(WorkspaceRootLive)));
2225
2225
  const BaseLive = Layer.mergeAll(WorkspaceLive, ChangesetConfigReaderLive, ManagedSectionLive, BiomeSchemaSyncLive, ConfigDiscoveryLive, SilkPublishabilityDetectorLive, Changesets.WorkspaceSnapshotReaderLive);
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # @savvy-web/cli
2
+
3
+ [![npm](https://img.shields.io/npm/v/@savvy-web%2Fcli?label=npm&color=cb3837)](https://www.npmjs.com/package/@savvy-web/cli)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-4caf50.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ The `savvy` binary — one command for the everyday dev tooling in a [Silk Suite](https://github.com/savvy-web/systems) 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.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install --save-dev @savvy-web/cli
12
+ # or
13
+ pnpm add -D @savvy-web/cli
14
+ ```
15
+
16
+ Most projects install [`@savvy-web/silk`](https://www.npmjs.com/package/@savvy-web/silk) instead, which pulls in `@savvy-web/cli` along with the matching suite versions and the config files the `savvy` commands expect.
17
+
18
+ ## Quick start
19
+
20
+ Set up a project, then check it:
21
+
22
+ ```bash
23
+ npx savvy init
24
+ # initializes changeset, commit and lint conventions in one pass
25
+
26
+ npx savvy check
27
+ # runs the changeset, commit and lint checks; exits non-zero on the first failure
28
+ ```
29
+
30
+ The command groups map to the tools they manage:
31
+
32
+ ```bash
33
+ npx savvy commit check
34
+ # validates the staged commit message against the conventional-commit rules
35
+
36
+ npx savvy changeset version
37
+ # applies pending changesets and bumps package versions
38
+
39
+ npx savvy lint fmt package-json
40
+ # formats package.json files to the Silk Suite conventions
41
+ ```
42
+
43
+ ## Commands
44
+
45
+ - `savvy init` — orchestrator that runs changeset, commit and lint setup in one pass.
46
+ - `savvy check` — orchestrator that runs all three checks and short-circuits on the first failure.
47
+ - `savvy commit` — commit-message validation plus the husky hook handlers (session-start, pre-commit-message, post-commit-verify, user-prompt-submit).
48
+ - `savvy changeset` — changeset init, check, lint, transform, version, classify, branch analysis, release-surface and config inspection.
49
+ - `savvy lint` — lint setup, check and formatters for package.json, the pnpm workspace file and YAML.
50
+
51
+ Each group also exposes per-tool `init` and `check` subcommands under its namespace. Run any command with `--help` to see its full surface:
52
+
53
+ ```bash
54
+ npx savvy changeset --help
55
+ # lists the changeset subcommands and their options
56
+ ```
57
+
58
+ ## Programmatic API
59
+
60
+ The package also exports the assembled command tree and its handlers for embedding `savvy` in another program:
61
+
62
+ ```ts
63
+ import { runCli } from "@savvy-web/cli";
64
+
65
+ await runCli(process.argv);
66
+ ```
67
+
68
+ The individual command groups (`changesetCommand`, `commitCommand`, `lintCommand`) and their named handlers are exported from the package root.
69
+
70
+ ## License
71
+
72
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "The savvy CLI — unified commit, changeset, and lint commands for the Silk Suite",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/cli",
@@ -43,6 +43,7 @@
43
43
  "!tsconfig.json",
44
44
  "!tsdoc.json",
45
45
  "841.js",
46
+ "README.md",
46
47
  "bin/savvy.js",
47
48
  "index.d.ts",
48
49
  "index.js",