OriaTheme
GitHub

API reference · Source-component CLI

@oriatheme/cli

Safely copy editable React/Vue ThemeEditor source into a consumer project; it is not a runtime dependency.

Package and environment

A Node executable. Usually run once through pnpm dlx, npm exec, yarn dlx, or bunx instead of adding it to a browser bundle.

bash
pnpm add -D @oriatheme/cli

Use the package manager and lockfile already chosen by the consumer project. Examples use package-root exports only; do not deep-import from src, dist, or registry templates.

Programmatic export

ExportSignatureDescription
runCli(args: readonly string[], cwd?: string) => Promise<CliResult>Runs the CLI programmatically and returns exitCode plus output lines.

Common commands

bash
pnpm dlx @oriatheme/cli@latest add theme-editor --framework react --dry-run

add prints a plan and exits with code 2 by default; only --yes writes. --dry-run performs no writes and exits with code 0. Use --path for an in-project target and vue as the framework for Vue. After review, replace --dry-run with --yes through the same runner; use that runner with diff theme-editor --framework react for differences.

The registry theme-editor is now 0.2.0, renders oria-standard@2, and requires @oriatheme/core@^0.3.0 in the consumer project. A second command prebuilds a static Tailwind CSS v4 bridge and writes only the generated CSS to the --out file:

bash
oria theme tailwind-bridge --out src/oria-tailwind.css
oria theme tailwind-bridge --prefix acme --out src/oria-tailwind.css --dry-run

Safety before write

The CLI validates manifests, framework, compatible versions, relative paths, file sizes, and SHA-256. It rejects scripts, HTTP, path escape, and symlink targets. It refuses overwrites by default; diff never writes, and --overwrite requires explicit --yes. The CLI runs no registry lifecycle scripts and uploads no themes or project files.