The @docyrus/cli is a command-line tool that handles authentication, project creation, component installation, theme management, and code generation from the Docyrus registry.
Installation
You can use the CLI directly with npx without installing it globally:
npx @docyrus/cli <command>Or install it globally:
pnpm add -g @docyrus/cliOr install it globally for quicker access:
pnpm add -g @docyrus/cliOnce installed globally, you can use the docyrus command directly:
docyrus add buttonCommands
Authentication
| Command | Description |
|---|---|
docyrus login | Log in with browser-based SSO |
docyrus login --email | Log in with email and password |
docyrus login -e user@example.com | Log in with pre-filled email |
docyrus logout | Clear stored auth tokens |
docyrus whoami | Display current logged-in user info |
Components
| Command | Description |
|---|---|
docyrus add [items...] | Add components, hooks, or utilities from the registry |
docyrus add button dialog | Add multiple components at once |
docyrus add --all web | Install all web components |
docyrus add --all react-native | Install all React Native components |
docyrus add --all-web | Shortcut for --all web |
docyrus add --all-rn | Shortcut for --all react-native |
docyrus add --overwrite | Skip file conflict prompts |
docyrus add --dry-run | Preview installation without writing files |
docyrus add --path ./src/ui | Custom target path for installation |
docyrus update | Update all installed Docyrus components to latest |
docyrus update button toast | Update specific components only |
docyrus update rn-card rn-button | Update specific native components |
docyrus update --prune | Update and remove components deleted from registry |
docyrus update --dry-run | Preview what would be updated |
docyrus list | List available components, hooks, and utilities |
docyrus list --packages | List published @docyrus npm packages |
React Native projects
Web components require components.json (created by npx shadcn@latest init).
React Native components (rn-*) work without components.json — the CLI reads your import alias from tsconfig.json or tsconfig.base.json automatically.
Your tsconfig must have a path alias configured:
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}If no path alias is found, the CLI defaults to @/ and adds the alias to your tsconfig automatically.
Themes
| Command | Description |
|---|---|
docyrus themes list | List available theme presets |
docyrus themes add [name] | Apply a theme preset to your project |
docyrus themes add --url <url> | Apply theme from a share URL |
docyrus themes add --file <path> | Apply theme from a local JSON file |
docyrus themes current | Show current :root and .dark CSS variables |
Code Generation
| Command | Description |
|---|---|
docyrus generate api-spec | Download OpenAPI spec from the Docyrus API |
docyrus generate api-spec -o ./spec.json | Custom output path for the spec file |
docyrus generate db [spec] | Generate TanStack Query collections from an OpenAPI spec |
docyrus generate db ./spec.json -o ./src/api | Custom output directory |
Project Setup
| Command | Description |
|---|---|
docyrus commitlint | Set up commitlint, husky, and lint-staged |
docyrus commitlint --scopes cli,ui,web | Pre-configure allowed commit scopes |
docyrus commitlint --monorepo | Auto-detect workspace scopes for monorepo |
docyrus commitlint --scope-strategy required | Set scope strategy (required, optional, none) |
docyrus commitlint -y | Accept defaults and overwrite existing files |
System
| Command | Description |
|---|---|
docyrus info | Display CLI version, Node.js, OS, and auth status |
docyrus config --show | Show current configuration |
docyrus config --token | Update the stored Docyrus token |
docyrus config --theme | Change help output color theme |
docyrus upgrade | Upgrade CLI to the latest version |
docyrus completion <shell> | Generate shell completion script (bash, zsh, fish) |
Global Options
| Option | Description |
|---|---|
--json | Output results in JSON format |
-v, --version | Display CLI version |
-h, --help | Display help information |
Examples
# Log in and add components
docyrus login
docyrus add button dialog date-time-picker
docyrus add --all web
docyrus add --all-rn
# Update all installed components
docyrus update
# Update specific components
docyrus update button toast rn-card
# Update and remove components deleted from registry
docyrus update --prune
# Browse and apply a theme
docyrus themes list
docyrus themes add midnight
# Generate TanStack Query code from an API spec
docyrus generate api-spec
docyrus generate db openapi.json --output src/
# Set up commitlint in a monorepo
docyrus commitlint --monorepo