@rekey.dev/cli
v2.1.0
Published
Rekey command-line interface — designed for both human developers and AI agents.
Readme
@rekey.dev/cli
ReliPay is now Rekey. This package was previously published as the equivalent
@relipay/*package, which is deprecated. Env vars renamedRELIPAY_*→REKEY_*(as of 2.0.0 the old names are no longer read — setREKEY_*). relipay.dev (the old domain) will redirect to rekey.dev after the domain migration.
rekey — command-line interface for Rekey deployments. Designed for both human developers and AI agents.
What is Rekey? An auth + billing backend for your SaaS: sign-in (password, magic-link, passkeys, OAuth, MFA), subscriptions, usage, credits, licenses, and teams — behind one API, multi-tenant, provider-agnostic. Docs: rekey.dev/docs. This CLI manages a deployment — tenants, applications, API keys — from your terminal or an agent.
For AI agents: start at AGENTS.md.
Install
pnpm add -g @rekey.dev/cli
# or per-project
pnpm add -D @rekey.dev/cliUse
export REKEY_URL=http://localhost:3030
export SUPER_ADMIN_KEY=$(openssl rand -hex 32) # whatever you set on the deployment
rekey doctor
rekey init \
--tenant-name "Acme" --owner-email [email protected] \
--app-name "Acme Prod" --app-slug acme-prod
rekey apps list
rekey plans create --app <id> --slug pro_monthly --name Pro --amount 999
rekey plans list --app <id>Add --json to any command for machine-readable output.
Status
Phase 2.0 scaffold. Everything below in "Implemented" is real and wired to the API; everything under "Planned" does not exist yet — invoking it prints commander's unknown-command error.
Implemented
All commands talk to the admin surface (/api/v1/admin/*) and need REKEY_URL + SUPER_ADMIN_KEY — except version, which needs neither, and doctor, which needs only REKEY_URL: a missing SUPER_ADMIN_KEY is reported as a warn check and doctor still exits 0, since telling you the key is missing is the diagnosis.
| Command | What it does |
|---|---|
| rekey version | Print the CLI version. No env needed. rekey --version / -V print the same thing; the subcommand is the one that honours --json. |
| rekey doctor | Config + connectivity diagnosis (/health probe, env checks). Run this first. |
| rekey init | One-shot bootstrap: create tenant → application → first API key. With --json the document is { tenant, application, apiKey } at the top level — no success/data envelope on the success path — so the secret is at apiKey.rawKey, printed exactly once. (The { success: false, error } envelope appears only on failure, on stderr.) |
| rekey apps list \| get <id> \| create | Application CRUD. |
| rekey plans list \| create \| set-active | Plan management (--amount is the smallest currency unit — integer). |
Planned (not yet implemented)
These are on the roadmap but not shipped — don't script against them yet:
rekey coupons …— coupon management (today: panel or admin API).rekey api-keys list/create/revoke— key lifecycle (today: panel, admin API, or the MCP server'smint_api_key).rekey tunnel-webhooks— thestripe listenequivalent for local webhook development.
See AGENTS.md for the full agent-facing contract.
About Rekey
Rekey is a self-hostable auth + billing backend for SaaS — one API for sign-in, subscriptions, usage, credits, licenses, and teams.
- Website + docs: rekey.dev · rekey.dev/docs
- SDKs:
@rekey.dev/node(server) ·@rekey.dev/react(browser) ·@rekey.dev/nextjs·@rekey.dev/mcp(MCP server)
