CLI reference
The znverse CLI installs effects and kits from the znverse registry into your project. It needs Node.js 22.13 or newer and has no runtime dependencies.
npx znverse <command> [options]Commands
add
npx znverse add <effect...>Installs one or more effects. Each name can be:
- an effect slug, such as
tilt-card; - a kit, such as
kits/landing-page; - a full registry item URL, such as
https://znverse.vercel.app/r/tilt-card.json.
The CLI then:
- downloads each item and everything it depends on;
- plans every file and checks for conflicts before writing anything;
- writes the files;
- installs missing npm packages;
- prints the import line for each effect.
list
npx znverse listPrints every installable effect with its framework and name.
login
npx znverse loginSaves a personal token so add can install Pro effects. Create the token in Dashboard, Settings, CLI access; it is shown only once. The CLI asks for the token (or reads it from --token or from piped input), checks it with the registry and saves it for that registry. A revoked or mistyped token is refused and nothing is saved.
Saved tokens live in ~/.config/znverse/auth.json, or $XDG_CONFIG_HOME/znverse/auth.json when that variable is set. The folder is created with mode 0700 and the file with 0600, and each token is stored under its registry origin.
logout
npx znverse logoutRemoves the saved token for the current registry. Tokens saved for other registries stay.
whoami
npx znverse whoamiPrints the email and plan (Free or Pro) of the token the CLI would use.
Pro effects
add works the same way for Pro effects. When an effect is not in the public registry, the CLI asks the registry's token endpoint for it with your token:
| Situation | Result |
|---|---|
| Your account is on Pro | The effect installs like any other |
| Your account is on Free | <effect> is a Pro effect. Get Pro at https://znverse.vercel.app/pricing |
| The token was revoked or is wrong | You are asked to run npx znverse login again |
| No token at all | The same Pro hint for a known Pro effect, otherwise the usual not-found message |
The token comes from --token, then the ZNVERSE_TOKEN environment variable, then the saved login for that registry. It is sent only to the registry's own /api endpoints, only over https (or http to localhost), and never for free effects.
Options
| Option | Effect |
|---|---|
--registry <url> | Use another registry, for example http://localhost:3000 while developing |
--cwd <dir> | Install into another folder instead of the current one |
--token <token> | Use this token for one command instead of the saved login |
--overwrite | Replace files that already exist with different content |
--dry-run | Show what would be written and installed, and change nothing |
--skip-install | Do not run the package manager; print the install command instead |
--force | Allow running inside the znverse repository itself |
-h, --help | Show help |
-v, --version | Show the version |
The registry can also be set with the ZNVERSE_REGISTRY_URL environment variable. The --registry option wins over the variable, and the variable wins over the default https://znverse.vercel.app.
Existing files
| Situation | Result |
|---|---|
| The file does not exist | It is created |
| The file exists with the same content | It is left alone and shown as same |
| The file exists with different content | Shown as exists, and nothing at all is written unless you pass --overwrite |
Because conflicts are checked before writing, a run either writes everything it planned or nothing.
Package managers
The CLI uses the package manager of your project. It looks for pnpm-lock.yaml, pnpm-workspace.yaml, bun.lock, yarn.lock or package-lock.json in the project folder and its parents, so it also works in a monorepo package. Without a lockfile it uses the package manager that ran it, and falls back to npm. Packages that are already in your package.json are skipped.
Safety
The CLI treats the registry as untrusted input:
- Files are only written inside the effect's own folder,
components/znverse/<effect>/orpublic/znverse/<effect>/. It refuses paths that leave the project, hidden files such as.npmrc, and paths through symbolic links. - Package names must be plain names with a plain version range. Anything that looks like a flag, a URL, a git address or shell syntax is refused.
- Registries must use
https. Plainhttpis accepted only forlocalhost. - Text from the registry is cleaned of terminal control characters before it is printed.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, including dry runs |
1 | Something went wrong; the message says what and nothing was left half-written |
Troubleshooting
| Message | Fix |
|---|---|
Not found: …/r/<effect>.json | Check the slug with npx znverse list. Copy-only effects are not in the registry |
<effect> is a Pro effect | Get Pro, then run npx znverse login with a token from your dashboard |
Your znverse token was not accepted | The token was revoked; create a new one and run npx znverse login |
No package.json found | Run the command in your app folder or pass --cwd |
file(s) already exist with different content | Review the files, then re-run with --overwrite |
This is the znverse repository | Run the command in your own project |