Skip to content

feat(info, search, install, uninstall): add json output option - #246

Merged
zeroshade merged 13 commits into
mainfrom
some-json
Jan 19, 2026
Merged

zeroshade merged 13 commits into
mainfrom
some-json

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Add --json options for output of info and search subcommands

@eitsupi eitsupi left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems nice!
Shell completion needs to be updated.

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works great, nice one.

Two suggestions for style and we should also update the shell completions and docs.

Here's a patch for the docs,

diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 1137183..f8bb8b8 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -66,6 +66,10 @@ $ dbc search [FILTER]
 
 <h3>Options</h3>
 
+`--json`
+
+:   Print output as JSON instead of plaintext
+
 `--verbose`, `-v`
 
 :   Enable verbose output
@@ -255,6 +259,10 @@ $ dbc info <DRIVER>
 
 <h3>Options</h3>
 
+`--json`
+
+:   Print output as JSON instead of plaintext
+
 `--quiet`, `-q`
 
 :   Suppress all output

Comment thread cmd/dbc/info.go Resolved
Comment thread cmd/dbc/search.go Resolved
@zeroshade zeroshade changed the title feat(info, search): add json output option feat(info, search, install, uninstall): add json output option Jan 11, 2026

@amoeba amoeba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this ready for another review? I think this looks good now so +1.

Comment thread cmd/dbc/completions/dbc.bash Outdated
COMPREPLY=($(compgen -W "user system" -- "$cur"))
return 0
;;
;;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe unnecessary spaces?

@zeroshade
zeroshade merged commit 5eafdb5 into main Jan 19, 2026
@zeroshade
zeroshade deleted the some-json branch January 19, 2026 22:37
zeroshade added a commit that referenced this pull request Apr 17, 2026
Add `--json` options for output of info and search subcommands

---------

Co-authored-by: Bryce Mecum <[email protected]>

This branch was previously deployed

1 inactive deployment
snapshot — 8a8facf9 Deployed Jan 19, 2026 by zeroshade
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.

3 participants