Marque Documentation
Capture the design language of any website and inject it into every AI coding tool in your workflow. This guide covers installation, the MCP workflow, all CLI commands including blend and improve, configuration, output formats, and the architecture behind the stamp-synthesize-sync pipeline.
Try It
See how Marque captures a reference site, synthesizes a design mark, and syncs to all your AI tools. Pick a site and hit Capture.
Getting Started
Installation
Marque requires Node.js 18+. No account or API key needed.
$ npm install -g marque-cli$ npx marque-cli initThe init wizard will ask you about your product:
First capture
Point Marque at any reference site. It launches a headless Playwright browser, scrapes CSS tokens, typography, layout patterns, scroll choreography, and captures screenshots at every section boundary.
$ marque stamp https://linear.app$ marque synthesize --apply$ marque syncMCP setup
Register Marque as an MCP server so your AI agent can access design context directly during coding sessions.
$ marque mcp setup$ marque mcp setup --globalOnce registered, your agent gets access to tools that mirror the CLI directly: status(), stamp(url), synthesize(mark), generate(section), diff(url), get_design_context_for(section), get_tokens(), and get_anti_defaults(). The agent explicitly states which CLI command it is running at each step.
MCP Workflow
When the Marque MCP server is active, your agent follows a structured workflow. Each MCP tool maps directly to a CLI command — the agent announces which command it is running at every step.
Setup workflow (first time)
status()→ marque statusinit(name, freeformBrief)→ marque initstamp(url)→ marque stamp <url>(agent synthesizes)synthesize(mark)→ marque synthesize --applyBuild workflow (ongoing)
get_design_context_for(sectionType)get_anti_defaults()generate(sectionType)→ marque generate <section>diff(url)→ marque diff --url <url>get_tokens()CLI Reference
All commands are stateless filesystem operations. The .marque/config.json file is the source of truth.
Setup
init
marque initInteractive wizard that creates .marque/config.json with your product identity. Auto-syncs agent rule files after setup.
stamp
marque stamp <url> [--label <name>]Scrapes a website using Playwright. Extracts CSS tokens, colors, fonts, spacing, animations, scroll storyboard, and captures screenshots at section boundaries. Returns a synthesis prompt for your agent to fill. Takes about 30 seconds.
| Flag | Type | Default | Description |
|---|---|---|---|
| -l, --label | string | domain | Custom label for this reference |
synthesize
marque synthesize [--apply [filepath]]Without flags, re-prints synthesis prompts from stored raw scrape data. With --apply, reads the agent-produced design mark JSON from stdin or file, validates it against the schema, saves it to config, and auto-syncs all agent rule files.
| Flag | Type | Default | Description |
|---|---|---|---|
| -a, --apply | string | bool | .marque/pending-mark.json | Load and apply agent-produced mark from file or stdin |
sync
marque syncManually re-sync all agent rule files. Formats your design language and writes it to all 10 sync targets. Usually auto-triggered when config changes.
Agent Setup
mcp setup
marque mcp setup [--global]Registers Marque as an MCP server in your AI tools. Project-level writes to .claude/mcp.json, .cursor/mcp.json, and mcp_servers.json. Global mode writes to ~/.claude/mcp.json and ~/.cursor/mcp.json for cross-project access.
| Flag | Type | Default | Description |
|---|---|---|---|
| -g, --global | bool | false | Register globally instead of per-project |
Build
generate
marque generate <section>Generates an agent prompt for designing a UI section. Built-in section types: hero, features, pricing, cta, footer. The prompt includes creative intent, section guidance, anti-defaults, tokens, and patterns.
| Flag | Type | Default | Description |
|---|---|---|---|
| -p, --prompt | bool | false | Force generation prompt even if template exists |
| -a, --apply | string | - | Write JSX directly to file |
diff
marque diff --url <url> | --screenshot <path>Screenshots your dev server (or uses an existing screenshot) and compares it against reference screenshots. Your agent produces corrections.
| Flag | Type | Default | Description |
|---|---|---|---|
| -u, --url | string | - | Dev server URL to screenshot |
| -s, --screenshot | string | - | Use existing screenshot file |
| -a, --apply | string | bool | - | Save corrections to .marque/corrections.md |
| -r, --resolved | bool | false | Mark all pending corrections as resolved |
watch
marque watchWatches tagged exemplar components for changes. Re-extracts patterns on file save and re-syncs rule files automatically.
Quality
audit
marque auditScans your codebase for anti-default violations. Checks colors, border radius, typography, and spacing against your design language. Outputs a compliance score 0-100 with letter grade.
| Flag | Type | Default | Description |
|---|---|---|---|
| -s, --strict | bool | false | Treat all violations as critical |
| -t, --threshold | number | - | Exit with error if score below value (for CI) |
| -j, --json | bool | false | Output full result as JSON |
| -a, --apply | string | bool | - | Generate fix prompt for every violation |
| -d, --src-dir | string | src | Source directory to scan |
ci setup
marque ci setupGenerates a GitHub Actions workflow file that runs design audits on every PR. Fails the build if the design score drops below the threshold.
| Flag | Type | Default | Description |
|---|---|---|---|
| -t, --threshold | number | 80 | Fail build if score below this |
| -d, --src-dir | string | src | Source directory to audit |
badge
marque badgePrints a shields.io badge URL for your design compliance score. Add it to your README. Requires running marque audit first.
score
marque score --url <url>Screenshots a live website and has your agent evaluate it against your design mark. Scores 6 areas: color, border-radius, typography, layout, anti-defaults, and cohesion. Returns overall score 0-100 with grade and observations.
| Flag | Type | Default | Description |
|---|---|---|---|
| -u, --url | string | - | URL to screenshot and score |
| -s, --screenshot | string | - | Use existing screenshot |
| -a, --apply | string | bool | - | Save score JSON to .marque/pending-score.json |
| --show | bool | false | Display last saved score |
improve
marque improve <url> [--loop] [--target <score>]Combined audit + diff + score improvement loop. Screenshots your running dev server, compares it to your design mark, and produces a corrections brief with specific element-level fixes. With --loop, watches your source directory and re-scores on every file change — running until the score reaches the target threshold.
| Flag | Type | Default | Description |
|---|---|---|---|
| -l, --loop | bool | false | Watch src/ and re-run on every file change |
| -t, --target | number | 85 | Stop the loop when score reaches this threshold |
| -s, --section | string | - | Focus corrections on a specific section type |
Inspect
status
marque statusShows your full design profile: identity card, references count, mark status, token summary, anti-defaults, section templates, pending corrections, and stale references.
context
marque context [-f format]Prints the formatted design context that gets injected into agent rule files. Useful for debugging what your agents actually see.
| Flag | Type | Default | Description |
|---|---|---|---|
| -f, --format | string | markdown | Output format: markdown, cursor, or json |
refresh
marque refresh [--stale]Re-scrapes all reference URLs and merges updated data. Use --stale to only refresh references older than 30 days.
| Flag | Type | Default | Description |
|---|---|---|---|
| -s, --stale | bool | false | Only refresh references older than 30 days |
add component
marque add component <path>Tags a component file as an exemplar (good pattern to follow) or anti-pattern (what to avoid). Extracts up to 2000 characters of pattern code for agent reference.
| Flag | Type | Default | Description |
|---|---|---|---|
| -l, --label | string | - | Custom label for the component |
| -t, --type | string | exemplar | Component type: exemplar or anti-pattern |
| -n, --notes | string | - | Explanation of why this is exemplar/anti-pattern |
review
marque review [dir]Scans a directory for untagged components. Helps you find components that should be marked as exemplar or anti-pattern.
| Flag | Type | Default | Description |
|---|---|---|---|
| -d, --dir | string | src/components | Directory to scan |
Blend
Real design taste is rarely singular. You want the motion sensibility of one site and the information density of another. marque blend scrapes multiple reference URLs in parallel and synthesizes a weighted hybrid mark from their combined vocabularies.
$ marque blend lusion.co vercel.com$ marque blend lusion.co vercel.com 0.7 0.3How blending works
ColorsDominant reference wins background, surface, and text. Minor reference contributes its accent as accent-secondary. Unique semantic keys from either side are included.TypographyFont family and letter-spacing come from the higher-weighted reference. Numeric size values are interpolated by weight across both scales.MotionTiming rules and easing curves are merged. Conflicts resolve by weight. You can pin motion to a specific reference with --motion-ref first|second.Anti-defaultsUnion of both references. If either site avoids something, the blend avoids it too — the more restrictive rule always wins.PatternsStructural patterns are pulled from both references and deduplicated. Unique patterns from each side are included in full.MetaphorA new conceptPhilosophy is generated that describes the creative tension between the two references as a design identity — not an average, but a resolution.blend
marque blend <urlA> <urlB> [weightA] [weightB]Scrapes both URLs in parallel (or uses cached snapshots), performs a weighted merge across all design dimensions, generates a new synthesis prompt, and saves the blended mark as the active design language.
| Flag | Type | Default | Description |
|---|---|---|---|
| --motion-ref | string | dominant | Pin motion vocabulary to first, second, or dominant reference |
| -l, --label | string | blend | Label for the blended mark |
Improve Loop
Marque front-loads design intelligence at the start of a build. The improve loop closes the other end: it actively measures your running implementation against the mark and pulls it back toward compliance on every iteration.
Without the loop, agents drift. They start with the right tokens and by the third component they are back to generic defaults. The improve loop treats the mark as a living contract.
How it works
ScreenshotCaptures your running dev server at the specified URL using Playwright.ScoreSends the screenshot alongside the full mark to a vision model. Gets back specific element-level violations: selector, rule broken, what the mark says it should be.WriteViolations are written to .marque/corrections.md with line-by-line fixes. Each iteration appends a timestamped snapshot.WatchWith --loop, monitors your src/ directory for file changes. Any save triggers a re-screenshot and re-score.DeltaAfter each iteration, shows score delta: what improved, what regressed, how many violations remain.StopLoop exits automatically when the score reaches --target, or when you press Ctrl+C.$ marque improve http://localhost:3000 --loop --target 85$ marque improve http://localhost:3000 --section heroConfiguration
All configuration lives in .marque/config.json at your project root. Marque searches upward from the current directory to find it.
Identity
Your product identity drives every synthesis decision. It is the first thing agents read.
References
Each reference captures a complete snapshot of a scraped site: colors, typography, layout, scroll storyboard, and screenshots.
Components
Tagged exemplar and anti-pattern components. Their extracted code is included in agent context so your agent learns from your best (and worst) work.
Generated files
Marque creates and manages these files in the .marque/ directory:
config.jsonPrimary configuration -- source of truthpending-mark.jsonAgent-produced design mark awaiting --applypending-score.jsonAgent-produced visual compliance scorecorrections.mdPending design corrections from diffscreenshots/Reference screenshots from capturemark-export.jsonExported design mark for sharingsynthesis-prompt-*.txtGenerated synthesis prompts per referenceOutput Formats
Sync targets
Marque writes your design language to 10 agent instruction files simultaneously. Each file is auto-generated and prefixed with a warning header.
.cursorrulesCursor (legacy).cursor/rules/marque.mdcCursor v0.47+.github/copilot-instructions.mdGitHub Copilot.claudecodeClaude Code (legacy).claude/instructions.mdClaude Code.windsurfrulesWindsurfAGENTS.mdOpenAI Codex CLI.agent/rules/marque.mdAntigravity.marque.mdStandalone referencemission.mdAntigravity identity (shorter)Context sections
The formatted context that gets injected into each file contains up to 10 prioritized sections, token-optimized to fit within agent context limits:
Architecture
Marque operates as a three-phase pipeline. All commands are stateless filesystem operations -- the .marque/config.json file is the single source of truth.
Phase 1: Stamp
Marque launches a headless Chromium browser via Playwright (viewport 1440x900). It navigates to the target URL, waits for network idle, then extracts:
Phase 2: Synthesize
Your AI agent (in your editor or terminal) reads the raw scrape data plus your product identity. It produces a structured design mark JSON document containing tokens, anti-defaults, patterns, section guidance, scroll choreography, and animation palettes. This JSON is validated against a Zod schema before being saved.
Phase 3: Sync
The format engine takes your design mark and produces a token-optimized markdown string (default 4000-token budget). Content is prioritized: identity and anti-defaults first, patterns and animations last. This formatted context is written to all 10 sync targets simultaneously.
Presets
Marque ships with 5 hand-crafted design systems distilled from extensive analysis of real products. Use them as starting points or merge them with your own mark.
$ marque use linear$ marque use stripe --baselinearMaximum contrast, ruthless reduction, precision engineering. Pure black backgrounds, muted purple accent, near-sharp corners, no shadows.
stripeRich color with careful layering. Navy backgrounds, indigo accent, soft 12px radius, gradient borders, premium depth.
vercelPure black-white contrast, monochrome restraint. No color accents -- uses inversion (white-on-black CTAs), sharp 6px radius, flat borders.
notionWarm off-white, editorial typography. Georgia serif body text, barely-rounded 4px corners, content-first hierarchy, book-like reading experience.
githubHigh-density information design. Cool-tinted dark canvas, muted blue links, GitHub green accents, developer-centric layouts.