@orvain/cli
v0.1.3
Published
Orvain command line: sign in with a licence key and add components to your project
Maintainers
Readme
@orvain/cli
The orvain command: sign in with a licence key and copy Orvain components (source, styles and
what they depend on) into your React or Vue project. The CLI holds no component source; it
fetches it from the Orvain API (https://mcp.orvain.dev, or ORVAIN_API_URL).
orvain add accordion # free components need no key
orvain login ORVAIN-XXXXX-XXXXX-XXXXX-XXXXX
orvain add flat-button --install # paid components need a key; --install runs your package manager
orvain list
orvain update
orvain logout # frees this computer on your licence| Command | What it does |
|---|---|
| login <key> | Checks the key, activates this computer, saves credentials, prints your plan and "computers used x of y". |
| logout | Frees this computer on your licence and deletes the saved credentials. |
| init | Creates orvain.json (framework, dir, components). Detects React or Vue from package.json; pass --framework react\|vue when it can't. add runs it on first use. |
| add <name...> | Names are kebab-case (flat-button). Blocks match by their last segment (progress-bar); if that is ambiguous the choices are listed. Existing files are skipped unless --overwrite. Prints the npm packages to install; --install runs pnpm, yarn, bun or npm (by lockfile). |
| list | All components, free ones and installed ones marked. |
| update [name...] | Re-fetches installed components. Files you edited are left alone unless --overwrite. |
Exit codes: 0 ok, 1 something to fix on your side (the message says what), 2 network or server problem.
Credentials are stored in ~/.config/orvain/auth.json ($XDG_CONFIG_HOME/orvain/auth.json, or
%APPDATA%\orvain\auth.json on Windows) with mode 0600: your key and a random id for this computer.
orvain.json also keeps a hash of every file written, which is how update tells your edits from
upstream changes.
Tests
pnpm --filter @orvain/cli test runs the unit tests and an end-to-end run against the API in-process
with a mocked Keygen. pnpm --filter @orvain/cli test:smoke additionally adds flat-button accordion
from the real registry build to fresh React and Vue projects and type-checks them with tsc and
vue-tsc; it installs packages from npm, so it is skipped by default.
