CLI
Copy component source into your project with the elyri CLI: commands, options, destinations and errors.
#Overview
The elyri CLI copies component source into your project. No global install is needed — run it through your package manager.
#add
Add one or more components. Names match the slug in each component page URL (e.g. gradient-text).
pnpm dlx @elyri/cli@latest add fade-in gradient-textEach component is written as a self-contained folder:
src/components/elyri/
└── GradientText/
├── GradientText.css
├── GradientText.tsx
└── index.tsRelative imports of the shared runtime are rewritten to @elyri/motion/core or @elyri/ui/core, so the copied files work on their own.
#list
List every available component, grouped by package.
pnpm dlx @elyri/cli@latest list#Options
| Option | Description |
|---|---|
--dir, -d <path> | Target directory, relative to the current one. Takes priority. |
--overwrite, --force, -f | Replace existing files without asking. |
#Where files go
The target directory is resolved in this order:
--dirwhen given.- An
@/*,~/*or#/*alias intsconfig.json,tsconfig.app.jsonorjsconfig.json:<alias root>/components/elyri. - A
src/directory:src/components/elyri. - Otherwise
components/elyri.
#Existing files
The CLI checks every target before writing; if any file exists, nothing is written. In a terminal it asks whether to overwrite; in non-interactive environments such as CI it exits and expects --overwrite.
#Common errors
| Error | Fix |
|---|---|
Missing @elyri/motion | The package is not installed. Run the suggested command and retry. |
@elyri/motion@x does not ship … | The installed version predates this component. Upgrade to @latest. |
Unknown component: … | Misspelled name. Run list to see valid names. |
Suggested commands match your package manager, detected from the runtime or your lockfile.