feat: Add gcloud-style command grouping to gt help output
Organize 43 commands into 7 logical groups using cobra's built-in AddGroup/GroupID feature: - Work Management: spawn, sling, hook, handoff, done, mol, mq, etc. - Agent Management: mayor, witness, refinery, deacon, polecat, etc. - Communication: mail, nudge, broadcast, peek - Services: daemon, start, stop, up, down, shutdown - Workspace: rig, crew, init, install, git-init, namepool - Configuration: account, theme, hooks, issue, completion - Diagnostics: status, doctor, prime, version, help Also renamed molecule to mol as the primary command name (molecule is now an alias). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ const MayorSessionName = "gt-mayor"
|
||||
var mayorCmd = &cobra.Command{
|
||||
Use: "mayor",
|
||||
Aliases: []string{"may"},
|
||||
GroupID: GroupAgents,
|
||||
Short: "Manage the Mayor session",
|
||||
Long: `Manage the Mayor tmux session.
|
||||
|
||||
@@ -126,7 +127,8 @@ func startMayorSession(t *tmux.Tmux) error {
|
||||
|
||||
// Launch Claude - the startup hook handles 'gt prime' automatically
|
||||
// Use SendKeysDelayed to allow shell initialization after NewSession
|
||||
claudeCmd := `claude --dangerously-skip-permissions`
|
||||
// Export GT_ROLE in the command since tmux SetEnvironment only affects new panes
|
||||
claudeCmd := `export GT_ROLE=mayor && claude --dangerously-skip-permissions`
|
||||
if err := t.SendKeysDelayed(MayorSessionName, claudeCmd, 200); err != nil {
|
||||
return fmt.Errorf("sending command: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user