feat(down): add --polecats flag and deprecate gt stop command
Issue #336: Consolidate down/shutdown/stop commands Changes: - Add `gt down --polecats` flag to stop all polecat sessions - Deprecate `gt stop` command (prints warning, directs to `gt down --polecats`) - Update help text to clarify down vs shutdown distinction: - down = pause (reversible, keeps worktrees) - shutdown = done (permanent cleanup) - Integrate --polecats with new --dry-run mode from recent PR Note: The issue proposed renaming --nuke to --tmux, but PR #330 just landed with --nuke having better safety (GT_NUKE_ACKNOWLEDGED env var), so keeping --nuke as-is. The new --polecats flag absorbs gt stop functionality as proposed. Closes #336 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
3246c7c6b7
commit
dab619b3d0
+12
-4
@@ -23,15 +23,19 @@ var (
|
||||
)
|
||||
|
||||
var stopCmd = &cobra.Command{
|
||||
Use: "stop",
|
||||
GroupID: GroupServices,
|
||||
Short: "Emergency stop for sessions",
|
||||
Long: `Emergency stop command for Gas Town sessions.
|
||||
Use: "stop",
|
||||
GroupID: GroupServices,
|
||||
Short: "Emergency stop for sessions (deprecated: use 'gt down --polecats')",
|
||||
Deprecated: "use 'gt down --polecats' instead",
|
||||
Long: `DEPRECATED: This command is deprecated. Use 'gt down --polecats' instead.
|
||||
|
||||
Emergency stop command for Gas Town sessions.
|
||||
|
||||
Stops all running polecat sessions across rigs. Use for emergency shutdown
|
||||
when you need to halt all agent activity immediately.
|
||||
|
||||
Examples:
|
||||
gt down --polecats # Stop all polecats (preferred)
|
||||
gt stop --all # Kill ALL sessions across all rigs
|
||||
gt stop --rig wyvern # Kill all sessions in the wyvern rig
|
||||
gt stop --all --graceful # Try graceful shutdown first`,
|
||||
@@ -55,6 +59,10 @@ type StopResult struct {
|
||||
}
|
||||
|
||||
func runStop(cmd *cobra.Command, args []string) error {
|
||||
// Print deprecation warning
|
||||
fmt.Printf("%s 'gt stop' is deprecated. Use 'gt down --polecats' instead.\n\n",
|
||||
style.Warning.Render("Warning:"))
|
||||
|
||||
if !stopAll && stopRig == "" {
|
||||
return fmt.Errorf("must specify --all or --rig <name>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user