New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@docyrus/cli

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docyrus/cli

Docyrus CLI - Authentication and project management tools

latest
Source
npmnpm
Version
0.17.2
Version published
Maintainers
4
Created
Source

Docyrus CLI

Official command-line interface for Docyrus - authentication, project scaffolding, and code generation tools.

Usage

npx @docyrus/cli <command>

Commands

Authentication

login

Log in to Docyrus using browser-based SSO (default).

npx @docyrus/cli login              # Opens browser for SSO authentication
npx @docyrus/cli login --email      # Use email/password instead (prompts for credentials)
npx @docyrus/cli login -e user@example.com  # Pre-fill email address

logout

Log out from Docyrus and clear stored credentials.

npx @docyrus/cli logout

whoami

Display the currently logged-in user.

npx @docyrus/cli whoami
# Output: Email: user@example.com
#         Name: John Doe

Project Creation

create [name]

Create a new Docyrus project from a template.

npx @docyrus/cli create                           # Interactive mode - prompts for all options
npx @docyrus/cli create my-app                    # Create project with specified name
npx @docyrus/cli create my-app --nextjs           # Next.js + plain Tailwind
npx @docyrus/cli create my-app --nextjs --shadcn  # Next.js + shadcn/ui
npx @docyrus/cli create my-app --react --diceui   # React + DiceUI
npx @docyrus/cli create my-app --vue --shadcn     # Vue + shadcn-vue
npx @docyrus/cli create my-app --nextjs --shadcn --zustand --eslint --pnpm  # Full flags

Framework Options:

FlagDescription
--nextjsUse Next.js 16+ (App Router)
--reactUse React 19+ with Vite
--vueUse Vue 3.5+ with Vite

UI Library Options (optional - defaults to plain Tailwind if not specified):

FlagCompatible Frameworks
--shadcnNext.js, React (shadcn/ui) / Vue (shadcn-vue)
--diceuiNext.js, React

State Management Options (optional):

FlagCompatible Frameworks
--zustandNext.js, React
--tanstack-queryNext.js, React
--tanstack-vue-queryVue

Linter Options:

FlagDescription
--eslintUse ESLint for linting
--biomeUse Biome for linting
--no-linterSkip linter configuration

Package Manager Options:

FlagDescription
--pnpmUse pnpm (recommended)
--npmUse npm
--yarnUse yarn
--bunUse bun

Styling Options (shadcn/diceui only):

OptionDescription
--style <style>Component style (vega, nova, maia, lyra, mira)
--base-color <color>Base color theme (zinc, slate, neutral, stone, gray)
--rtlEnable RTL (right-to-left) support

Other Options:

OptionDescription
-p, --path <path>Target directory path
--alias <prefix>Custom import alias prefix (must start with @)
--localUse local templates (development only)

Each template includes:

  • Pre-configured OAuth2 authentication via @docyrus/signin
  • Docyrus API client integration
  • Modern TypeScript setup
  • Linter configuration (ESLint or Biome)

Component Registry

