Skip to content

Commit 3f44819

Browse files
committed
fix README: correct flag docs and add version command
1 parent 7d2bfb1 commit 3f44819

2 files changed

Lines changed: 7 additions & 42 deletions

File tree

HOWTO.md

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -55,29 +55,9 @@ This creates a vocabulary that both humans and LLMs can use consistently.
5555

5656
### Three-Layer Design
5757

58-
tokenctl supports a three-layer architecture that enforces clean separation:
59-
60-
```
61-
┌─────────────────────────────────────────────────────┐
62-
│ COMPONENT LAYER │
63-
│ btn-bg, card-padding, input-border-radius │
64-
│ Can only reference: semantic tokens │
65-
└───────────────────────┬─────────────────────────────┘
66-
│ references
67-
┌───────────────────────▼─────────────────────────────┐
68-
│ SEMANTIC LAYER │
69-
│ primary, success, error, spacing-md │
70-
│ Can reference: brand tokens │
71-
└───────────────────────┬─────────────────────────────┘
72-
│ references
73-
┌───────────────────────▼─────────────────────────────┐
74-
│ BRAND LAYER │
75-
│ blue-500, gray-100, 1rem, 400 │
76-
│ Raw values only (no references) │
77-
└─────────────────────────────────────────────────────┘
78-
```
79-
80-
### Layer Definitions
58+
tokenctl uses a three-layer architecture: Brand (raw values) → Semantic (meaning) → Component (usage). See [TOKENS.md](TOKENS.md#token-architecture) for the full diagram, rationale, and layer reference rules.
59+
60+
### Layer Example
8161

8262
```json
8363
{
@@ -104,24 +84,6 @@ tokenctl supports a three-layer architecture that enforces clean separation:
10484
}
10585
```
10686

107-
### Why Layers Matter
108-
109-
**Without layers:**
110-
```css
111-
/* Component directly references raw value - tight coupling */
112-
.btn { background: #3b82f6; }
113-
```
114-
115-
**With layers:**
116-
```css
117-
/* Component references semantic token - loose coupling */
118-
.btn { background: var(--component-btn-bg); }
119-
```
120-
121-
When you change your brand color from blue to purple:
122-
- **Without layers:** Find and replace across entire codebase
123-
- **With layers:** Change `semantic.primary` reference, everything updates
124-
12587
---
12688

12789
## Getting Started

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ Creates:
4949
my-design-system/
5050
├── tokens/
5151
│ ├── brand/colors.json
52+
│ ├── surface/
5253
│ ├── semantic/status.json
54+
│ ├── typography/
5355
│ ├── spacing/scale.json
5456
│ └── themes/
5557
```
@@ -192,13 +194,14 @@ tokenctl build [dir...] # Build artifacts (multi-dir merge)
192194
--customizable-only # Only tokens marked $customizable: true
193195

194196
tokenctl validate [dir...] # Validate tokens (multi-dir merge)
195-
--strict # Fail on warnings
196197
--strict-layers # Enforce layer reference rules
197198

198199
tokenctl search [query] # Search tokens
199200
--type=<type> # Filter by type (color, dimension, etc.)
200201
--category=<cat> # Filter by category
201202
--dir=<dir> # Token directory (default: .)
203+
204+
tokenctl version # Print version information
202205
```
203206

204207
## Catalog Format (v2.1)

0 commit comments

Comments
 (0)