CLI
CLI
Copy components into your project with the Hewn CLI.
The Hewn CLI copies component source from the registry into your project. You own the code — edit it, fork it, keep it in sync with your design system.
Status: the CLI package is not on npm yet. Every npx command in the sections below is labeled available at launch. Today you can fetch free component JSON from the live registry without the CLI:
Or browse the free registry index.
Commands (available at launch)
init
Detects your project and sets up the foundation:
- TypeScript or JavaScript detection (presence of
tsconfig.json) - Writes
hewn.jsonwith your component root and language - Copies foundation files (providers, shared styles, utilities) in the matching language variant
- Prints the peer dependencies and CSS import to finish setup
Options: --root <dir> to change the component root (default
components/hewn), --yes to skip prompts.
add
Copies components from the free registry into your component root.
Dependencies between components resolve automatically — adding file-upload
also adds button and spinner. TypeScript projects receive .tsx source;
JavaScript projects receive the generated .jsx variant.
Options: --overwrite to replace existing files without prompting,
--yes to accept all prompts.
theme
theme lists installed packs and supported modes from @hewnui/themes.
theme export prints local Figma kit paths (Tokens Studio JSON + sticker
sheet) when generated, plus import notes.
lint
Checks tokens-only colour usage, theme AA contrast, reduced-motion patterns,
labelled overlays, and destructive confirm heuristics. See CLI lint
for the rule reference, hewn.json config, and JSON schema.
Registry URL
The CLI fetches registry JSON from the canonical site origin
(https://hewnui.dev by default — see packages/site-url). Override for local development or mirrors:
hewn init can also set a per-project registry field in hewn.json.
npm, Hewn CLI, or shadcn?
All paths ship the same canonical source. npm packages and the CLI publish at
launch — until then, use the docs examples or the live /r/*.json registry.
When your project already uses components.json, see the
shadcn CLI registry.