Open source AI coding agent. Designed for large projects and real world tasks.
Go aiai-agentsai-developer-toolsai-toolsclicommand-linedeveloper-toolsgitgolanggpt-4llmopenaipolyglot-programmingterminalterminal-basedterminal-ui
Fix root level --help/-h to use custom help command rather than cobra's help message
Dane Schneider9d63740bf0f2
diff --git a/app/cli/cmd/root.go b/app/cli/cmd/root.goindex 46d69610..0a2189bd 100644--- a/app/cli/cmd/root.go+++ b/app/cli/cmd/root.go@@ -27,7 +27,6 @@ func Execute() {}func run(cmd *cobra.Command, args []string) {-}func init() {diff --git a/app/cli/main.go b/app/cli/main.goindex 0a47aea3..31fa6864 100644--- a/app/cli/main.go+++ b/app/cli/main.go@@ -44,5 +44,13 @@ func init() {func main() {checkForUpgrade()++ // Manually check for help flags at the root level+ if len(os.Args) == 2 && (os.Args[1] == "-h" || os.Args[1] == "--help") {+ // Display your custom help here+ term.PrintCustomHelp()+ os.Exit(0)+ }+cmd.Execute()}diff --git a/releases/cli/versions/0.8.2.md b/releases/cli/versions/0.8.2.mdnew file mode 100644index 00000000..86f2c9e4--- /dev/null+++ b/releases/cli/versions/0.8.2.md@@ -0,0 +1 @@+- Fix root level --help/-h to use custom help command rather than cobra's help message (re: https://github.com/plandex-ai/plandex/issues/25)\ No newline at end of file