@pluralize/cli
v0.1.0
Published
Command-line interface for the Pluralize platform — manage apps, env files, CORS, and plans without the dashboard.
Maintainers
Readme
@pluralize/cli
Command-line interface for the Pluralize platform. Manage your apps, env files, CORS allowlist, and plans without leaving the terminal.
Install
npm install -g @pluralize/cliRequires Node.js 20+.
First five minutes
# 1. Authenticate (interactive — password is read from a TTY).
pluralize login
# 2. Create an app. Save the publishable key when it prints — it is shown ONCE.
pluralize app create "My App"
# 3. Write APP_ID and KEY into .env.local in the current directory.
pluralize env pull --key pk_live_abc123...
# 4. Allow your local dev origin.
pluralize cors add http://localhost:3000
# 5. Verify everything is wired up.
pluralize doctor
# 6. Or skip steps 2–5 with the orchestrator:
pluralize initCommon commands
| Command | Notes |
|------------------------------------|--------------------------------------------------------|
| pluralize login | Reads email + password, stores a JWT (4h TTL). |
| pluralize logout | Deletes ~/.pluralize/credentials.json. |
| pluralize whoami | Prints email + default app, exits 1 if not logged in. |
| pluralize app list | All apps you own. |
| pluralize app create <name> | Creates an app + prints the publishable key once. |
| pluralize app use <id-or-slug> | Sets the default app for follow-up commands. |
| pluralize app regenerate-key | Mints a fresh pk_live_…. The previous key dies. |
| pluralize env pull [path] | Upserts NEXT_PUBLIC_PLURALIZE_APP_ID (and …_KEY with --key). |
| pluralize cors list/add/remove | Manage the CORS allowlist for the default app. |
| pluralize plans list/add/entitle | Manage the app's plans + entitlements. |
| pluralize doctor | Health check — credentials, default app, CORS, .env. |
| pluralize init | End-to-end setup orchestrator. --yes skips prompts. |
Global flags
--app <id>— override the default app for one command.--json— emit machine-readable output to stdout.--verbose— log HTTP request summaries to stderr.
Environment
PLURALIZE_BASE_URL— point the CLI at a non-prod server (e.g.http://localhost:3000for local development).
Where credentials live
~/.pluralize/credentials.json, mode 0600. Contains the JWT (4h TTL),
the email, the base URL, and the default app id. pluralize logout deletes
the file.
Development (this repo)
cd packages/cli
npx tsup # builds dist/bin.js
node dist/bin.js --help
npx vitest run # unit tests