@309-thingspire/ui
v0.1.0
Published
Thingspire UI design library CLI — copy components, types, and tokens into your project.
Readme
@thingspire/ui
CLI for the Thingspire UI design library. Copies component source, types, and tokens into your project — no runtime dependency, no lock-in.
Usage
# 1. Initialise the config in your project
npx @thingspire/ui init
# 2. Add a component
npx @thingspire/ui add button
# 3. (optional) See what's available
npx @thingspire/ui listConfiguration (design-library.json)
{
"registry": "https://thingspire-dsg.vercel.app/r",
"componentsDir": "components",
"tokensCss": "styles/tokens.css"
}| Field | Default | Notes |
| --------------- | -------------------------------------------- | -------------------------------------------------- |
| registry | https://thingspire-dsg.vercel.app/r | Registry root. Override with --registry <url>. |
| componentsDir | components | Where copied component files are written. |
| tokensCss | styles/tokens.css | Where the design-token CSS is written on install. |
Flags
| Flag | Description |
| -------------- | ------------------------------------------------------ |
| --registry | Override the registry URL for a single invocation. |
| --overwrite | Replace existing local files when running add. |
Environment variables
THINGSPIRE_UI_REGISTRY— overrides the registry URL globally.
Local development
Point the CLI at a locally running showcase site:
THINGSPIRE_UI_REGISTRY=http://localhost:3000/r \
node ./packages/cli/cli.mjs add buttonThe registry first tries <registry>/<slug>.json (static files generated by
postbuild) and falls back to the live /api/registry/<slug> endpoint.
