The terminal waits, cursor blinking, and the network is locked behind secure walls. You need data from a remote Postgres database, but the path runs through Twingate. Pgcli makes the query fast and readable. Integrated with Twingate, it becomes both secure and efficient.
Pgcli is a command-line client for Postgres with auto-completion and syntax highlighting. For teams working with distributed infrastructure, these features cut query time and reduce error risk. Twingate provides secure remote access without exposing databases directly to the public internet. It builds encrypted tunnels on demand, verified by your identity provider.
When you run Pgcli through Twingate, the connection stays private end-to-end. First, configure Twingate connectors in the network that hosts your Postgres instance. Then assign resource entries for the database hostname and port. Once the connector is active, Twingate creates an overlay network that Pgcli can target exactly like a local service.
Authentication flows remain seamless. Twingate handles the handshake, Pgcli sends queries, and results return without packet leaks or open ports. You avoid VPN sprawl, and you can run commands like: