package cmd import ( "fmt" "os" "git.jnss.me/joakim/opal/internal/engine" "github.com/spf13/cobra" ) var undoCmd = &cobra.Command{ Use: "undo", Short: "Undo the last action", Long: `Undo the most recent mutating action (add, done, delete, modify, start, stop). The undo stack keeps the last 10 operations. Each undo pops one operation. Examples: opal undo`, Run: func(cmd *cobra.Command, args []string) { description, err := engine.PopUndo() if err != nil { fmt.Fprintf(os.Stderr, "Error: %v\n", err) os.Exit(1) } fmt.Println(description) }, }