Skip to content

Commit caff943

Browse files
sjmiller609claude
andcommitted
Add singular/plural aliases to resource commands
Allow both singular and plural forms for all resource commands (e.g. "hypeman images" works as alias for "hypeman image"). Subcommands inherit the alias automatically via urfave/cli. Commands updated: - image/images - volume/volumes - snapshot/snapshots - device/devices - ingress/ingresses - build/builds - resources/resource Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 27fc6d2 commit caff943

7 files changed

Lines changed: 19 additions & 12 deletions

File tree

pkg/cmd/build.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818

1919
var buildCmd = cli.Command{
2020
Name: "build",
21+
Aliases: []string{"builds"},
2122
Usage: "Build an image from a Dockerfile",
2223
ArgsUsage: "[path]",
2324
Description: `Build an image from a Dockerfile and source context.

pkg/cmd/devicecmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ import (
1212
)
1313

1414
var deviceCmd = cli.Command{
15-
Name: "device",
16-
Usage: "Manage PCI/GPU devices for passthrough",
15+
Name: "device",
16+
Aliases: []string{"devices"},
17+
Usage: "Manage PCI/GPU devices for passthrough",
1718
Description: `Manage PCI devices for passthrough to virtual machines.
1819
1920
This command allows you to discover available passthrough-capable devices,

pkg/cmd/imagecmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import (
1313
)
1414

1515
var imageCmd = cli.Command{
16-
Name: "image",
17-
Usage: "Manage images",
16+
Name: "image",
17+
Aliases: []string{"images"},
18+
Usage: "Manage images",
1819
Commands: []*cli.Command{
1920
&imageCreateCmd,
2021
&imageListCmd,

pkg/cmd/ingresscmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import (
1313
)
1414

1515
var ingressCmd = cli.Command{
16-
Name: "ingress",
17-
Usage: "Manage ingresses",
16+
Name: "ingress",
17+
Aliases: []string{"ingresses"},
18+
Usage: "Manage ingresses",
1819
Commands: []*cli.Command{
1920
&ingressCreateCmd,
2021
&ingressListCmd,

pkg/cmd/resourcecmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ import (
1515
)
1616

1717
var resourcesCmd = cli.Command{
18-
Name: "resources",
19-
Usage: "Show server resource capacity and allocation status",
18+
Name: "resources",
19+
Aliases: []string{"resource"},
20+
Usage: "Show server resource capacity and allocation status",
2021
Description: `Display current host resource capacity, allocation status, and per-instance breakdown.
2122
2223
Resources include CPU, memory, disk, network, and GPU (if available).

pkg/cmd/snapshotcmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ import (
1414
)
1515

1616
var snapshotCmd = cli.Command{
17-
Name: "snapshot",
18-
Usage: "Manage instance snapshots",
17+
Name: "snapshot",
18+
Aliases: []string{"snapshots"},
19+
Usage: "Manage instance snapshots",
1920
Commands: []*cli.Command{
2021
&snapshotCreateCmd,
2122
&snapshotRestoreCmd,

pkg/cmd/volumecmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ import (
1212
)
1313

1414
var volumeCmd = cli.Command{
15-
Name: "volume",
16-
Usage: "Manage volumes",
15+
Name: "volume",
16+
Aliases: []string{"volumes"},
17+
Usage: "Manage volumes",
1718
Commands: []*cli.Command{
1819
&volumeCreateCmd,
1920
&volumeListCmd,

0 commit comments

Comments
 (0)