@archetypeai/ds-cli 0.7.0 → 0.7.2

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 (2) hide show
  1. package/README.md +40 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,6 +8,8 @@ Run directly with `npx`:
8
8
 
9
9
  ```bash
10
10
  npx @archetypeai/ds-cli create my-app
11
+ npx @archetypeai/ds-cli --help # full usage
12
+ npx @archetypeai/ds-cli --version # print version
11
13
  ```
12
14
 
13
15
  ---
@@ -20,24 +22,34 @@ npx @archetypeai/ds-cli create my-app
20
22
  npx @archetypeai/ds-cli create my-app
21
23
  ```
22
24
 
23
- Sets up a SvelteKit + Tailwind v4 + shadcn-svelte project with design tokens, components, and an optional demo page.
25
+ Sets up a SvelteKit + Tailwind v4 + shadcn-svelte project with design tokens, components, and a demo page. Step by step it:
26
+
27
+ 1. Scaffolds a minimal SvelteKit project (`sv create`) with the Tailwind v4 plugin
28
+ 2. Patches `svelte.config.js` so Svelte 5 runes work in third-party packages
29
+ 3. Installs `@archetypeai/ds-lib-tokens` and optionally copies local fonts to `static/fonts/`
30
+ 4. Initializes shadcn-svelte (`components.json`, `src/lib/utils.js`, `clsx` + `tailwind-merge` + `tw-animate-css`)
31
+ 5. Creates `src/routes/layout.css` with the design system imports (fonts, theme, tailwind, tw-animate-css)
32
+ 6. Sets up linting and formatting (ESLint + Prettier with the Svelte and Tailwind plugins, plus `lint`/`format` scripts)
33
+ 7. Installs all registry components and their dependencies (`tailwind-variants`, `bits-ui`, `@lucide/svelte`, `layerchart`, `paneforge`) - unless `--no-components`
34
+ 8. Installs the agent configuration (`--codeagent cursor|claude`) - unless `none`
35
+ 9. Writes a demo page (`src/routes/+page.svelte`) composed from design system patterns
24
36
 
25
37
  | Flag | Values | Default |
26
38
  |------|--------|---------|
27
39
  | `--framework` | `svelte` | prompt |
28
40
  | `--pm` | `npm`, `pnpm`, `bun`, `yarn` | prompt |
29
41
  | `--fonts <path>` | path to PP Neue Montreal fonts folder | prompt |
30
- | `--no-fonts` | skip font installation (use system fallback) | |
42
+ | `--no-fonts` | skip font installation (use system fallback) | - |
31
43
  | `--no-components` | skip component install | install all |
32
44
  | `--codeagent` | `cursor`, `claude`, `none` | prompt |
33
- | `--defaults` | force non-interactive mode | |
45
+ | `--defaults` | force non-interactive mode | - |
34
46
 
35
47
  ```bash
36
48
  npx @archetypeai/ds-cli create my-app --pm pnpm --no-fonts --codeagent claude
37
49
  npx @archetypeai/ds-cli create my-app --pm npm --fonts /path/to/fonts --codeagent claude
38
50
  ```
39
51
 
40
- **Non-interactive mode** (no TTY or `--defaults`): all required flags must be specified. The CLI lists missing options and exits so agents can ask the user before proceeding.
52
+ **Non-interactive mode** (no TTY or `--defaults`): project name, `--pm`, `--fonts <path>` or `--no-fonts`, and `--codeagent` must be specified. The CLI lists missing options and exits so agents can ask the user before proceeding.
41
53
 
42
54
  ---
43
55
 
@@ -48,22 +60,24 @@ cd my-existing-app
48
60
  npx @archetypeai/ds-cli init
49
61
  ```
50
62
 
51
- Run from a SvelteKit project root. Auto-detects your package manager, installs tokens, shadcn-svelte, and components, and prepends DS imports to your `layout.css` (preserving existing styles).
63
+ Run from a SvelteKit project root. Auto-detects your package manager from the lockfile, installs Tailwind CSS v4 if missing, installs tokens, shadcn-svelte, and components, and prepends the DS imports to your `src/routes/layout.css` (preserving existing styles - imports that are already present are not duplicated). Unlike `create`, no demo page is written.
52
64
 
53
65
  | Flag | Values | Default |
54
66
  |------|--------|---------|
55
67
  | `--pm` | `npm`, `pnpm`, `bun`, `yarn` | auto-detect |
56
68
  | `--fonts <path>` | path to PP Neue Montreal fonts folder | prompt |
57
- | `--no-fonts` | skip font installation (use system fallback) | |
69
+ | `--no-fonts` | skip font installation (use system fallback) | - |
58
70
  | `--no-components` | skip component install | install all |
59
71
  | `--codeagent` | `cursor`, `claude`, `none` | prompt |
60
- | `--defaults` | force non-interactive mode | |
72
+ | `--defaults` | force non-interactive mode | - |
61
73
 
