[GH-ISSUE #3] Expose connection hooks #3

Open
opened 2026-03-02 15:46:57 +03:00 by kerem · 2 comments
Owner

Originally created by @dbousamra on GitHub (Feb 9, 2026).
Original GitHub issue: https://github.com/pgplex/pgconsole/issues/3

Originally assigned to: @tianzhou on GitHub.

Summary

Connection hooks for dynamically resolving database credentials

Problem

Some workflows require dynamically resolving connection details (e.g. starting a local proxy and fetching credentials from a secrets manager) before a database connection can be established. The tool currently assumes static connection parameters, which makes these setups unsupported.

Proposed Solution

Add support for connection lifecycle hooks (pre-connect / on-connect) that allow running custom commands or scripts to dynamically supply host, port, username, and password at connection time.

Additional Context

Example use case:

  • Start a local Cloud SQL proxy
  • Fetch database credentials from a secrets manager

This pattern is common for cloud-managed databases and secrets-based auth.

Originally created by @dbousamra on GitHub (Feb 9, 2026). Original GitHub issue: https://github.com/pgplex/pgconsole/issues/3 Originally assigned to: @tianzhou on GitHub. ## Summary Connection hooks for dynamically resolving database credentials ## Problem Some workflows require dynamically resolving connection details (e.g. starting a local proxy and fetching credentials from a secrets manager) before a database connection can be established. The tool currently assumes static connection parameters, which makes these setups unsupported. ## Proposed Solution Add support for connection lifecycle hooks (pre-connect / on-connect) that allow running custom commands or scripts to dynamically supply host, port, username, and password at connection time. ## Additional Context Example use case: - Start a local Cloud SQL proxy - Fetch database credentials from a secrets manager This pattern is common for cloud-managed databases and secrets-based auth.
Author
Owner

@tianzhou commented on GitHub (Feb 10, 2026):

Didn't expect this coming up so soon :)

<!-- gh-comment-id:3877093473 --> @tianzhou commented on GitHub (Feb 10, 2026): Didn't expect this coming up so soon :)
Author
Owner

@dbousamra commented on GitHub (Feb 16, 2026):

Hi Tianzhou. I see the app is now open source. Would this be suitable for me to submit a PR for? Do you have a recommended approach - is hooks what we want?

<!-- gh-comment-id:3910880872 --> @dbousamra commented on GitHub (Feb 16, 2026): Hi Tianzhou. I see the app is now open source. Would this be suitable for me to submit a PR for? Do you have a recommended approach - is hooks what we want?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pgconsole#3
No description provided.