CLI
The rivtor CLI talks to the same API as the MCP tools. Run it with npx from the root of your project, or install it once with npm i -g rivtor.
Requires Node.js 20 or later. Every command accepts --help; most also accept --json and -p, --project <slug>.
login
rivtor login [--token <token>] [--api-url <url>]
Saves an API token from /dashboard/tokens to ~/.config/rivtor/config.json (mode 0600; $XDG_CONFIG_HOME/rivtor if set). Without --token it asks for the token with hidden input. rivtor logout removes it; rivtor whoami shows the account and plan.
npx rivtor loginnpx rivtor login --token rvt_...deploy
rivtor deploy [path] [-p <slug>] [--dry-run] [--env-file <file>] [--no-wait] [--json]
Packs the folder (default .), uploads it and deploys every service in it with the Postgres, Redis and storage the code needs, then prints the live URLs. The project slug comes from --project, then rivtor.json, then the folder name; after the first deploy the CLI writes rivtor.json so later deploys go to the same project. See what gets uploaded.
| Flag | What it does |
|---|---|
-p, --project <slug> | Project slug (default: rivtor.json, else the folder name) |
--dry-run | Only detect and print the deploy plan; nothing is deployed |
--env-file <file> | Send the variables in this dotenv file with the deploy |
--no-wait | Start the deployment and exit without waiting |
--json | Print the raw DeployResult JSON (for scripts and agents) |
npx rivtor deploynpx rivtor deploy ./my-app --dry-runnpx rivtor deploy --env-file .env.productionstatus
rivtor status [project] [--json]
Every service with its status, URL, framework and release, each data service with its size, and the last deploy.
npx rivtor statusprojects
rivtor projects [--json]
Lists your projects.
npx rivtor projectslogs
rivtor logs [project] [-s <service>] [--since <window>] [--level <level>] [-n <n>] [--raw] [--build <deploymentId>]
Runtime logs, summarised by default (repeats collapsed, errors kept). With --build, the build and deploy log of one deployment instead.
| Flag | What it does |
|---|---|
-s, --service <name> | Only this service |
--since <window> | Time window: 15m, 2h, or an ISO timestamp |
--level <level> | debug | info | warn | error |
-n, --limit <n> | Maximum number of lines |
--raw | Raw lines instead of the summary |
--build <deploymentId> | Show the build/deploy log of a deployment |
npx rivtor logs --service api --since 15m --level errornpx rivtor logs --build dpl_7h2k9xenv
rivtor env set KEY=VALUE [KEY2=VALUE2 ...] [-s <service>] · env rm KEY [KEY2 ...] · env ls
env set stores variables and secrets, encrypted, and restarts the services; nothing rebuilds. env rm (alias unset) removes them; env ls (alias list) lists names with masked values. Without --service a change applies to every service. Credentials Rivtor manages (DATABASE_URL, REDIS_URL, S3_*) are read-only.
npx rivtor env set STRIPE_SECRET_KEY=sk_live_... --service apinpx rivtor env rm STRIPE_SECRET_KEYnpx rivtor env lsrollback
rivtor rollback [releaseId] [-p <slug>]
Points traffic back at the release before the current one, or at the release you name. Takes seconds; nothing rebuilds.
npx rivtor rollbackdb
rivtor db query "<sql>" · db url · db export -o <file>
db query runs read-only SQL (5 s timeout, at most 500 rows). db url creates a temporary connection string valid for about an hour. db export -o downloads a pg_dump in custom format, restorable with pg_restore; -o is required.
npx rivtor db query "select count(*) from users"npx rivtor db urlnpx rivtor db export -o backup.dumpdomain
rivtor domain add <hostname> [-s <service>] [-p <slug>]
Attaches a custom domain to the primary public service (or the one you name) and prints the DNS record to create. HTTPS is issued automatically once DNS resolves. Limits per plan are on Limits.
npx rivtor domain add www.example.comdestroy
rivtor destroy [project] [--confirm <slug>]
Deletes a project, its services and all its data. Interactively you confirm by typing the slug; in scripts pass --confirm <slug>. Without a terminal and without --confirm it refuses and deletes nothing.
npx rivtor destroy my-appupgrade
rivtor upgrade [hobby|pro|team] [--interval month|year] [--currency usd|inr] [--provider stripe|razorpay] [--no-open]
Prints a checkout link and opens it in the browser. Defaults: hobby, month. INR pays through Razorpay (UPI autopay or card), USD through Stripe. Prices are on Pricing.
npx rivtor upgrade pro --interval yearmcp
rivtor mcp
Runs the Rivtor MCP server over stdio for Claude Code, Cursor, Codex and other clients. Same tools as the remote server; its deploy uploads a folder from disk. See Connect an agent.
npx -y rivtor mcpWhat gets uploaded
- Files are packed according to your
.gitignorefiles (nested ones too) and an optional.rivtorignore. node_modules,.git, build outputs (dist,build,out,.next, ...), virtualenvs and caches are skipped..envfiles are never uploaded, even if.gitignoreallows them. Only.env.example,.env.sampleand.env.templatego up, so detection can see which names your app expects. Send values with--env-fileorrivtor env set.- The upload limit is 300 MB compressed.
rivtor.json
Written next to your code after the first deploy, so the folder keeps deploying to the same project. Commit it.
{ "project": "my-app" }Exit codes
| Code | Meaning |
|---|---|
0 | Live, or the command did what it said. |
1 | Failed. The CLI prints the cause, the file and line, and the fix (error codes). |
2 | Needs input, for example a missing secret. Set it with env set and deploy again. |
Environment variables
| Name | Use |
|---|---|
RIVTOR_TOKEN | API token. Overrides the saved config; use it in CI. |
RIVTOR_API_URL | API endpoint. Default https://api.rivtor.com. |
RIVTOR_CONFIG_DIR | Where the config is kept. Default ~/.config/rivtor (or $XDG_CONFIG_HOME/rivtor). |
In CI
# GitHub Actions step
- run: npx rivtor deploy --project my-app --json
env:
RIVTOR_TOKEN: ${{ secrets.RIVTOR_TOKEN }}