62
74
  ```bash
63
75
  npx @archetypeai/ds-cli init --pm npm --no-fonts --codeagent claude
64
76
  npx @archetypeai/ds-cli init --pm npm --fonts /path/to/fonts --codeagent claude
65
77
  ```
66
78
 
79
+ **Non-interactive mode** (no TTY or `--defaults`): `--fonts <path>` or `--no-fonts` and `--codeagent` must be specified (`--pm` is auto-detected from the lockfile when possible).
80
+
67
81
  ---
68
82
 
69
83
  ### `add` → Add components, tokens, or agent config
@@ -74,12 +88,12 @@ npx @archetypeai/ds-cli init --pm npm --fonts /path/to/fonts --codeagent claude
74
88
  npx @archetypeai/ds-cli add ds-ui-svelte
75
89
  ```
76
90
 
77
- Installs design tokens, all components from the registry, and optionally local fonts. Requires shadcn-svelte (`components.json` must exist).
91
+ Installs design tokens, all components from the atai registry, and optionally local fonts. If shadcn-svelte is not initialized yet, the CLI sets it up first (`components.json`, `src/lib/utils.js`, and the `cn()` dependencies), then installs every component listed by the registry's `/r/all.json` endpoint along with the component dependencies (`tailwind-variants`, `bits-ui`, `@lucide/svelte`, `layerchart`, `paneforge`).
78
92
 
79
93
  | Flag | Values | Default |
80
94
  |------|--------|---------|
81
95
  | `--fonts <path>` | path to PP Neue Montreal fonts folder | prompt |
82
- | `--no-fonts` | skip font installation (use system fallback) | |
96
+ | `--no-fonts` | skip font installation (use system fallback) | - |
83
97
 
84
98
  ```bash
85
99
  npx @archetypeai/ds-cli add ds-ui-svelte --fonts /path/to/fonts
@@ -92,12 +106,12 @@ npx @archetypeai/ds-cli add ds-ui-svelte --no-fonts
92
106
  npx @archetypeai/ds-cli add ds-lib-tokens
93
107
  ```
94
108
 
95
- Installs `@archetypeai/ds-lib-tokens` and optionally local fonts.
109
+ Installs `@archetypeai/ds-lib-tokens` (plus `tailwindcss` and `tw-animate-css`), prepends the imports to `src/routes/layout.css`, and optionally installs local fonts.
96
110
 
97
111
  | Flag | Values | Default |
98
112
  |------|--------|---------|
99
113
  | `--fonts <path>` | path to PP Neue Montreal fonts folder | prompt |
100
- | `--no-fonts` | skip font installation (use system fallback) | |
114
+ | `--no-fonts` | skip font installation (use system fallback) | - |
101
115
 
102
116
  ```bash
103
117
  npx @archetypeai/ds-cli add ds-lib-tokens --fonts /path/to/fonts
@@ -115,7 +129,19 @@ npx @archetypeai/ds-cli add ds-config-codeagent --claude
115
129
 
116
130
  | Flag | Effect |
117
131
  |------|--------|
118
- | `--cursor` | Installs AGENTS.md, skills, and rules to `.cursor/` |
119
- | `--claude` | Installs CLAUDE.md, skills, and rules to `.claude/` |
132
+ | `--cursor` | Copies `AGENTS.md` to the project root; skills, rules, and LICENSE to `.cursor/` |
133
+ | `--claude` | Copies `CLAUDE.md` to the project root; skills, rules, and LICENSE to `.claude/` |
134
+
135
+ Without a flag, an interactive prompt asks which IDE to configure (in non-interactive mode the flag is required). Files that already exist are skipped, so re-running is safe.
136
+
137
+ The configuration ships 7 skills (`apply-ds`, `build-pattern`, `create-dashboard`, `deploy-worker`, `fix-accessibility`, `fix-metadata`, `setup-chart`) and 8 rules (`accessibility`, `charts`, `components`, `design-principles`, `frontend-architecture`, `linting`, `state`, `styling`).
138
+
139
+ ---
140
+
141
+ ## Fonts
142
+
143
+ The `--fonts <path>` flag expects a local folder containing all 15 PP Neue Montreal files (9 Sans `.ttf` + 6 Mono `.otf`). The CLI validates the folder and copies the files to `static/fonts/`, where the `@font-face` declarations in `@archetypeai/ds-lib-tokens/fonts.css` expect them. With `--no-fonts`, the theme falls back to system fonts.
144
+
145
+ ## Registry
120
146
 
121
- Without a flag, an interactive prompt asks which IDE to configure.
147
+ Components are fetched from the atai registry at `https://design-system.archetypeai.workers.dev` (override with the `REGISTRY_URL` environment variable). The CLI validates every component URL (HTTPS, `/r/<name>.json` pattern) before passing it to `shadcn-svelte add`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archetypeai/ds-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Archetype AI Design System CLI Tool",
5
5
  "type": "module",
6
6
  "bin": {