From 344a6f6415c3c1b593677adec3b8844e0839971b Mon Sep 17 00:00:00 2001 From: s Date: Thu, 13 Nov 2025 14:43:15 -0500 Subject: created pretty printing for all commands --- cmd/root.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go index 890d336..c4239ba 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -8,6 +8,10 @@ import ( "github.com/spf13/cobra" ) +var ( + jsonOutput bool +) + var rootCmd = &cobra.Command{ Use: "dborg", Short: "DB.org.ai CLI client", @@ -28,4 +32,9 @@ func Execute() { } func init() { + rootCmd.PersistentFlags().BoolVarP(&jsonOutput, "json", "j", false, "Output raw JSON instead of formatted text") +} + +func IsJSONOutput() bool { + return jsonOutput } -- cgit v1.2.3