aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/help.go
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-07-22 15:41:03 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-07-22 15:41:03 -0400
commit344c6526a8d6f490fc7628ddc7d2dd06ed1a07c1 (patch)
tree342878ff5d77b557533d6e5473e1d8f6e79ac6e9 /cmd/help.go
parentfaf35ef54885bc48b897508ce3cb40b868ff505b (diff)
Separate program entry point from commands
Diffstat (limited to 'cmd/help.go')
-rw-r--r--cmd/help.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/cmd/help.go b/cmd/help.go
new file mode 100644
index 0000000..b3844ac
--- /dev/null
+++ b/cmd/help.go
@@ -0,0 +1,29 @@
+package cmd
+
+import (
+ "fmt"
+ "os"
+)
+
+var CommandHelp map[string]string
+
+func PrintHelp() {
+ fmt.Println("atlas is a note indexing and querying tool")
+ fmt.Printf("\nUsage:\n %s [global-flags] <command>\n\n", os.Args[0])
+ fmt.Println("Commands:")
+ fmt.Println(" index - build, update, or modify an index")
+ fmt.Println(" query - search against an index")
+ fmt.Println(" shell - start a debug shell")
+ fmt.Println(" server - start an http query server (EXPERIMENTAL)")
+ fmt.Println(" help - print this help then exit")
+}
+
+func init() {
+ CommandHelp = make(map[string]string)
+ CommandHelp["query"] = ""
+ CommandHelp["index"] = ""
+ CommandHelp["server"] = ""
+ CommandHelp["completions"] = ""
+ CommandHelp["shell"] = ""
+ CommandHelp["help"] = ""
+}