The terminal waits, cursor blinking, your database out of reach until you pass the gate. Pgcli demands one thing: the provisioning key. Without it, there is no connection, no query, no control.
A Pgcli provisioning key is the secure token that unlocks access to a managed PostgreSQL instance. It’s issued by your provider when you spin up a new environment, and it authenticates your CLI session. You paste it once, and Pgcli binds to your database with correct credentials and encryption. No manual user setup. No password juggling.
To get your Pgcli provisioning key, log in to your database service dashboard. Find the CLI setup section. Copy the key exactly as it appears—no spaces, no formatting changes. In your terminal, run:
pgcli --provisioning-key <your_key>
Pgcli stores the key locally, usually in a secure config file. The next time you connect, it pulls from this file and signs your session. If the key expires or is revoked, Pgcli will refuse connections until you provide a fresh one. This tight cycle reduces exposure and blocks unauthorized access fast.