@usesketchbook/cli 0.1.0 → 0.1.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.
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Sources of truth, generators, deterministic checks, gates and agent guidance mak
|
|
|
10
10
|
<br />
|
|
11
11
|
|
|
12
12
|
[](https://sketchbook-docs.vercel.app)
|
|
13
|
+
[](https://www.npmjs.com/package/@usesketchbook/cli?activeTab=readme)
|
|
13
14
|

|
|
14
15
|

|
|
15
16
|

|
|
@@ -40,18 +41,17 @@ Bring nothing, your brand, your tokens or an existing product. The process is th
|
|
|
40
41
|
|
|
41
42
|
## Quick start
|
|
42
43
|
|
|
43
|
-
Use Node.js 26.13.1 LTS and npm 12.2.3. See the [contributor setup instructions](./CONTRIBUTING.md) for patched versions on older LTS lines.
|
|
44
|
+
Use Node.js 26.13.1 LTS and npm 12.2.3. See the [contributor setup instructions](./CONTRIBUTING.md) for patched versions on older LTS lines. Create a design system with [`@usesketchbook/cli` on npm](https://www.npmjs.com/package/@usesketchbook/cli).
|
|
44
45
|
|
|
45
46
|
```sh
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
npm exec --yes --package="$SKETCHBOOK_TARBALL" -- sketchbook init --start library --engine "$SKETCHBOOK_TARBALL"
|
|
47
|
+
mkdir my-design-system
|
|
48
|
+
cd my-design-system
|
|
49
|
+
npm exec --yes --package=@usesketchbook/cli -- sketchbook init --start library --dry-run
|
|
50
|
+
npm exec --yes --package=@usesketchbook/cli -- sketchbook init --start library
|
|
51
51
|
npx sketchbook check
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
For an existing app,
|
|
54
|
+
`init` adds the CLI as a dev dependency of the design-system project. For an existing app, add `--adopt` to `init` and run it from the app directory. To bring your own tokens, use `--start import --from <tokens file>`. See the [Quickstart](https://sketchbook-docs.vercel.app/start/quickstart/) for all seven starters and the [upgrade guide](https://sketchbook-docs.vercel.app/guides/adopt-in-app/#upgrade) for updating the CLI and harness.
|
|
55
55
|
|
|
56
56
|
Plain `init` creates a core-only project and writes its initial inventory to `docs/harness.md`. Add `--agent claude` to stage Claude Code, or `--agent codex,trae` to install both selected integrations. The same flag adds profiles to an existing project. Run `npx sketchbook doctor` to inspect your setup. [Agent compatibility guide](./docs/agent-compatibility.md)
|
|
57
57
|
|
package/docs/cli.md
CHANGED
|
@@ -47,7 +47,7 @@ Changes files; supports `--dry-run`.
|
|
|
47
47
|
| `--yes` | Confirm what would lose work: with --start, removing components or kits the starter does not include; with brand options or a starter that patches foundations, letting the brand links overwrite hand-edited linked tokens. It never detaches the catalog |
|
|
48
48
|
| `--dir` | Create the project in this folder (new or empty), e.g. a design-system folder inside an existing repository; default: here |
|
|
49
49
|
| `--adopt` | In an existing project: add the design system in its own folder (design-system/, or --dir) without changing your files; your package.json gets one script that runs its checks |
|
|
50
|
-
| `--engine` |
|
|
50
|
+
| `--engine` | For new projects, override the engine dependency with an npm version or tag, a local tarball, or a Git URL. A published CLI uses its version range by default. Relative local paths are resolved from the directory where init starts |
|
|
51
51
|
| `--no-install` | New project only: skip npm install and the Chromium download (init lists them as next steps) |
|
|
52
52
|
| `--agent` | Install selected agent profiles (comma-separated): claude, codex, gemini, copilot, trae, jetbrains, generic. New projects default to core only |
|
|
53
53
|
| `--with` | Select the Claude profile and add optional groups (comma-separated): forge. Forge adds the forge-me-a-skill skill |
|
|
@@ -13,7 +13,7 @@ const START_OPTIONS = {
|
|
|
13
13
|
yes: { type: 'boolean', description: 'Confirm what would lose work: with --start, removing components or kits the starter does not include; with brand options or a starter that patches foundations, letting the brand links overwrite hand-edited linked tokens. It never detaches the catalog' },
|
|
14
14
|
dir: { type: 'string', value: 'folder', description: 'Create the project in this folder (new or empty), e.g. a design-system folder inside an existing repository; default: here' },
|
|
15
15
|
adopt: { type: 'boolean', description: 'In an existing project: add the design system in its own folder (design-system/, or --dir) without changing your files; your package.json gets one script that runs its checks' },
|
|
16
|
-
engine: { type: 'string', value: 'spec', description: '
|
|
16
|
+
engine: { type: 'string', value: 'spec', description: 'For new projects, override the engine dependency with an npm version or tag, a local tarball, or a Git URL. A published CLI uses its version range by default. Relative local paths are resolved from the directory where init starts' },
|
|
17
17
|
'no-install': { type: 'boolean', description: 'New project only: skip npm install and the Chromium download (init lists them as next steps)' },
|
|
18
18
|
agent: { type: 'string', value: 'profiles', description: `Install selected agent profiles (comma-separated): ${AGENT_PROFILES.join(', ')}. New projects default to core only` },
|
|
19
19
|
with: { type: 'string', value: 'groups', description: `Select the Claude profile and add optional groups (comma-separated): ${EXTRAS.join(', ')}. Forge adds the forge-me-a-skill skill` },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Getting started
|
|
2
2
|
|
|
3
|
-
This walkthrough is for an initialized design-system project. Follow the [
|
|
3
|
+
This walkthrough is for an initialized design-system project. Follow the [Quickstart](https://sketchbook-docs.vercel.app/start/quickstart/) to create a project with `@usesketchbook/cli` from npm. `init` adds the CLI as a dev dependency and writes `docs/harness.md` with the initial installation inventory.
|
|
4
4
|
|
|
5
5
|
Coding agents can use `AGENTS.md` and `AGENT-WORKFLOWS.md`. The Claude Code layer is optional, and hook coverage varies by client. Run `npx sketchbook doctor` to inspect the local setup.
|
|
6
6
|
|
package/package.json
CHANGED