| 64 | } |
| 65 | |
| 66 | func newNodesListCmd() *cobra.Command { |
| 67 | return &cobra.Command{ |
| 68 | Use: "list", |
| 69 | Short: "List all cluster nodes", |
| 70 | Long: "List all Proxmox nodes in the cluster with their status and resource usage.", |
| 71 | Example: ` # JSON output (default) |
| 72 | pvetui nodes list |
| 73 | |
| 74 | # Human-readable table |
| 75 | pvetui nodes list --output table |
| 76 | |
| 77 | # Use a specific profile |
| 78 | pvetui --profile prod nodes list`, |
| 79 | RunE: runNodesList, |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | func runNodesList(cmd *cobra.Command, _ []string) error { |
| 84 | session, err := initCLISession(cmd) |