Plexivo CLI reference
Every Plexivo CLI command, flag and environment variable, with where the CLI keeps your sign-in and what it prints.
The Plexivo CLI, plexivo, does two things well: it signs you in with a limited, expiring session, and it opens an encrypted tunnel from your laptop to any Plexivo Postgres, Plexivo MySQL or Plexivo Cache resource. This page lists every command. To install it, see Install the CLI.
Commands at a glance#
| Command | What it does |
|---|---|
plexivo auth login | Sign in through your browser. |
plexivo auth status | Show the organisation, access level and time left. |
plexivo auth logout | End the session and forget it on this machine. |
plexivo db list | List your databases and caches. |
plexivo db connect <name|id> | Open a local port to a database or cache. |
plexivo version | Print the CLI version. |
plexivo help | Print the command summary. |
plexivo auth login#
Starts a browser sign-in. The CLI prints a short code and opens the Plexivo console, where you check the code, choose the organisation and the access the session may have, and approve. The code works for 10 minutes.
plexivo auth login| Flag | What it does |
|---|---|
--no-browser | Print the link instead of opening a browser. Use it on a server, then open the link on your phone or laptop. |
--api-key | Store an API key instead of starting a browser sign-in. The CLI asks for the key, checks it with Plexivo and stores it. For CI and automation. |
The session’s access is one of Read only, Operate or Full, and it ends on its own after your organisation’s CLI session length. See Sign in for what each level allows.
plexivo login is a shortcut for plexivo auth login.
plexivo auth status#
Shows who you are signed in as and for how long:
Signed in to Acme with operate access. The session ends at 18:40 on 27 Oct (3h 12m left).If PLEXIVO_TOKEN is set, it says so instead. A stored API key shows as Signed in with an API key (no expiry set by the CLI). plexivo auth list does the same.
plexivo auth logout#
Ends a browser sign-in on Plexivo’s side too, then removes the stored sign-in from this machine. For a stored API key, it removes the key from this machine only; revoke the key itself in Settings → API keys. plexivo auth revoke and plexivo logout do the same.
plexivo db list#
Lists every Plexivo Postgres, Plexivo MySQL and Plexivo Cache resource in the organisation your sign-in is for. plexivo db ls does the same.
ID NAME ENGINE STATUS ACCESS ORGANISATION
0192f3a4-5b6c-7d8e-9f01-23456789abcd orders-db Postgres running private Acme
0192f3a4-6c7d-7e8f-a012-3456789abcde sessions Cache running trusted IPs (2) AcmeThe ACCESS column shows whether each resource is public, private or limited to trusted IP addresses.
plexivo db connect#
Opens an encrypted tunnel from a local port to a database or cache, whether it is public, limited to trusted networks or private. Give the resource’s exact name or its id. If two resources share a name, use the id.
plexivo db connect orders-db
plexivo db connect orders-db --port 15432| Flag | Default | What it does |
|---|---|---|
--port N | The engine’s usual port | The local port to listen on. |
--bind ADDR | 127.0.0.1 | The local address to listen on. |
--show-password | Off | Print the password in the connection string. Without it, the string shows <password>. |
Without --port, the CLI listens on 5432 for Plexivo Postgres, 3306 for Plexivo MySQL and 6380 for Plexivo Cache. If that port is busy, it picks a free one. With --port, a busy port is an error.
The CLI prints the connection string, pointed at the local port. Keep the command running while you work; Ctrl+C closes the tunnel. Opening a tunnel needs the owner or admin role in the organisation, and a sign-in with Operate or Full access (or an API key with the write scope).
plexivo version#
Prints the installed version. plexivo --version and plexivo -v do the same.
Environment variables#
| Variable | What it does |
|---|---|
PLEXIVO_TOKEN | An API key to use instead of the stored sign-in. Use it in CI. |
PLEXIVO_API_URL | The API address. Defaults to https://api.plexivo.io. |
export PLEXIVO_TOKEN=plx_live_… # from Settings → API keys
plexivo db listWhere the sign-in is kept#
The CLI keeps your sign-in in plexivo/config.json inside your user configuration folder, readable only by you:
- Linux:
~/.config/plexivo/config.json - macOS:
~/Library/Application Support/plexivo/config.json - Windows:
%AppData%\plexivo\config.json
Output and exit codes#
The CLI prints plain text for people to read. It exits with 0 on success and 1 on any error, with the reason on standard error after plexivo:.
When a browser sign-in has ended, commands that call Plexivo say so:
plexivo: your Plexivo session has expired: run `plexivo auth login` to sign in againNext steps#
Updated 27 October 2026