cli-pro
v0.3.0Design-system adoption analytics for React, Vue and Angular: coverage, overrides, design tokens, run-to-run comparison, charts for Confluence and Figma, and an…
Quick start · MCP server · Compare runs · Charts · CLI reference · componly.co The package is @componlyco/cli-pro and the command is componly-pro. Componly Pro validates a CLI key online. In a terminal, just run it:
Summary extracted from the README.
Componly Pro
Design-system adoption analytics for React, Vue and Angular. Measured on your machine, tracked over time, and available to your AI assistant through MCP.
Quick start · MCP server · Compare runs · Charts · CLI reference · componly.co
export COMPONLY_CLI_KEY="<your CLI key>" COMPONLY_EMAIL="you@company.com"
npx @componlyco/cli-pro run -d 'ui=src/components/ui/**'
Adoption
Instance 61.3% 2,391 / 3,900 (headline)
Unique 24.4% 200 / 820
Reach 78.0% 448 / 574
Features
- Adoption you can trust: Instance, unique and reach coverage of your design system. Exact counts follow imports through aliases, barrels, re-exports and workspace packages.
- Every usage, located: file, line, column and props for every component, plus which custom components wrap or override design-system components.
- Design tokens: how much of your styling uses tokens instead of hard-coded colours, spacing and type, per category, with the worst drift listed.
- Run history and compare: every scan is kept in a dated folder.
compareshows what changed across 2 to 6 scans, as a terminal table and as charts, and can fail CI when coverage drops. - Charts: SVG and high-resolution PNG, ready for Confluence, Figma, GitHub and slides, plus Mermaid for the override graph.
- Publish and embed (opt-in):
run --publishputs the report on a private link you can embed in Confluence or paste into Figma. Nothing is uploaded unless you ask for it. - MCP server: Claude, Cursor and VS Code can scan a project, list migration targets, explain overrides and compare runs.
- Drop-in for
@componlyco/cli: the same JSON structure ascomponly run(validated against v1's schema), plus a v2 summary block. - Private by design: your code never leaves your machine. No telemetry. The only network calls are the CLI-key check and, only when you turn on publishing, the report upload.
Frameworks: React, Next.js, Vue, Nuxt, Angular. Design systems: an npm package (@acme/ui, @mui/material) or a folder in your repo, detected automatically when you don't configure one.
Contents
- Requirements
- Installation
- Authentication
- Quick start
- Configure your design system
- Reading the report
- Run history and compare
- Charts
- Publish and embed
- MCP server
- Continuous integration
- CLI reference
- The JSON report
- Security and privacy
- Troubleshooting
- Migrating from
@componlyco/cli - Licence
Requirements
| Node.js | 22.18 or newer |
| Componly CLI key | From your Componly workspace (see Authentication) |
| Vue, Nuxt or Angular projects | Install the project's dependencies first. The scanner uses your project's own vue/compiler-sfc or @angular/compiler. |
| React and Next.js | Nothing else. node_modules is optional; it lets the scanner count an npm design system's exports. |
Installation
# Run without installing
npx @componlyco/cli-pro run
# Per project (recommended for CI: pins the version)
npm install --save-dev @componlyco/cli-pro # or: pnpm add -D / yarn add -D
# Globally (recommended for the MCP server: faster start-up)
npm install -g @componlyco/cli-pro
componly-pro --version
The package is @componlyco/cli-pro and the command is componly-pro.
Authentication
Componly Pro validates a CLI key online. In a terminal, just run it:
$ componly-pro run
? Componly CLI key › ••••••••
? Email for your seat on this machine › you@company.com
✔ Seat reserved for you@company.com on this machine
? Save the key on this machine so you're not asked again? (Y/n) › Yes
- The key is masked while you type. A wrong key can be retried up to 3 times.
- The email is asked only when a seat needs to be reserved for this machine (the same flow as
@componlyco/cli). - Saving is optional. A saved key goes to
~/.config/componly/credentials.json, readable only by you, andcomponly-pro logoutremoves it. - Order of precedence: the
-kflag, thenCOMPONLY_CLI_KEY, then the saved key.componly-pro license statusshows which one was used, and never prints the key.
In CI and scripts, set the variables instead. Prefer them over -k, which shows up in process lists:
export COMPONLY_CLI_KEY="<your CLI key>"
export COMPONLY_EMAIL="you@company.com" # reserves a seat for this machine on first use
- Short outages: after a successful check, the result is cached for 7 days, so short network outages don't break your builds. The cache lives in
~/.config/componly/validation.json(permissions 0600) and never stores the key. - MCP server: it uses one variable,
COMPONLY_MCP_AUTH, the base64 ofemail:cli-key(see MCP server). - No questions in CI: questions are asked only in an interactive terminal. With
CIset,--no-interactive,COMPONLY_NO_INTERACTIVE=1or no TTY, a missing key is an error (exit 2), so nothing ever hangs waiting for input. - No check needed:
init,logout,schema,mcp --print-config,mcp --print-auth,--helpand--versionwork without any credentials. - Air-gapped machines: there is no offline licence. Use the free, MIT-licensed
@componlyco/cli-lite.
| Message | Fix |
|---|---|
no credentials found: set COMPONLY_CLI_KEY ... |
Set COMPONLY_CLI_KEY and COMPONLY_EMAIL, or COMPONLY_MCP_AUTH for MCP. |
Invalid or expired CLI key |
Check the key, or ask Componly for a new one. |
pass --email <address> ... / ... is not a valid email address |
A seat must be reserved: pass -e or set COMPONLY_EMAIL. |
could not reach Componly (...) and there is no valid cached validation |
Restore connectivity (DNS, VPN, proxy), or use @componlyco/cli-lite. |
CLI key expired on <date> |
Renew the key. |
... (the saved key was rejected; run componly-pro logout ...) |
Run componly-pro logout, then run again to enter a new key. |
COMPONLY_MCP_AUTH is malformed: ... |
Recreate the token with componly-pro mcp --print-auth. |
Offline licences are no longer supported. ... |
Remove --license / COMPONLY_LICENSE, and use a CLI key or cli-lite. |
COMPONLY_BACKEND_URL overrides the API base URL. It must be https; plain http is allowed only for localhost.
Quick start
The fastest start is the setup wizard, which asks a few questions and writes componly.config.json:
$ componly-pro init
✔ Which framework does this project use? React / Next.js (detected)
Looking for your design system...
✔ Which design system should Componly measure? src/components/ui (detected, used in 412 files)
✔ Add another design system? No
✔ Also measure design-token usage (colours, spacing...)? Yes
✔ Fail CI when design-system coverage drops below? 35%
✔ Paths to ignore? (none)
✔ Write componly.config.json? Yes
The first componly-pro run in a project without a config offers the same setup. Or skip it and pass everything as flags.
Run it from the project root (the folder with package.json), or pass the folder: componly-pro run ./web.
componly-pro run -d 'core=src/components/core/**' # design system is a folder in this repo
componly-pro run -d @acme/ui # design system is an npm package
componly-pro run # nothing configured: detect it automatically
componly-pro run -d @acme/ui --include-tokens --charts # also tokens and charts
Each run prints a report and saves it in its own folder in the scanned project:
Saved run 2026-11-20 14:32:05 (latest) → .componly/runs/2026-11-20_14-32-05/
.componly/
├── runs/
│ └── 2026-11-20_14-32-05/ one folder per scan, named by local date and time
│ ├── report.json the full report
│ ├── run.json time, content hash, git commit, headline numbers
│ └── charts/ with --charts
└── compare/ written by `componly-pro compare`
Add .componly/ to .gitignore, or commit .componly/runs/ to keep the history in git. Componly Pro never edits .gitignore, your code or your configuration.
Configure your design system
Coverage is always measured against a design system. Define it in one of three ways.
1. On the command line: -d <name>=<match>, repeatable.
| You write | Meaning |
|---|---|
-d @acme/ui |
Package @acme/ui and its subpaths (@acme/ui/Button), labelled @acme/ui. @acme/ui-icons does not match. |
-d acme=@acme/ui |
The same, labelled acme. |
-d 'core=src/components/core/**' |
Every component defined in files under that folder. |
-d 'ui=src/components/ui' |
A plain folder means everything under it. |
-d 'core=src/core/**' -d mantine=@mantine/core |
Several design systems; each gets its own row. |
Rules for folders and globs:
- Paths are relative to the project root and case-sensitive.
- Quote globs so your shell doesn't expand them.
- A folder needs a name (
-d ds=src/ds, not-d src/ds). - A value that looks like an npm package name is treated as a package. For a folder at the root with a package-like name, write
ui=./ui.
2. In componly.config.json. componly-pro init writes it for you, or write it by hand (the v1 format, read unchanged):
{
"designSystems": [
{ "alias": "@acme/ui" },
{ "alias": "core", "relativePaths": ["src/components/core"] }
]
}
3. Automatically, when nothing is configured. A folder is used as the design system when both of these are true:
- Its name says so. The folder or a parent is named
design-system(s),designSystem,ds,ui,ui-kit,kit,primitives,*-ui,ui-*or*-design-system. - It is used broadly. At least 3 of its components are used outside it, from at least 5 files, in at least 2 areas of the app.
Generic folders (src/components, shared, common) and npm packages are never auto-detected. Configuring any design system turns detection off.
Reading the report
Componly Scan Report
Project posthog-frontend (react) · 1,493 files · 0.6 s
Adoption
Instance 61.3% 2,391 / 3,900 (headline)
Unique 24.4% 200 / 820
Reach 78.0% 448 / 574
Design systems components usages exports used
lemon (src/lib/lemon-ui/**) 200 2,391 60.6%
Most used design-system components Top custom components (migration targets)
LemonButton 601 CodeSnippet 88
Link 159 PageHeader 48
… …
Most wrapped design-system components (custom wrappers)
LemonSelect 4 wrappers, 5 wrapped usages
…
Third-party libraries Design tokens
antd 712 overall 28.8% · color 77.1% · radius 64.3% · spacing 0.2% · …
@ant-design/icons 134
Warnings
DYNAMIC_TAG 41
…
Adoption compares design-system components with components your team built itself ("homebrew"). HTML elements, framework built-ins and third-party libraries are reported, but they never lower the score.
| Metric | Question it answers |
|---|---|
| Instance (headline) | Of every place a component is used, how many use the design system? A component used 50 times counts 50 times. --fail-under checks this number. |
| Unique | Of the different components in use, how many come from the design system? If unique is higher than instance, a few homebrew components are used everywhere: those are your biggest migration targets. |
| Reach | In how many component-rendering files does the design system appear at all? |
| Section | Meaning |
|---|---|
| Design systems | Per design system: distinct components used, usages, and the share of its components the app uses (exports used). |
| Most used design-system components | What your design system is mostly used for. |
| Top custom components (migration targets) | The most-used homebrew components. Replacing the top few gives the largest adoption gain. A second Button or Select is the clearest sign of drift. |
| Most wrapped design-system components | Design-system components your team wraps in a custom component (a fixed variant, extra styling). Many wrappers around one component usually means a missing variant or prop. |
| Third-party libraries | npm component libraries in use. A large one here is often a second, unofficial design system. |
| Design tokens | With --include-tokens: token usages ÷ (token usages + hard-coded values), overall and per category. |
| Warnings | What the scanner could not fully analyse, with counts. Warnings never fail a run. |
A last block repeats the exact lines componly run (v1) printed, so scripts that grep them keep working. Use the Instance number for decisions.
For every usage the engine finds the file or package that declares the component. It follows relative imports, index files, tsconfig/jsconfig paths, Vite, webpack, Next, Nuxt and Vue CLI aliases (read, never executed), barrels, re-exports, renamed and namespace imports, and monorepo workspace packages.
| Class | When |
|---|---|
| designSystem | Declared in a design-system package or folder. |
| thirdParty | Declared in any other npm package. |
| custom | Declared in your repo. One of three kinds, decided by what it renders itself (see below). |
| native | An HTML, SVG or MathML element. Not counted. |
| framework | Fragment, Suspense, Vue Transition, Angular ng-container, and similar. Not counted. |
| unknown | A dynamic tag or an unresolvable import. Reported as a warning. |
The three kinds of custom component:
| Kind | Rule | Counted in adoption? |
|---|---|---|
| homebrew | Renders at least one native element or a styled.div-style primitive. |
Yes: the "not using the design system" side. |
| dsComposed | Renders only design-system components, or is styled(DsButton), memo or forwardRef around one. |
No: it's design-system use under a local name. |
| composite | Renders other custom components, children, null or providers (pages, layouts). |
No: pages and layouts aren't reinventions. |
Usages inside the design-system folder itself, and in test and story files (unless --include-tests), are not counted.
| Code | Meaning | What to do |
|---|---|---|
UNRESOLVED_IMPORT |
An import couldn't be resolved. | Usually an unknown alias: add --alias. |
DYNAMIC_TAG |
A tag is a variable (<Component/>). |
Nothing; it can't be identified statically. |
ALIAS_FALLBACK |
A bare import was resolved by convention. | Usually correct; define the alias to silence it. |
ALIAS_UNRESOLVED |
A bundler alias couldn't be read statically. | Pass it with --alias. |
FRAMEWORK_INFERRED |
The framework was inferred from files. | Pass -t to be explicit. |
PARSE_RECOVERED / PARSE_ERROR |
A file had syntax errors. | Check the file. |
FILE_TOO_LARGE |
A file over 1 MB, or minified, was skipped. | Expected for generated files. |
TEMPLATE_PARSE_FAILED / UNSUPPORTED_TEMPLATE |
An Angular template failed to parse, or a template language such as Pug isn't supported. | Check the template. |
ASSET_NOT_FOUND |
A templateUrl / styleUrls file is missing. |
Check the path. |
MISSING_COMPILER |
The project's Vue or Angular compiler couldn't be loaded. | Install the project's dependencies. |
TOKEN_ALIAS_CYCLE / TOKEN_ALIAS_BROKEN / TOKEN_UNRESOLVED |
A token refers to itself, to a missing token, or needs evaluation. | Fix the token file. |
DUPLICATE_COMPONENT_ID |
Two components would get the same v1 id; the second gets #2. |
Nothing; rename one if you join scans by id. |
Run history and compare
Every run keeps its report in .componly/runs/<local date and time>/. compare shows what changed between 2 and 6 of those runs:
componly-pro runs list # numbered list; the newest is marked "latest"
componly-pro compare # the two latest runs
componly-pro compare --last 4 # the newest four runs
componly-pro compare 2026-11-01 latest # the last run on Nov 1 vs the latest
componly-pro compare latest~3 latest # three runs ago vs the latest
componly-pro compare --fail-on-drop 2 # exit 1 if instance coverage fell by more than 2 points
componly-pro runs prune --keep 20 # delete all but the newest 20 (never automatic)
Componly comparison: 2 runs
Run Hash Commit Instance DS usages Custom usages
Nov 01 09:10:00 8c41d2e0 4f1a9c2 31.3% 100 220
Nov 20 14:32:05 3f9a1c2b e3e8698 36.1% 256 507
Changes (first run to last run)
Instance coverage ▲ +4.8 pp 31.3% -> 36.1%
Design-system usages ▲ +156 100 -> 256
- Terminal output: besides the table and the changes,
comparelists the components that changed most and the design-system components added or removed.- It warns when the runs used different scan settings or tool versions, or when nothing changed at all.
- The commit comes from the nearest
.gitfolder, which works for apps inside a monorepo.
- Files: it writes
.componly/compare/<first>_vs_<last>/(with_<n>-runsfor more than two). The folder containscomparison.json, six charts as SVG and PNG, and anindex.htmlgallery.--no-chartswrites onlycomparison.json.--jsonprints the comparison to stdout.
- Ordering: runs are ordered by their real timestamp (UTC, in
run.json), so a time-zone change never confuseslatest.
| Reference | Picks |
|---|---|
A full name, e.g. 2026-11-20_14-32-05 |
That run |
A prefix, e.g. 2026-11-20_14 or 2026-11-20 14:32 |
The one run it matches. If several match, it exits 2 and lists them. |
A date, YYYY-MM-DD |
The latest run of that day |
latest, latest~N |
The newest run, or the run N before it |
4 or more hex digits, e.g. 3f9a |
The run whose content hash starts with them (shown by runs list) |
Charts
componly-pro run --charts writes nine charts to the run's charts/ folder. Each comes as SVG and a 2× PNG, with an offline index.html gallery that has copy-ready alt text. They are drawn by the same viewer as the HTML and hosted reports, in the BoardUI card style (built only from BoardUI's free, MIT-licensed components and Recharts). With --out report.json, they go to report-charts/ next to the file instead.
| Chart | Shows |
|---|---|
adoption-donut |
Design system vs homebrew usages, instance coverage in the centre |
coverage-bars |
Instance, unique and reach coverage |
design-systems |
Usages and exports used per design system |
top-ds-components |
The 10 most-used design-system components |
migration-targets |
The 10 most-used homebrew components |
libraries |
The 10 most-used third-party libraries |
token-adoption |
Token, exact, near and off values per category |
usage-treemap |
The 40 most-used components, coloured by class |
override-graph |
Custom wrappers and the design-system components they wrap (also Mermaid .mmd) |
compare adds six charts: coverage-trend, usages-vs-coverage, adoption-donuts (one per run), usage-mix-pies, instances-stacked and component-movers.
- Confluence Cloud:
- Type
/imageand upload the.svg(sharp at any zoom) or the@2x.png(for PDF export or email). Paste the alt text fromindex.html. - Set PNGs to 720 px wide.
- To refresh a chart after a new scan, upload a file with the same name; every page that shows it updates.
- Type
- Figma: drag the
.svgonto the canvas to get editable vector layers. The text uses Inter, which Figma ships. Drag a@2x.pngfor a flat image. - GitHub and GitLab: paste the contents of
override-graph.mmdinto a fenced code block with the languagemermaid, commit the SVGs and reference them as images, or drag a PNG into a PR comment. - Google Docs, Slides, Notion and email: insert the PNG at 720 px wide.
Publish and embed
Publishing is opt-in. Without --publish (or the config switch below) nothing leaves your machine. When you turn it on, componly-pro uploads the report to Componly and prints two links.
componly-pro run --publish
# Published → https://share.componly.co/r/<id>/
# Embed (always latest) → https://share.componly.co/p/<token>/
| Link | Use it for |
|---|---|
Report URL (/r/<id>/) |
A fixed snapshot of this one run: put it in a pull request, a release note or a ticket. |
Project URL (/p/<token>/) |
Always shows the newest published report of the project. Embed it once; it updates on every publish. |
Both links open without a login, so anyone who has the link can read the page. The ids are random (128 bits), unlisted and marked noindex. Treat a link like a password.
Turn it on
| How | Effect |
|---|---|
componly-pro run --publish |
Publish this run. |
"pro": { "publish": true } in componly.config.json |
Publish every run, including CI. |
"pro": { "publish": { "project": "web-app" } } |
The same, and names the project. |
COMPONLY_PUBLISH=1 |
Publish without touching the config (COMPONLY_PUBLISH=0 switches it off again; flags beat the environment, the environment beats the config). |
The project name is a slug. It comes from pro.publish.project, otherwise from the name in package.json. It is lower-cased, a leading @scope/ is dropped, every character other than a-z, 0-9 and - becomes -, repeated dashes collapse, and it is cut to 63 characters. @Acme/Web App becomes web-app. A report has to be saved to be published, so --publish with --no-save is a usage error (exit 2). With --out file.json, the run is still saved in .componly/runs/ and the file is written as an extra copy.
The first publish from a project prints one notice line saying what is uploaded. After a publish, the run folder holds publish.json (id, reportUrl, projectUrl, publishedAt; readable only by you).
With --json, the report stays alone on stdout and the two links go to stderr.
Publish later, list, delete, rotate
componly-pro publish [ref] # publish a saved run; ref as in compare: latest, latest~1, a date, an id or hash prefix
componly-pro reports list [project] # id, date, coverage and URL of the project's reports
componly-pro reports delete <id> # remove one report; the project page falls back to the previous one
componly-pro reports rotate [project] # new project URL; the old one stops working at once
These commands need your CLI key like run does. rotate is the answer to "the link ended up somewhere it shouldn't": embed the new project URL afterwards. delete removes a snapshot and its stored copy.
componly-pro run --html (no upload needed) writes a self-contained report.html into the run folder for offline sharing.
What is uploaded, and where
| Part | Content | Who can read it |
|---|---|---|
Page data (view.json) |
Coverage numbers, counts, design-system and library names, the top component names, token adoption per category, warning codes, project name, git branch and commit, files scanned. No source code, no file paths. | Anyone with the link |
| Preview image | A 1200×630 picture used for link-preview cards, when available. | Anyone with the link |
Full report (report.json, gzip) |
The complete report, including project-relative file paths and positions. | Only you, through your CLI key. It is never served on a public link. |
The data is stored on Componly's servers and tied to your CLI key. Publishing sends your CLI key and this machine's id with every request (as headers, never in a link or in output). A failed upload never loses the scan: it is saved as usual, the error says where, and the exit code is 4.
Embed in Confluence Cloud
- Publish once and copy the Embed link (the project URL).
- In the page editor, type
/iframeand pick iFrame. - Paste the project URL into URL.
- Set the height (for example
1600) and a width of100%, then insert. - Publish the page. The macro shows the newest report after each
componly-pro run --publish.
Embed only some sections (?chart=)
Add ?chart= to a report or project URL to show only the sections you name, in page order. Separate several with commas:
https://share.componly.co/p/<token>/?chart=summary # project header and the three coverage tiles
https://share.componly.co/p/<token>/?chart=summary,components # plus the three component tables
https://share.componly.co/p/<token>/?chart=trend,tokens
| Key | Section | Key | Section |
|---|---|---|---|
summary |
Project header + coverage tiles | activity |
Publish activity |
trend |
Coverage over time | migration |
Migration targets |
mix |
Usage mix | most-used |
Most used design-system components |
periods |
Usages by period | wrapped |
Most wrapped components |
usage-vs-coverage |
Usages vs coverage | libraries |
Third-party libraries |
tokens |
Token adoption | components |
migration + most-used + wrapped |
funnel |
Coverage funnel | charts |
Every chart (trend … activity) |
health |
Design-system health |
Unknown names are ignored with a short notice that lists the valid ones; if none is valid, the full page is shown. Set the iFrame height to fit, for example about 330 for summary alone and 450 per chart. The local report.html accepts the same parameter.
If the frame stays blank, your Confluence admin has to allow share.componly.co for embedded content. On self-hosted Confluence or other tools that frame pages, ask Componly to add your domain to the allowed frame ancestors.
Use it in Figma and FigJam
Figma cannot show a live web page, so a pasted link becomes a preview card (title, description and the preview image). Click the card to open the live report. To put the charts themselves on the canvas, run componly-pro run --publish --charts and drag the .svg files from .componly/runs/<id>/charts/ onto the canvas; they arrive as editable vectors.
MCP server
componly-pro mcp runs a local Model Context Protocol server over stdio. Your assistant can then answer questions like "Which homebrew components should we migrate first?", "Who wraps our Select?" or "Did adoption improve since last week?".
1. Create your MCP token
The token is the base64 of email:cli-key:
COMPONLY_EMAIL="you@company.com" COMPONLY_CLI_KEY="<your CLI key>" componly-pro mcp --print-auth
# or by hand:
printf '%s' 'you@company.com:<your CLI key>' | base64
Base64 is an encoding, not encryption. Treat the token like a password, and don't commit a config file that contains it.
2. Add the server to your client
--allow lists the folders the server may read; repeat it for several projects. You can also print the exact snippet for your client with componly-pro mcp --print-config <claude-code|claude-desktop|cursor|vscode> --allow <dir>.
Claude Code
claude mcp add componly --scope user \
-e COMPONLY_MCP_AUTH="<token>" \
-- componly-pro mcp --allow /path/to/project
--scope user makes it available in every project. Check it with claude mcp list (it should show ✔ Connected), or with /mcp inside a session.
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Restart the app after editing.
Cursor: ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).
{
"mcpServers": {
"componly": {
"command": "componly-pro",
"args": ["mcp", "--allow", "/path/to/project"],
"env": { "COMPONLY_MCP_AUTH": "<token>" }
}
}
}
VS Code: .vscode/mcp.json in the workspace (note the servers key), then start it from the MCP view.
{
"servers": {
"componly": {
"type": "stdio",
"command": "componly-pro",
"args": ["mcp", "--allow", "/path/to/project"],
"env": { "COMPONLY_MCP_AUTH": "<token>" }
}
}
}
Any other MCP client: a stdio server with command componly-pro, args mcp --allow <dir>, and the environment variable COMPONLY_MCP_AUTH.
"command not found" or the server won't start? Desktop apps often don't see a Node.js installed through nvm, fnm or Volta. Use absolute paths instead. Find them with
which nodeandnpm root -g, then set"command": "/absolute/path/to/node"and"args": ["<npm root -g>/@componlyco/cli-pro/dist/bin.mjs", "mcp", "--allow", "/path/to/project"].
3. Try it
Ask your assistant: "Scan /path/to/project with componly and list the top five migration targets."
Tools
| Tool | Inputs | What it does |
|---|---|---|
componly_scan |
path, designSystems?, tokens? |
Scans a project and keeps the report in memory for the session. Nothing is written to disk. |
componly_get_summary |
reportUri? |
Coverage, design systems, top components, tokens, warnings. |
componly_list_components |
class (designSystem | custom | thirdParty), sort?, limit?, cursor? |
Pages through components (up to 50 per page). |
componly_get_component |
id |
One component: usages per file, props, and what wraps it or what it wraps. |
componly_get_overrides |
none | The wrapper / override graph. |
componly_render_chart |
kind, theme?, format? |
Returns one chart as a PNG image (60 KB or less) or as SVG. |
componly_export_charts |
kinds?, formats?, theme? |
Writes charts to the project's .componly/charts/. This is the only tool that writes. |
componly_list_runs |
path, limit? |
The runs saved by componly-pro run, newest marked latest. |
componly_compare |
path, refs? or last?, chart?, theme? |
Compares saved runs (same references as the CLI), optionally with one chart as an image. |
The server also provides two resources and two prompts:
- Resources: the latest report,
componly://report/latest, and any earlier report from the session. - Prompts:
componly_adoption_summaryandcomponly_migration_plan.
The tools other than componly_list_runs and componly_compare work on the latest scan in the session, so call componly_scan first. A scan run through MCP is never saved as a run; only componly-pro run adds runs.
How the server keeps your project safe
- Folders: it only reads folders passed with
--allow. Paths are resolved after following symbolic links and refused if they end up outside. - Commands: it never runs shell commands.
- Results: they never contain absolute paths. Strings that come from your repository are sanitised before they reach the model.
- Access: it checks access when it starts and before every tool call, resource read and prompt, re-validating online at most once an hour. If the key is revoked, calls fail with a clear message but the server keeps running.
- Logs: they go to stderr, because stdout carries only the protocol.
- Limits: scans run one at a time and stop after 120 seconds.
Continuous integration
# .github/workflows/design-system.yml
name: Design-system adoption
on: [pull_request]
jobs:
componly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm ci # required for Vue/Angular; optional for React
- run: npx componly-pro run -d 'core=src/components/core/**' --include-tokens --charts --fail-under 35
env:
COMPONLY_CLI_KEY: ${{ secrets.COMPONLY_CLI_KEY }}
COMPONLY_EMAIL: ${{ secrets.COMPONLY_EMAIL }}
- uses: actions/upload-artifact@v4
if: always()
with: { name: componly-report, path: .componly/ }
--fail-under 35fails the job (exit 1) when instance coverage is below 35%. Start at your current number and raise it as you migrate.- To block regressions, restore
.componly/runs/from a cache or the repository and addnpx componly-pro compare --no-charts --fail-on-drop 2. - The uploaded artifact contains the run folder and its charts (open
runs/<id>/charts/index.html).
CLI reference
componly-pro [run] [root] [options] analyse a project and save a run (run is the default command)
componly-pro runs list [--json] list saved runs
componly-pro runs prune --keep <n> delete all but the newest n runs
componly-pro compare [refs...] compare 2–6 runs: table, changes, charts
componly-pro publish [ref] upload a saved run to hosted reports
componly-pro reports list|delete|rotate manage hosted reports
componly-pro mcp [--allow <dir>]... start the MCP server
componly-pro init answer a few questions, write componly.config.json
componly-pro license status show plan, seat, expiry and where the key came from
componly-pro logout remove the saved CLI key and the validation cache
componly-pro schema print the report JSON Schema
componly-pro --version | --help
| Option | Default | Description |
|---|---|---|
[root], -p, --project <dir> |
. |
Project root (-p wins). |
-c, --config <file> |
componly.config.json |
Config file, relative to the project root. |
-t, --project-type <type> |
auto | react, vue, nuxt or angular (next means react). |
-d, --design-systems <spec...> |
auto-detect | name=@pkg/ui, name=src/ds/**, or a bare @acme/ui. Repeatable. |
-xc, --exclude-components <n...> |
Leave out components by name or v1 id. | |
-xt, --exclude-tags <tag...> |
Leave out components with these JSDoc tags (e.g. internal). |
|
-el, --exclude-libraries <n...> |
Leave out an npm package's components. | |
-f, --filter <regex> |
Leave out components whose id, name, tag or prop matches (case-insensitive). Unsafe patterns are rejected. | |
-it, --include-tokens |
off | Design-token analysis. |
--token-path <glob> |
Extra token files (repeatable); implies --include-tokens. |
|
--alias <from=to> |
Import alias, e.g. @ui=src/ui, when it isn't in tsconfig or a bundler config. |
|
--include-tests |
off | Score test and story files too. |
--allow-empty |
off | Don't fail when no components are found. |
--fail-under <n> |
none | Exit 1 below this instance coverage. Accepts 60, 60% or 0.6. |
--json |
off | Print only the report JSON on stdout. |
-o, --out <file> |
run folder | Write the report to this file only; nothing is written inside the project. |
--no-save |
Don't save the report (can't be combined with --charts). |
|
--charts |
off | Render charts into the run folder. |
--publish |
off | Upload the saved run and print its links. Also pro.publish and COMPONLY_PUBLISH=1. Can't be combined with --no-save. |
--html |
off | Write a self-contained report.html into the run folder. |
-k, --key <key>, -e, --email <address> |
env | CLI key and seat email; prefer COMPONLY_CLI_KEY / COMPONLY_EMAIL. |
--no-interactive |
Never ask questions (also when CI or COMPONLY_NO_INTERACTIVE is set, or there is no terminal). |
|
--quiet, --verbose, --debug, --no-color |
Output control. NO_COLOR=1 also works. |
| Command | Options |
|---|---|
init |
-p <dir>, -t <type>, -d <spec> (repeatable), --include-tokens, --fail-under <n>, -y/--yes (accept defaults, no questions), --force (overwrite an existing file), --no-interactive (write the starter without questions) |
compare [refs...] |
-p <dir>, --last <n> (2–6), --json, --no-charts, --fail-on-drop <pp> (e.g. 2 or 2.5), --quiet |
runs list |
-p <dir>, --json (the newest has latest: true) |
runs prune |
--keep <n> (required, at least 1), -p <dir> |
mcp |
--allow <dir> (repeatable), --print-config <claude-code|claude-desktop|cursor|vscode>, --print-auth |
Precedence: command-line flags, then environment variables, then the config file. Empty variables count as unset.
| Variable | Same as |
|---|---|
COMPONLY_CLI_KEY, COMPONLY_EMAIL |
-k, -e |
COMPONLY_MCP_AUTH |
MCP token: base64 of email:cli-key (mcp only) |
COMPONLY_PROJECT, COMPONLY_CONFIG, COMPONLY_PROJECT_TYPE |
-p, -c, -t |
COMPONLY_FAIL_UNDER |
--fail-under |
COMPONLY_INCLUDE_TOKENS, COMPONLY_INCLUDE_TESTS, COMPONLY_ALLOW_EMPTY, COMPONLY_PUBLISH |
true / false |
COMPONLY_EXCLUDE_COMPONENTS, COMPONLY_EXCLUDE_TAGS, COMPONLY_EXCLUDE_LIBRARIES |
Comma-separated lists |
COMPONLY_FILTER |
-f |
COMPONLY_TOKEN_PATH, COMPONLY_ALIAS |
Comma-separated lists (@ui=src/ui,@lib=src/lib) |
COMPONLY_TOP |
Entries in the top-component lists (1–25, default 10) |
COMPONLY_METRIC |
instance (default) or unique: what the threshold checks |
COMPONLY_DENOMINATOR |
designSystem+homebrew (default) or designSystem+homebrew+thirdParty |
COMPONLY_NO_INTERACTIVE |
1 / true: never ask questions |
COMPONLY_BACKEND_URL |
API base URL (https) |
componly-pro init builds the file from your answers. With --no-interactive and no other flags, it writes this starter instead. The top-level keys are the v1 format, and Pro-only options live under pro:
{
"designSystems": [],
"ignorePatterns": [],
"designTokenGlobs": [],
"pro": {
"exclude": [],
"metric": "instance",
"top": 10,
"includeTokens": false,
"aliases": {}
}
}
| Key | Meaning |
|---|---|
projectType |
react, vue, nuxt or angular; omit to auto-detect. |
designSystems[] |
alias (package name or label) and optional relativePaths (folders or globs). |
ignorePatterns, pro.exclude |
Globs of files to ignore. |
designTokenGlobs |
Extra token files. |
pro.excludeComponents, pro.excludeTags, pro.excludeLibraries, pro.filter |
Same as -xc, -xt, -el, -f. |
pro.includeTokens, pro.includeTests |
Same as the flags. |
pro.failUnder |
Threshold as a ratio, 0–1 (0.6). |
pro.metric, pro.denominator, pro.top |
As the environment variables above. |
pro.aliases |
Import aliases, e.g. { "@ui": "src/ui" }. |
pro.publish |
true, or { "project": "<name>" }: publish every run to hosted reports. |
pro.figma |
The Figma design file of your design system: { "fileKey": "<key or figma.com URL>", "designSystem": "<alias>" }, or a list of 1-10 of them (one per design system; an entry without designSystem is the default). A URL is reduced to the key. Used to post a component's adoption chart beside it in Figma; the CLI never contacts Figma. |
Unknown keys under pro are an error, so typos are caught. Never put credentials in this file; v1's cliId / cliPassword are ignored with a warning.
Exit codes:
| Code | Meaning |
|---|---|
0 |
Success. |
1 |
Coverage is below --fail-under, or fell by more than --fail-on-drop (the report is still printed and saved). |
2 |
Usage, configuration or access problem: fix the input and re-run. |
3 |
The analysis failed: re-run with --debug and report it. |
4 |
The scan succeeded and is saved, but publishing failed (network, rejected, quota or server error), or a reports request failed. componly-pro publish retries later. |
130 |
Cancelled. |
The JSON report
report.json keeps v1's top-level structure (parse.components, filewiseOccurences, filewiseLocation, props, overriddenComponents, overriddenBy, componentStatistics, designTokens). It adds a report block with the coverage summary and the override graph. componly-pro schema prints the JSON Schema, which is also shipped as schema/report.v2.json.
R=.componly/runs/$(componly-pro runs list --json | jq -r '.[-1].id')/report.json
jq '.report.summary.coverage.instance.value' "$R" # 0.613
jq -r '.report.summary.topComponents.homebrew[] | "\(.instances)\t\(.name)"' "$R"
jq -r '.parse.components[] | select(.wrapperOf) | "\(.name) wraps \(.wrapperOf)"' "$R"
componly-pro run --json --no-save --quiet | jq '.report.summary.tokens.adoption.overall'
Every path in the report is relative to the project root. Counts are exact: one JSX element is one occurrence, with real 1-based line and column numbers.
Security and privacy
| Network | The CLI-key validation (10 s timeout), and the report upload and reports commands, only when you use --publish, pro.publish, publish or reports. https only, redirects refused. No telemetry, no update check. |
| Reads | Files inside the project root. Bundler and TypeScript configs are parsed as text, never executed, and your code is never run. |
| Writes | Only .componly/ in the scanned project, or the single file given to --out. Writes are atomic, and symbolic links are refused. |
| Reports | Identifiers, counts, positions and project-relative paths. Never file contents, absolute paths, user names or machine ids. |
| Secrets | The CLI key and MCP token are never printed, logged or written to reports. |
Troubleshooting
| Problem | Fix |
|---|---|
error: no credentials found |
Set COMPONLY_CLI_KEY and COMPONLY_EMAIL; for MCP, COMPONLY_MCP_AUTH. See Authentication. |
| My design-system folder shows 0% | Quote the glob and match the real casing: -d 'core=src/Components/Core/**'. |
| My design system isn't detected | Its folder name isn't a recognised one (e.g. atoms), or it's an npm package. Pass -d. |
Could not load vue/compiler-sfc / @angular/compiler |
Install the scanned project's dependencies. |
| The MCP server doesn't connect | Use absolute paths for node and the binary (see MCP server), and check COMPONLY_MCP_AUTH. |
refusing to write: .componly is a symbolic link |
Replace the link with a real folder, or use --out. |
compare says it needs two runs |
Run componly-pro run at least twice in that project. |
The numbers differ from componly run (v1) |
Expected. v1 squared repeated counts, missed aliased imports and counted pages as overriders. |
Migrating from @componlyco/cli
Replace npx @componlyco/cli run -k <key> -d @acme/ui with npx @componlyco/cli-pro run -d @acme/ui, and set COMPONLY_CLI_KEY and COMPONLY_EMAIL.
What stays the same:
- The JSON keeps v1's structure.
- The v1 summary lines are still printed.
componly.config.jsonis read unchanged.--api-urland the accessibility flags are accepted and ignored, with a notice.
What changes:
- Counts are now exact. v1 squared repeated counts, so expect different numbers.
- Reports go to
.componly/runs/<date-time>/. - Swift, Kotlin, Stencil and vanilla projects are not analysed.
- The accessibility report is always empty.
Licence
Commercial software: using it requires a Componly Pro subscription. See componly.co. For a free, offline alternative, see @componlyco/cli-lite (MIT).
The complete reference (every JSON field and formula, every MCP tool's output, chart details and a full migration guide) is installed with the package in node_modules/@componlyco/cli-pro/docs/.
Third-party notices
Componly Pro depends on these open-source packages. Each is installed from npm as its own, unmodified package, with its own licence file.
| Package | Licence | Used for |
|---|---|---|
@componlyco/engine |
MIT | Analysis engine |
@resvg/resvg-wasm |
MPL-2.0 | PNG export (loaded only for PNG output); source: https://github.com/thx/resvg-js |
@modelcontextprotocol/server |
Apache-2.0 | MCP server |
d3-shape, d3-hierarchy |
ISC | Chart geometry |
cac |
MIT | Command-line parsing |
picocolors |
ISC | Terminal colours |
zod |
MIT | Input validation |
The bundled font is Inter (Regular, SemiBold), © The Inter Project Authors, under the SIL Open Font License 1.1 (assets/fonts/OFL.txt). It is used only to render text in PNG charts.
The report viewer (assets/viewer/, used for --html, --charts and the link-preview image) bundles these open-source components. Their full licence texts are in THIRD_PARTY_NOTICES.md, shipped at the package root:
| Component | Licence | Used for |
|---|---|---|
| BoardUI free components, © 2026 Mertcan Dundar Esmergul (BoardUI) | MIT | Report cards, chips, avatar, stat tiles, chart card shells |
| Recharts | MIT | Pie, radar, composed and bar charts |
| React, React DOM | MIT | Rendering the viewer |
| Inter (web subset) | SIL OFL 1.1 | Text in the HTML report |