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:
@@ -22,8 +22,9 @@ var (
|
||||
)
|
||||
|
||||
var witnessCmd = &cobra.Command{
|
||||
Use: "witness",
|
||||
Short: "Manage the polecat monitoring agent",
|
||||
Use: "witness",
|
||||
GroupID: GroupAgents,
|
||||
Short: "Manage the polecat monitoring agent",
|
||||
Long: `Manage the Witness monitoring agent for a rig.
|
||||
|
||||
The Witness monitors polecats for stuck/idle state, nudges polecats
|
||||
@@ -330,7 +331,8 @@ func ensureWitnessSession(rigName string, r *rig.Rig) (bool, error) {
|
||||
// Launch Claude directly (no shell respawn loop)
|
||||
// Restarts are handled by daemon via LIFECYCLE mail or deacon health-scan
|
||||
// NOTE: No gt prime injection needed - SessionStart hook handles it automatically
|
||||
if err := t.SendKeys(sessionName, "claude --dangerously-skip-permissions"); err != nil {
|
||||
// Export GT_ROLE in the command since tmux SetEnvironment only affects new panes
|
||||
if err := t.SendKeys(sessionName, "export GT_ROLE=witness && claude --dangerously-skip-permissions"); err != nil {
|
||||
return false, fmt.Errorf("sending command: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user