# System map — chromaui/chromatic-cli

> Canonical page: https://codevetter.com/unpack/chromatic-cli/system-map

# System map — chromaui/chromatic-cli

Scanned commit 9e2606a2dbc11bcd07e7e451431432e32de0224b (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The product is primarily a Node client for hosted Chromatic services; its Storybook and Vite configuration renders the CLI's own presentation examples. CLI, Action, and programmatic callers converge on a shared context and an explicitly ordered pipeline. Local artifacts and diagnostic files complement remote build state, while transport, task logic, and rendering occupy separate modules. Packaging and release configuration describe CommonJS npm bundles and a separately bundled GitHub Action.
- The npm package maps chroma, chromatic, and chromatic-cli to dist/bin.cjs; its root export is isChromatic, while ./node exposes dist/node.cjs and declarations. — [package.json#L26-L42](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/package.json#L26-L42) [package.json#L59-L69](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/package.json#L59-L69)
- bin-src/main.ts calls run({argv}); action-src/main.ts calls the same run with translated flags and inAction:true, so both adapters share node-src/index.ts orchestration. — [bin-src/main.ts#L13-L23](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/bin-src/main.ts#L13-L23) [action-src/main.ts#L165-L210](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/action-src/main.ts#L165-L210) [node-src/index.ts#L124-L165](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/index.ts#L124-L165)
- runBuild invokes renderAuth through renderSnapshot directly; node-src/tasks/index.ts now supplies only an optional JUnit report task, with a separate runShare task list. — [node-src/index.ts#L359-L372](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/index.ts#L359-L372) [node-src/tasks/index.ts#L7-L23](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/tasks/index.ts#L7-L23)
- Context owns mutable Git, Storybook, announced-build, result-build, artifact, upload, and TurboSnap state; Deps narrows shared services and exposes Readonly<Options> plus mutable Runtime.forceRebuild. — [node-src/types.ts#L338-L381](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/types.ts#L338-L381) [node-src/types.ts#L429-L540](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/types.ts#L429-L540)
- setupContext creates HTTPClient and GraphQLClient against CHROMATIC_INDEX_URL/graphql, attaches session/version headers, and loads configuration; authentication and sharing can override the endpoint to /api. — [node-src/context.ts#L18-L32](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/context.ts#L18-L32) [node-src/tasks/auth.ts#L57-L77](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/tasks/auth.ts#L57-L77) [node-src/lib/share/upload.ts#L36-L44](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/lib/share/upload.ts#L36-L44)
- The inspected persistence boundaries are build files, local diagnostics/JUnit output, and remote upload targets: writeManifest writes through ProjectFiles, generateReport writes XML, and uploadFiles posts file bytes to negotiated formAction URLs. — [node-src/lib/turbosnap/v2/manifest.ts#L202-L227](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/lib/turbosnap/v2/manifest.ts#L202-L227) [node-src/tasks/report.ts#L85-L121](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/tasks/report.ts#L85-L121) [node-src/lib/uploadFiles.ts#L40-L58](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/node-src/lib/uploadFiles.ts#L40-L58)
- tsdown emits split CommonJS CLI/Node bundles with Node declarations and a separate unsplit Action bundle; its node20 targets differ from package.json's Node >=22 requirement and action.yml's node24 runtime. — [tsdown.config.ts#L3-L37](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/tsdown.config.ts#L3-L37) [package.json#L239-L240](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/package.json#L239-L240) [action.yml#L158-L160](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/action.yml#L158-L160)
- Repository scripts define build, coverage tests, lint, and type checking; release.yml triggers PR canaries and selected main-branch source releases through yarn run release with publishing permissions. — [package.json#L71-L92](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/package.json#L71-L92) [.github/workflows/release.yml#L3-L27](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/.github/workflows/release.yml#L3-L27) [.github/workflows/release.yml#L38-L50](https://github.com/chromaui/chromatic-cli/blob/9e2606a2dbc11bcd07e7e451431432e32de0224b/.github/workflows/release.yml#L38-L50)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
