analyze command inspects design files for token usage, inconsistencies, and repeated patterns.
Subcommands
| Command | Description |
|---|---|
colors | Color palette usage and similar color detection |
typography | Font family, size, and weight distribution |
spacing | Gap and padding values with grid alignment |
clusters | Repeated design patterns (potential components) |
colors
Analyze color palette usage, detect similar colors, and identify hardcoded vs. variable-based colors.Usage
Options
| Option | Description |
|---|---|
--limit | Max colors to show (default: 30) |
--threshold | Distance threshold for clustering similar colors 0–50 (default: 15) |
--similar | Show similar color clusters |
--json | Output as JSON |
Examples
Color usage histogram:What It Shows
- Histogram — colors sorted by usage (fills, strokes, effects)
- Variable attribution — shows
$variableNametag if color is bound to a variable - Summary — unique colors, variable-based, hardcoded
- Similar clusters — groups of colors within the threshold distance (Euclidean RGB space)
typography
Analyze font usage: families, sizes, weights, and line heights.Usage
Options
| Option | Description |
|---|---|
--group-by | Group by: family, size, weight (default: show all styles) |
--limit | Max styles to show (default: 30) |
--json | Output as JSON |
Examples
All styles:spacing
Analyze auto-layout spacing values (gap, padding) and detect off-grid values.Usage
Options
| Option | Description |
|---|---|
--grid | Base grid size to check against (default: 8) |
--json | Output as JSON |
Examples
Basic spacing audit:What It Shows
- Gap values —
itemSpacingandcounterAxisSpacingfrom auto-layout frames - Padding values —
paddingTop,paddingRight,paddingBottom,paddingLeft - Grid alignment — values not divisible by the grid size are marked with
⚠ - Summary — unique gap/padding values and off-grid violations
clusters
Find repeated design patterns that could be extracted into components.Usage
Options
| Option | Description |
|---|---|
--limit | Max clusters to show (default: 20) |
--min-size | Min node size in px (default: 30) |
--min-count | Min instances to form cluster (default: 2) |
--json | Output as JSON |
Examples
Find repeated patterns:How It Works
- Signature — nodes are clustered by type, size (rounded to 10px), and child structure
- Child structure — encodes child types and counts (e.g.,
Frame > [Text×2, Rect]) - Confidence score — based on size variance and child count consistency
- 100% = exact match (same size, same child count)
- 80–99% = minor variance (±10px, ±1 child)
- 60–79% = moderate variance (±20px, ±2 children)
Use Cases
- Identify component extraction candidates
- Audit design consistency
- Find duplicate artboards
- Detect copy-paste patterns that should be instances
JSON Output
Allanalyze subcommands support --json: