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#

CommandWhat it does
plexivo auth loginSign in through your browser.
plexivo auth statusShow the organisation, access level and time left.
plexivo auth logoutEnd the session and forget it on this machine.
plexivo db listList your databases and caches.
plexivo db connect <name|id>Open a local port to a database or cache.
plexivo versionPrint the CLI version.
plexivo helpPrint 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.

bash
plexivo auth login
FlagWhat it does
--no-browserPrint the link instead of opening a browser. Use it on a server, then open the link on your phone or laptop.
--api-keyStore 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:

text
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.

text
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)   Acme

The 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.

bash
plexivo db connect orders-db
plexivo db connect orders-db --port 15432
FlagDefaultWhat it does
--port NThe engine’s usual portThe local port to listen on.
--bind ADDR127.0.0.1The local address to listen on.
--show-passwordOffPrint 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#

VariableWhat it does
PLEXIVO_TOKENAn API key to use instead of the stored sign-in. Use it in CI.
PLEXIVO_API_URLThe API address. Defaults to https://api.plexivo.io.
bash
export PLEXIVO_TOKEN=plx_live_…   # from Settings → API keys
plexivo db list

Where 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:

text
plexivo: your Plexivo session has expired: run `plexivo auth login` to sign in again

Next steps#

Updated 27 October 2026