package cmd import ( "fmt" "github.com/spf13/cobra" ) var examplesCmd = &cobra.Command{ Use: "examples", Short: "Show common usage examples", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { fmt.Print(`Add notes: kb addnote "Remember to update DNS records" kb addnote "Server room is building 3" --tags ops Add files: kb addfile report.pdf kb addfile ~/docs/ --recursive --tags reference Search: kb search "how to restart nginx" kb search "deploy" --tags ops --top 5 Manage documents: kb list --type pdf kb info 3 kb tag 3 --add important,ops kb remove 3 --yes `) }, } func init() { rootCmd.AddCommand(examplesCmd) }