CLI
letrixui in full: authorize a machine with one click, configure where files land with components.json, add components, and run it in CI or an MCP server.
letrixui writes components into your project as plain files you own. It has no runtime: nothing it installs depends on us afterwards, and the CLI itself has zero dependencies, so npx letrixui starts immediately.
Authorize this machine
Paid components need authorization once per machine. login opens this site with a one-time code already in the link, you click Authorize, and the CLI stores an API key for that machine alone.
npx letrixui loginThe key is written to ~/.config/letrixui/config.json with owner-only permissions, and is listed in your dashboard by machine name with a last-used time. Revoke it there and that machine stops working — everything else carries on. whoami says which account and which credential are in play; logout revokes it and forgets it.
CI, Docker and MCP servers
Where no browser can open, create a named API key in your dashboard and put it in the environment. The CLI picks it up with no other change, and an environment variable beats a stored config so a container image with someone's old credential baked in cannot win.
LETRIXUI_API_KEY=lxui_… npx letrixui add tableSet up a project
init writes the design tokens, the Tailwind preset, and components.json. The src/ layout is detected from the project; pass --src, or any of --components, --recipes, --lib, --styles to override.
npx letrixui initcomponents.json
This is where your project says where files go. Every later add follows it — and so do the imports between the files it writes, which are computed for your layout rather than moved into it.
{
"$schema": "https://letrixui.com/schema/components.json",
"tailwind": { "css": "src/app/globals.css" },
"aliases": {
"components": "src/components/letrix",
"recipes": "src/components/letrix/recipes",
"lib": "src/lib",
"styles": "src/styles"
},
"registry": "https://letrixui.com"
}Without this file nothing breaks: components land in components/letrix/, lib/ and styles/ at the project root.
Add components
add resolves registry dependencies, writes the files, and prints the npm packages they need. A file that already matches is left alone; one that differs stops the run so nothing is overwritten silently — pass --force when that is what you want, or --dry-run to see it first.
npx letrixui add button
npx letrixui add button modal tables
npx letrixui add button --dry-run
npx letrixui listScripting it
--json makes every command emit exactly one object, success or failure. Exit codes distinguish the failures a script would handle differently — a network blip is worth retrying, a missing credential is not.
0 success
1 usage — bad flag, unknown command, missing argument
3 not found — no such component
4 auth — not authorized, revoked, or no active license
5 conflict — a file exists and differs (re-run with --force)
6 network — timeout, unreachable registry, rate limitedPointing somewhere else
--registry (or LETRIXUI_REGISTRY) points the CLI at any deployment. Credentials are stored per registry, so a staging origin never clobbers your production key.