The damo-ui CLI
Prefer to own the source of your components instead of importing them from a package? The CLI copies each component straight into your codebase — shadcn-style — so you can read, tweak and version every line.
Both models are supported: keep using npm install damo-ui for the zero-config package, or use the CLI below for copy-paste. The CLI is components.json-compatible, so if you already use shadcn it will feel familiar.
1. Initialize
Creates a components.json (it detects a src/ layout and your global stylesheet automatically):
2. Add components
add resolves a component and everything it needs — other components, the cn helper, the icon set, i18n — then installs the union of npm dependencies with your package manager:
Adding button writes, for example:
3. Browse the registry
Already on the npm package?
If you import from damo-ui today, one command converts the whole project to copy-paste — it rewrites every import (named, type-only, aliased, mixed), copies the used components, and drops damo-ui from package.json. It is idempotent and TypeScript-aware; preview with --dry-run first.
For AI agents (MCP)
There's also an MCP server, @axologic/mcp, so agents like Claude Code or Cursor can search, read, and add components for you. Point your client at it:
Notes
- Re-running
addskips files that already exist — pass--overwriteto replace them. - Pass
--no-depsto skip installing npm packages, or--registry <url>to point at a different registry. - The
init/add/listcommands need only Node ≥ 18; the codemod additionally usests-morphfor the AST rewrite.