designagent-cli 0.1.0

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.
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: {{PROJECT_NAME}}
3
+ version: alpha
4
+ description: Design tokens for {{PROJECT_NAME}}. shadcn/ui-flavored neutral defaults — edit to match your brand.
5
+ colors:
6
+ primary: "#18181B"
7
+ on-primary: "#FAFAFA"
8
+ secondary: "#F4F4F5"
9
+ on-secondary: "#18181B"
10
+ tertiary: "#3F3F46"
11
+ on-tertiary: "#FAFAFA"
12
+ neutral: "#71717A"
13
+ surface: "#FFFFFF"
14
+ on-surface: "#09090B"
15
+ error: "#B91C1C"
16
+ on-error: "#FAFAFA"
17
+ outline: "#E4E4E7"
18
+ typography:
19
+ headline-display:
20
+ fontFamily: Geist
21
+ fontSize: 3rem
22
+ fontWeight: 600
23
+ lineHeight: 1.1
24
+ letterSpacing: "-0.02em"
25
+ headline-lg:
26
+ fontFamily: Geist
27
+ fontSize: 2.25rem
28
+ fontWeight: 600
29
+ lineHeight: 1.15
30
+ letterSpacing: "-0.01em"
31
+ headline-md:
32
+ fontFamily: Geist
33
+ fontSize: 1.5rem
34
+ fontWeight: 600
35
+ lineHeight: 1.25
36
+ body-lg:
37
+ fontFamily: Geist
38
+ fontSize: 1.125rem
39
+ fontWeight: 400
40
+ lineHeight: 1.6
41
+ body-md:
42
+ fontFamily: Geist
43
+ fontSize: 1rem
44
+ fontWeight: 400
45
+ lineHeight: 1.6
46
+ body-sm:
47
+ fontFamily: Geist
48
+ fontSize: 0.875rem
49
+ fontWeight: 400
50
+ lineHeight: 1.5
51
+ label-lg:
52
+ fontFamily: Geist
53
+ fontSize: 0.875rem
54
+ fontWeight: 500
55
+ lineHeight: 1.4
56
+ label-md:
57
+ fontFamily: Geist
58
+ fontSize: 0.75rem
59
+ fontWeight: 500
60
+ lineHeight: 1.4
61
+ label-sm:
62
+ fontFamily: Geist
63
+ fontSize: 0.6875rem
64
+ fontWeight: 500
65
+ lineHeight: 1.3
66
+ spacing:
67
+ xs: 4px
68
+ sm: 8px
69
+ md: 16px
70
+ lg: 24px
71
+ xl: 32px
72
+ xxl: 48px
73
+ rounded:
74
+ none: 0px
75
+ sm: 4px
76
+ md: 8px
77
+ lg: 12px
78
+ xl: 16px
79
+ full: 9999px
80
+ components:
81
+ button-primary:
82
+ backgroundColor: "{colors.primary}"
83
+ textColor: "{colors.on-primary}"
84
+ rounded: "{rounded.md}"
85
+ padding: 12px
86
+ button-secondary:
87
+ backgroundColor: "{colors.secondary}"
88
+ textColor: "{colors.on-secondary}"
89
+ rounded: "{rounded.md}"
90
+ padding: 12px
91
+ card:
92
+ backgroundColor: "{colors.surface}"
93
+ textColor: "{colors.on-surface}"
94
+ rounded: "{rounded.lg}"
95
+ padding: 16px
96
+ input:
97
+ backgroundColor: "{colors.surface}"
98
+ textColor: "{colors.on-surface}"
99
+ rounded: "{rounded.md}"
100
+ padding: 8px
101
+ ---
102
+
103
+ ## Overview
104
+
105
+ Design tokens for **{{PROJECT_NAME}}** in the shadcn/ui idiom — a restrained neutral (zinc) base with a near-black primary. Export to a Tailwind v4 `@theme` block with:
106
+
107
+ ```
108
+ npx @google/design.md export --format css-tailwind DESIGN.md
109
+ ```
110
+
111
+ Map these to your `globals.css` CSS variables (`--primary`, `--background`, `--foreground`, …). Swap the palette for your brand, then re-lint.
112
+
113
+ ## Colors
114
+
115
+ shadcn leans on a neutral scale with a single strong primary. `surface`/`on-surface` are background/foreground; `secondary` is the muted button/chip; `outline` is the border token.
116
+
117
+ ## Typography
118
+
119
+ `Geist` across the scale, tight tracking on headlines. `headline-*` for titles, `body-*` for prose, `label-*` for controls.
120
+
121
+ ## Layout
122
+
123
+ 4px-based spacing scale. Use for padding, gaps, and margins consistently.
124
+
125
+ ## Elevation & Depth
126
+
127
+ shadcn is flat by default — borders (`outline`) and subtle shadows over heavy elevation. One soft shadow for popovers/menus; cards rely on border + surface contrast.
128
+
129
+ ## Shapes
130
+
131
+ `rounded.md` (8px) is the shadcn default radius for buttons and inputs; `lg` for cards, `full` for pills/avatars.
132
+
133
+ ## Components
134
+
135
+ Primitives composed from tokens, mirroring shadcn's `Button`, `Card`, and `Input`. Extend by composition.
136
+
137
+ ## Do's and Don'ts
138
+
139
+ - **Do** map tokens to your CSS variables and reference them everywhere.
140
+ - **Do** keep AA contrast on every surface/foreground pair.
141
+ - **Don't** hardcode hex in components — reference color tokens.
142
+ - **Don't** drift off the spacing or radius scale.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: {{PROJECT_NAME}}
3
+ version: alpha
4
+ description: Design tokens for {{PROJECT_NAME}}. Tailwind-flavored defaults — edit to match your brand.
5
+ colors:
6
+ primary: "#1D4ED8"
7
+ on-primary: "#FFFFFF"
8
+ secondary: "#334155"
9
+ on-secondary: "#FFFFFF"
10
+ tertiary: "#6D28D9"
11
+ on-tertiary: "#FFFFFF"
12
+ neutral: "#64748B"
13
+ surface: "#FFFFFF"
14
+ on-surface: "#0F172A"
15
+ error: "#B91C1C"
16
+ on-error: "#FFFFFF"
17
+ outline: "#CBD5E1"
18
+ typography:
19
+ headline-display:
20
+ fontFamily: Inter
21
+ fontSize: 3rem
22
+ fontWeight: 700
23
+ lineHeight: 1.1
24
+ letterSpacing: "-0.02em"
25
+ headline-lg:
26
+ fontFamily: Inter
27
+ fontSize: 2.25rem
28
+ fontWeight: 700
29
+ lineHeight: 1.15
30
+ headline-md:
31
+ fontFamily: Inter
32
+ fontSize: 1.5rem
33
+ fontWeight: 600
34
+ lineHeight: 1.25
35
+ body-lg:
36
+ fontFamily: Inter
37
+ fontSize: 1.125rem
38
+ fontWeight: 400
39
+ lineHeight: 1.6
40
+ body-md:
41
+ fontFamily: Inter
42
+ fontSize: 1rem
43
+ fontWeight: 400
44
+ lineHeight: 1.6
45
+ body-sm:
46
+ fontFamily: Inter
47
+ fontSize: 0.875rem
48
+ fontWeight: 400
49
+ lineHeight: 1.5
50
+ label-lg:
51
+ fontFamily: Inter
52
+ fontSize: 0.875rem
53
+ fontWeight: 500
54
+ lineHeight: 1.4
55
+ label-md:
56
+ fontFamily: Inter
57
+ fontSize: 0.75rem
58
+ fontWeight: 500
59
+ lineHeight: 1.4
60
+ label-sm:
61
+ fontFamily: Inter
62
+ fontSize: 0.6875rem
63
+ fontWeight: 500
64
+ lineHeight: 1.3
65
+ spacing:
66
+ xs: 4px
67
+ sm: 8px
68
+ md: 16px
69
+ lg: 24px
70
+ xl: 32px
71
+ xxl: 48px
72
+ rounded:
73
+ none: 0px
74
+ sm: 4px
75
+ md: 8px
76
+ lg: 12px
77
+ xl: 16px
78
+ full: 9999px
79
+ components:
80
+ button-primary:
81
+ backgroundColor: "{colors.primary}"
82
+ textColor: "{colors.on-primary}"
83
+ rounded: "{rounded.md}"
84
+ padding: 12px
85
+ button-secondary:
86
+ backgroundColor: "{colors.secondary}"
87
+ textColor: "{colors.on-secondary}"
88
+ rounded: "{rounded.md}"
89
+ padding: 12px
90
+ card:
91
+ backgroundColor: "{colors.surface}"
92
+ textColor: "{colors.on-surface}"
93
+ rounded: "{rounded.lg}"
94
+ padding: 16px
95
+ input:
96
+ backgroundColor: "{colors.surface}"
97
+ textColor: "{colors.on-surface}"
98
+ rounded: "{rounded.sm}"
99
+ padding: 8px
100
+ ---
101
+
102
+ ## Overview
103
+
104
+ Design tokens for **{{PROJECT_NAME}}**, expressed in the Tailwind idiom. Export to a Tailwind v4 `@theme` block with:
105
+
106
+ ```
107
+ npx @google/design.md export --format css-tailwind DESIGN.md
108
+ ```
109
+
110
+ These are sensible defaults — replace the palette and type with your brand, then re-lint.
111
+
112
+ ## Colors
113
+
114
+ Role-based palette. Pair each surface/role with its `on-*` foreground for legible, AA-compliant contrast.
115
+
116
+ - `primary` / `on-primary` — primary actions and key emphasis.
117
+ - `secondary` / `on-secondary` — secondary actions and supporting UI.
118
+ - `tertiary` / `on-tertiary` — accents and highlights.
119
+ - `surface` / `on-surface` — backgrounds and the content on them.
120
+ - `neutral` — muted text, dividers, disabled states.
121
+ - `outline` — borders and separators.
122
+ - `error` / `on-error` — destructive actions and error states.
123
+
124
+ ## Typography
125
+
126
+ `Inter` across the scale. `headline-*` for titles, `body-*` for prose, `label-*` for UI text and controls. Line heights are unitless multipliers of font size.
127
+
128
+ ## Layout
129
+
130
+ Spacing scale in multiples of 4px (`xs`=4 → `xxl`=48). Use these for padding, margin, and gaps. No off-scale values.
131
+
132
+ ## Elevation & Depth
133
+
134
+ Keep elevation minimal. Prefer a single subtle shadow for raised surfaces (cards, menus) and rely on `surface`/`outline` contrast for separation rather than stacking shadows.
135
+
136
+ ## Shapes
137
+
138
+ Corner radii from `none` to `full`. `sm` for inputs, `md` for buttons, `lg` for cards, `full` for pills and avatars.
139
+
140
+ ## Components
141
+
142
+ Token-composed primitives. Each component references color, shape, and spacing tokens so a change to the scale propagates everywhere. Extend by composing these, not by hardcoding values.
143
+
144
+ ## Do's and Don'ts
145
+
146
+ - **Do** reference tokens (`{colors.primary}`) instead of raw values.
147
+ - **Do** keep every `on-*` / surface pair at WCAG AA contrast.
148
+ - **Don't** introduce off-scale spacing or one-off font sizes.
149
+ - **Don't** add raw hex in components — point at a color token.
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "designagent-cli",
3
+ "version": "0.1.0",
4
+ "description": "The design brain Claude Code needs. npx designagent-cli init — web, mobile, any canvas, any framework.",
5
+ "type": "module",
6
+ "bin": {
7
+ "designagent": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "rm -rf dist && bun build src/index.ts --target node --outfile dist/index.js --external @clack/prompts --external @google/design.md --external picocolors --external postcss --external ts-morph && node scripts/copy-assets.mjs",
15
+ "typecheck": "tsc -p tsconfig.json --noEmit",
16
+ "test": "bun ./test/smoke.mjs && bun ./test/e2e.mjs",
17
+ "dev": "bun run src/index.ts",
18
+ "start": "node dist/index.js"
19
+ },
20
+ "keywords": [
21
+ "claude-code",
22
+ "design-system",
23
+ "design-tokens",
24
+ "design.md",
25
+ "cli",
26
+ "figma",
27
+ "ai",
28
+ "designagent"
29
+ ],
30
+ "author": "Sherizan Sheikh",
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@clack/prompts": "^0.9.0",
34
+ "@google/design.md": "^0.2.0",
35
+ "picocolors": "^1.1.1",
36
+ "postcss": "^8.4.49",
37
+ "ts-morph": "^24.0.0"
38
+ },
39
+ "//deps": "scanner + docs + studio are bundled into dist/index.js at build time (bun build) — not runtime deps. postcss (scanner) and ts-morph (studio) are external runtime deps. @designagent/* stay workspace devDependencies so the bundler can resolve them.",
40
+ "devDependencies": {
41
+ "typescript": "^5.7.0",
42
+ "@types/node": "^22.10.0",
43
+ "@designagent/scanner": "workspace:*",
44
+ "@designagent/docs": "workspace:*",
45
+ "@designagent/studio": "workspace:*"
46
+ },
47
+ "engines": {
48
+ "node": ">=18"
49
+ },
50
+ "homepage": "https://designagent.dev",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/sherizan/designagent.git",
54
+ "directory": "packages/cli"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/sherizan/designagent/issues"
58
+ }
59
+ }