Bug Description
hapi vps public-keys attach <virtual machine ID> appears to require a list of public key IDs, but the generated command does not expose an --ids flag on the attach subcommand.
The --ids flag appears under hapi vps public-keys create --help instead, even though public-key creation should only require --name and --key.
This makes the attach workflow hard to use from scripts and agentic tooling, because the command help does not expose the required machine-readable input.
Steps to Reproduce
- Clone
https://github.com/hostinger/api-cli.
- Run:
go run . vps public-keys attach --help
- Run:
go run . vps public-keys create --help
Expected Behavior
hapi vps public-keys attach --help should show the required --ids flag:
hapi vps public-keys attach <virtual machine ID> --ids <public-key-id>
hapi vps public-keys create --help should only show creation fields such as --name and --key.
Actual Behavior
attach --help shows no --ids flag:
Usage:
hapi vps public-keys attach <virtual machine ID> [flags]
Flags:
-h, --help help for attach
create --help shows --ids, where it does not belong:
Usage:
hapi vps public-keys create [flags]
Flags:
--ids stringArray Public key ID list
--key string Public key content
--name string Public key name
Likely Cause
In cmd/vps/public_keys/attach.go, the attach command appears to register the flag on CreateCmd instead of AttachCmd:
CreateCmd.Flags().StringArrayP("ids", "", []string{}, "Public key ID list")
CreateCmd.MarkFlagRequired("ids")
Additional Context
This is especially noticeable for automation and agentic workflows that rely on CLI help, shell completion, and stable flags to discover and compose commands safely.
Bug Description
hapi vps public-keys attach <virtual machine ID>appears to require a list of public key IDs, but the generated command does not expose an--idsflag on theattachsubcommand.The
--idsflag appears underhapi vps public-keys create --helpinstead, even though public-key creation should only require--nameand--key.This makes the attach workflow hard to use from scripts and agentic tooling, because the command help does not expose the required machine-readable input.
Steps to Reproduce
https://github.com/hostinger/api-cli.go run . vps public-keys attach --helpgo run . vps public-keys create --helpExpected Behavior
hapi vps public-keys attach --helpshould show the required--idsflag:hapi vps public-keys create --helpshould only show creation fields such as--nameand--key.Actual Behavior
attach --helpshows no--idsflag:create --helpshows--ids, where it does not belong:Likely Cause
In
cmd/vps/public_keys/attach.go, the attach command appears to register the flag onCreateCmdinstead ofAttachCmd:Additional Context
This is especially noticeable for automation and agentic workflows that rely on CLI help, shell completion, and stable flags to discover and compose commands safely.