Your whole Cloud SQL
workflow, in one cockpit.
Connect to any environment, tail logs, inspect databases, take backups, and pull secrets from one terminal screen — instead of a stack of gcloud and cloud-sql-proxy commands. And because every environment binds to its own address, prod can never look like localhost.
One screen, not a stack of commands.
gcp-tui drives gcloud and cloud-sql-proxy for you. Opening a tunnel, tailing Cloud Logging, listing databases and users, taking a backup, or pulling secrets is a single keypress in the cockpit instead of a long invocation you keep in a scratchpad. Every command it runs is printed first, so nothing is hidden.
cloud-sql-proxy --port 15434 …:prod-db
→
⏎ open a tunnel
gcloud logging read 'resource.labels.database_id="…"' --limit 50
→
L tail logs
gcloud sql databases list --instance prod-db --project …
→
D list databases
gcloud sql backups list --instance prod-db --project …
→
B backups
gcloud secrets versions access latest --secret … --project …
→
s pull secrets
Tunnels that clean up
Proxies run as tracked background processes that are killed when you quit. They're session-scoped, so a normal exit never leaves a listener behind.
It checks ADC, not just login
doctor validates your gcloud login and your Application Default Credentials, notices when either has expired, and offers to fix it.
Secrets stay off your shell
Pull Secret Manager values into a gitignored .env; set new versions over stdin. Profile passwords live in your OS keyring, never in config.
Every command is printed first
Each external gcloud and proxy command is printed before it runs. Transparency is the point, because these commands can reach production.
Prod can never
look like localhost.
Each environment gets its own loopback address and port, so the address itself tells you where you are: staging on 127.0.0.2, prod on 127.0.0.3. The interface colours everything to match — green for the environments that are safe to poke at, red for production.
Starting a tunnel or any write against a prod environment makes you type its name back first, and no flag skips it. The same typed confirmation guards every mutation: opening a tunnel, taking a backup, setting a secret.
postgres://app@127.0.0.2:15433/db
postgres://app@127.0.0.3:15434/db
Safe to hand
to an agent.
Every read command speaks --json, and --dry-run prints the exact gcloud call without running it — so a script, CI, or an LLM agent can see precisely what would happen. Reads are always allowed.
A prod write needs a human at a real terminal. A non-interactive caller is refused, and --yes never authorizes prod — so you can automate against gcp-tui freely and still know production is out of reach.
Refused is final. --yes doesn't apply to prod.
Install it in one line.
Requires the gcloud CLI and cloud-sql-proxy on your PATH.
- 01
gcp-tui doctorcheck prerequisites + auth, fix what's missing - 02
gcp-tui initdiscover Cloud SQL instances and add them - 03
gcp-tuiopen the cockpit