Registry uç noktalarını özelleştirme:

  • DOCYRUS_REGISTRY_URL (varsayılan: https://ui.docy.app/r)
  • DOCYRUS_SHADCN_REGISTRY_URL (varsayılan: https://ui.docy.app/r/shadcn)
  • DOCYRUS_DICEUI_REGISTRY_URL (varsayılan: https://ui.docy.app/r/diceui)
  • DOCYRUS_PLATE_REGISTRY_URL (varsayılan: https://ui.docy.app/r/plate)

add [items...]

Add Docyrus UI components, hooks, or utilities to your project.

Prerequisite: Run npx shadcn@latest init first to create components.json.

npx @docyrus/cli add button               # Add a component
npx @docyrus/cli add button dialog         # Add multiple components
npx @docyrus/cli add --all                 # Install all available components
npx @docyrus/cli add hooks-debounce        # Add a hook
npx @docyrus/cli add utils-cn              # Add a utility
npx @docyrus/cli add button --dry-run      # Preview installation
npx @docyrus/cli add button -o             # Overwrite existing files
npx @docyrus/cli add button -p ./src/ui    # Custom target path

What happens:

  • Resolves components and their dependencies from the Docyrus registry
  • Installs vendor primitives by fetching vendor registry items (shadcn/DiceUI/Plate) and writing files via components.json aliases
  • Writes Docyrus component files to components/docyrus/
  • Installs npm dependencies
  • Bundled lib/hook files are shared across components (written once, skipped if exists)
  • Plate installs always include core editor primitives (editor, editor-kit) for editor/static compatibility
  • Vendor-component files (e.g. editor/) are bundled with the component

Registry Names:

InputRegistry Name
button@docyrus/ui-button
hooks-debounce@docyrus/hooks-debounce
utils-cn@docyrus/utils-cn

Options:

OptionDescription
-a, --allInstall all available components from the registry
-o, --overwriteOverwrite existing files without prompting
-d, --dry-runShow what would be installed without making changes
-p, --path <path>Custom target path for files

update

Update all installed Docyrus components to the latest version from the registry. Detects and optionally removes components that were deleted from the registry.

npx @docyrus/cli update               # Update all installed components
npx @docyrus/cli update --prune       # Update and remove stale components
npx @docyrus/cli update --dry-run     # Preview what would be updated

Scans components/docyrus/ and components/docyrus-native/ to detect installed components, resolves latest versions from the registry, and updates all files including new vendor primitives and npm dependencies. Components that no longer exist in the registry are reported as stale — use --prune to remove them.

Options:

OptionDescription
-d, --dry-runShow what would be updated without making changes
--pruneRemove locally installed components that no longer exist in the registry

list

List available Docyrus UI registry items (components, hooks, utilities) or published npm packages.

npx @docyrus/cli list                # List registry components
npx @docyrus/cli list --packages     # List published @docyrus npm packages
npx @docyrus/cli list --json         # Output as JSON

Options:

OptionDescription
--packagesList published @docyrus npm packages instead

themes

Browse and manage Docyrus UI themes.

themes list

List all available theme presets.

npx @docyrus/cli themes list
themes add [name]

Apply a theme to your project's globals.css.

npx @docyrus/cli themes add midnight            # Apply a theme preset by name
npx @docyrus/cli themes add --url <share-url>   # Apply theme from a share URL
npx @docyrus/cli themes add --file ./theme.json # Apply theme from a local JSON file

Options:

OptionDescription
--url <url>Apply theme from a share URL (overrides name argument)
--file <path>Apply theme from a local JSON file (overrides name argument)
themes current

Display current :root and .dark CSS variables from your globals.css.

npx @docyrus/cli themes current

Code Generation

generate db [spec]

Generate TanStack Query collections from an OpenAPI 3.1.0 specification.

npx @docyrus/cli generate db                           # Auto-detect openapi.json in current directory
npx @docyrus/cli generate db ./api/openapi.json        # Specify spec file path
npx @docyrus/cli generate db ./spec.json -o ./src/api  # Custom output directory

Options:

OptionDescription
-o, --output <dir>Output directory (defaults to src in spec file folder)

Project Setup

commitlint

Set up commitlint, husky, and lint-staged in your project.

npx @docyrus/cli commitlint

CLI Management

upgrade

Upgrade the CLI to the latest version. Automatically detects your package manager (npm, pnpm, yarn, bun).

npx @docyrus/cli upgrade

info

Display CLI version, system information, and authentication status.

npx @docyrus/cli info

Global Options

--json

Output results in JSON format. Useful for scripting and CI/CD pipelines.

npx @docyrus/cli whoami --json
npx @docyrus/cli generate db ./spec.json --json

-v, --version

Display the CLI version.

-h, --help

Display help information.

npx @docyrus/cli --help
npx @docyrus/cli create --help

Environment Variables

VariableDescription
DOCYRUS_API_URLOverride the API base URL
DOCYRUS_OAUTH_CLIENT_IDOverride the OAuth2 client ID
DOCYRUS_OAUTH_SCOPESOverride the OAuth2 scopes

Token Storage

Credentials are securely stored using:

  • macOS/Linux: System keychain (via keytar)
  • Fallback: Encrypted file in ~/.docyrus/

License

MIT

Keywords

docyrus

FAQs

Package last updated on 25 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts