Skip to content

Conversation

@SimeonGriggs
Copy link
Contributor

@SimeonGriggs SimeonGriggs commented Jan 13, 2026

Summary

  • Display credentials in a vertical layout when creating a role or resetting a role's password
  • Add DATABASE URL field with a ready-to-use PostgreSQL connection string
  • Makes it easier for users to copy credentials without having to construct the URL manually

Changes

Updates three commands:

  • pscale role create
  • pscale role reset
  • pscale role reset-default

Example Output

Role my-role was successfully created in mydb/main.
Please save the values below as they will not be shown again

ID                 role-abc123
NAME               my-role
USERNAME           my-role_abc123
PASSWORD           secretpass123
ACCESS HOST URL    pg.psdb.cloud
DATABASE URL       postgresql://my-role_abc123:[email protected]:5432/postgres?sslmode=verify-full

Notes

  • JSON/CSV output includes the new database_url field
  • Uses sslmode=verify-full for maximum security
  • URL-encodes username and password to handle special characters
  • Defaults to port 5432 if not specified in the access host URL

@SimeonGriggs SimeonGriggs requested a review from a team as a code owner January 13, 2026 18:31
@SimeonGriggs SimeonGriggs force-pushed the feature/role-connection-url branch 3 times, most recently from 0c09659 to bf4e924 Compare January 13, 2026 18:51
Display credentials in a vertical layout with DATABASE URL when
creating a role or resetting a role's password. This makes it easier
for users to copy the connection string directly.

Human output:
  ID                 role-abc123
  NAME               my-role
  USERNAME           my-role_abc123
  PASSWORD           secretpass123
  ACCESS HOST URL    pg.psdb.cloud
  DATABASE URL       postgresql://...

JSON/CSV output includes the new database_url field.

The connection URL follows the format:
postgresql://username:password@host:port/postgres?sslmode=verify-full

Also fixes the success message in reset-default to use the consistent
database/branch format instead of branch in database.
@SimeonGriggs SimeonGriggs force-pushed the feature/role-connection-url branch from bf4e924 to f56fb0d Compare January 13, 2026 19:08
@SimeonGriggs SimeonGriggs merged commit 3e3d7e6 into main Jan 13, 2026
2 checks passed
@SimeonGriggs SimeonGriggs deleted the feature/role-connection-url branch January 13, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants