CLI
The package includes a Node 20+ CLI. Use npx earthling-ui or bunx earthling-ui from your project.
Discover
npx earthling-ui list --json
npx earthling-ui info button --json
npx earthling-ui info dialog --source --jsonDiscovery reads the installed version's source and reports exports, type paths, dependencies, and required helper files. Add --source when you need implementation details. The same metadata ships as earthling-ui/catalog.json.
Initialize
npx earthling-ui initThe wizard creates a config with component and utility directories. Automation can write it directly:
{ "componentDir": "src/components", "utilsDir": "src/utils" }Eject
npx earthling-ui eject button --dry-run --json
npx earthling-ui eject buttonEject finds the nearest parent config, copies the component and its transitive source dependencies, rewrites local imports, and installs the declared dependencies with your package manager. Destinations must stay inside the configured project.
--dry-run: preview without writing or installing.--no-install: copy files and leave dependency installation to you.--overwrite: replace existing component files; customized shared utilities are preserved and reported.--json: machine-readable output without prompts; failures exit nonzero.
Keep the earthling-ui/index.css import in your Tailwind stylesheet. Ejected source is yours to maintain; ensure Tailwind scans its directory.
Create a project
npx earthling-ui create ssr my-app
npx earthling-ui create spa my-spa
npx earthling-ui create monorepo my-workspaceTemplates also include cli and db. Omit arguments to use the interactive setup.