Install the Plexivo CLI

Install the Plexivo CLI, sign in through your browser with a limited, expiring session, and reach any database from your laptop.

The Plexivo CLI, plexivo, signs you in from your terminal and opens an encrypted tunnel to any Plexivo Postgres, Plexivo MySQL or Plexivo Cache resource, even a private one.

Install#

On macOS and Linux:

bash
curl -fsSL https://github.com/plexivo/plexivo-cli/releases/latest/download/install.sh | sh

The script installs plexivo for Intel and Apple silicon Macs and for Linux on x86-64 and Arm, after checking the download’s checksum. It installs to /usr/local/bin, or to ~/.local/bin if that is not writable.

On Windows, download plexivo-windows-amd64.zip from the latest release and put plexivo.exe on your PATH.

bash
plexivo version

Sign in#

bash
plexivo auth login
  1. Check the code. The CLI shows a short code and opens the Plexivo console in your browser.
  2. Confirm it is you. On Approve this sign-in?, check that the code matches your terminal, choose the organisation and tick the box to confirm you started this sign-in yourself, in your own terminal. Approve only a sign-in you started moments ago.
  3. Choose what the session may do, then choose Approve.
AccessWhat the session may do
Read onlySee resources, logs and settings. Changes nothing.
OperateCreate and change resources and open database tunnels. No deletes, no billing.
FullEverything you can do in this organisation, including deletes, and billing if you may manage it.

A session never has more access than your own role, or than your organisation allows. It ends on its own after your organisation’s session length: 1, 4, 8, 12 or 24 hours, 8 by default. Owners and admins set it in Settings → CLI sessions, where they can also see and end every session in the organisation; members see and end their own.

bash
plexivo auth status    # organisation, access and time left
plexivo auth logout    # end the session now

On a server without a browser, run plexivo auth login --no-browser and open the link on your phone or laptop.

Connect to a database#

Opening a tunnel needs the owner or admin role. Sign in with Operate or Full access, then:

bash
plexivo db list
plexivo db connect orders-db

plexivo db connect opens a local port (5432 for Plexivo Postgres, 3306 for Plexivo MySQL, 6380 for Plexivo Cache, or a free port if that one is taken) and prints the connection details. Keep it running and use psql, TablePlus or DBeaver in a second terminal. It works whether the database is public, limited to trusted networks or private. Ctrl+C closes the tunnel, and every tunnel is recorded in your organisation’s audit log.

Useful options: --port to choose the local port, --bind to listen on another address, --show-password to print the password in the connection string.

Use the CLI in CI#

For automation, create an API key in Settings → API keys and set it as PLEXIVO_TOKEN. Or store a key with plexivo auth login --api-key. A stored sign-in is kept in your user configuration folder, readable only by you.

Next steps#

Updated 27 October 2026