Access quickstart
Section titled “Access quickstart”An Access session provides temporary PostgreSQL credentials and records the queries executed through the session for review.
You need a PgStack account, a project with Access configured, and permission to start sessions. Team admins and engineers can create their own sessions.
1. Install the CLI
Section titled “1. Install the CLI”On macOS or Linux:
curl -fsSL https://pgstack.io/install.sh | bashThe installer downloads a standalone executable, verifies its SHA-256 checksum, and installs it to ~/.local/bin/pgstack. Add that directory to your PATH if needed.
2. Sign in
Section titled “2. Sign in”pgstack auth loginConfirm the code from your terminal in the browser. Use pgstack auth login --no-browser to print the sign-in URL instead of opening it automatically.
3. Start a session
Section titled “3. Start a session”Select a project by environment:
pgstack access start --env production --duration 30m --read-only --reason "Investigate delayed orders"Or use a project slug, replacing <project-slug> with your project's slug:
pgstack access start <project-slug> --duration 30m --read-only --reason "Investigate delayed orders"The CLI returns a temporary PostgreSQL connection URL. The read-only flag guards against accidental writes; choose the project's role and permissions appropriate for your task.
4. Connect with your client
Section titled “4. Connect with your client”Copy the returned URL into your PostgreSQL client or use it with psql:
psql '<temporary-connection-url>'Treat the URL as a secret. It grants access for the session's lifetime. PgStack records the SQL queries executed through the session.
5. Finish the session
Section titled “5. Finish the session”pgstack access listpgstack access revoke <session-slug> --reason "Investigation complete"Review the session in the project's Access view. See session management for expiration, extensions, and revocation behavior.
Copyright © 2026 PgStack
