cli: make bundled help self-describing

This commit is contained in:
2026-03-22 23:37:38 +08:00
parent 5859ff219e
commit 4d8c90eb26
49 changed files with 792 additions and 29 deletions
@@ -20,6 +20,14 @@ func newShowCmd(root *rootOptions) *cobra.Command {
cmd := &cobra.Command{
Use: "show",
Short: "Show one thread with message history",
Long: helpLong(
"Use show to inspect one thread together with its message history.",
"Workers should usually inspect the assigned thread before making assumptions about task body, payload JSON, or prior coordination.",
"Leaders can also use show for manual debugging and repair.",
"Use show when you need the exact message sequence inside one thread, not just a filtered thread list.",
),
Example: ` inbox --db .agents/coord.db show --thread thr_123
inbox --db .agents/coord.db --agent worker-a show --thread thr_123 --mark-read`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
@@ -71,7 +79,7 @@ func newShowCmd(root *rootOptions) *cobra.Command {
}
cmd.Flags().StringVar(&opts.threadID, "thread", "", "Thread ID")
cmd.Flags().BoolVar(&opts.markRead, "mark-read", false, "Advance the caller's read cursor to the latest message")
cmd.Flags().BoolVar(&opts.markRead, "mark-read", false, "Advance the caller's read cursor to the latest message in this thread")
_ = cmd.MarkFlagRequired("thread")
return cmd