Skip to content

Add --json flag to db config list; quiet dotenv output (#61) - #67

Merged
TrivCodez merged 2 commits into
IN3PIRE:mainfrom
SankeerthNara:Add---json-flag-to-db-config-list
Jul 22, 2026
Merged

TrivCodez merged 2 commits into
IN3PIRE:mainfrom
SankeerthNara:Add---json-flag-to-db-config-list

Conversation

@SankeerthNara

Copy link
Copy Markdown
Contributor

Closes #61

Changes

  • Added --json option to db config list, following the same pattern
    as db branch inspect --json
  • Outputs JSON.stringify(config, null, 2) when the flag is passed
  • Set quiet: true on the dotenv config call in cli.ts — dotenv 17.x
    prints a random "tip" line to stdout on every invocation, which was
    corrupting piped JSON output and breaking scriptability

Testing

  • npm run build passes with no errors
  • db config list — unchanged formatted output
  • db config list --json | ConvertFrom-Json — parses cleanly

@TrivCodez TrivCodez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and well-done. The quiet: true on dotenv is a pragmatic fix. One thought: under --json, NEON_API_KEY is printed in plain text — consider masking it in JSON output to avoid accidental exposure in logs/CI, consistent with the formatted view's '✓ set'. Not a blocker. Good to merge.

@TrivCodez
TrivCodez merged commit 1d15062 into IN3PIRE:main Jul 22, 2026
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.

Add --json flag to db config list

2 participants