Feature Description
Please add a CLI command for the VPS purchase endpoint:
POST /api/vps/v1/virtual-machines
The OpenAPI operation is VPS_purchaseNewVirtualMachineV1, and the generated Go client already contains VPSPurchaseNewVirtualMachineV1.
Problem Statement
The CLI can list, inspect, start, stop, recreate, and modify virtual machines, but it does not appear to expose a command for purchasing a new VPS.
This creates an awkward gap for automation and agentic workflows:
- Use the CLI to discover templates and data centers.
- Use manual/dashboard or custom API code to purchase a VPS.
- Return to the CLI for list/status/stop operations.
For automated lifecycle flows, purchase should be available through the same official CLI surface.
Proposed Solution
Add a command similar to:
hapi vps vm purchase \
--item-id hostingercom-vps-kvm2-usd-1m \
--template-id 1130 \
--data-center-id 19 \
--hostname example-agent-runner \
--public-key-name example-agent-key \
--public-key "ssh-ed25519 AAAA..." \
--enable-backups=false \
--format json
Optional flags could include:
--payment-method-id
--coupon
--password
--post-install-script-id
--install-monarx
--ns1
--ns2
Use Cases
- Create short-lived VPS instances from scripts.
- Run repeatable integration and smoke tests against newly provisioned infrastructure.
- Build agentic workflows that can provision, inspect, use, and stop VPSs without switching to the dashboard.
- Capture the returned
order.id, order.subscription_id, and virtual_machine.id in JSON for later cleanup and billing reconciliation.
Additional Context
The API purchase response schema already returns a Billing.V1.Order.VirtualMachineOrderResource containing both order and virtual_machine, which is a good shape for automation. Exposing this through the CLI would make the official tool much more complete.
Are you willing to contribute?
Feature Description
Please add a CLI command for the VPS purchase endpoint:
The OpenAPI operation is
VPS_purchaseNewVirtualMachineV1, and the generated Go client already containsVPSPurchaseNewVirtualMachineV1.Problem Statement
The CLI can list, inspect, start, stop, recreate, and modify virtual machines, but it does not appear to expose a command for purchasing a new VPS.
This creates an awkward gap for automation and agentic workflows:
For automated lifecycle flows, purchase should be available through the same official CLI surface.
Proposed Solution
Add a command similar to:
hapi vps vm purchase \ --item-id hostingercom-vps-kvm2-usd-1m \ --template-id 1130 \ --data-center-id 19 \ --hostname example-agent-runner \ --public-key-name example-agent-key \ --public-key "ssh-ed25519 AAAA..." \ --enable-backups=false \ --format jsonOptional flags could include:
--payment-method-id--coupon--password--post-install-script-id--install-monarx--ns1--ns2Use Cases
order.id,order.subscription_id, andvirtual_machine.idin JSON for later cleanup and billing reconciliation.Additional Context
The API purchase response schema already returns a
Billing.V1.Order.VirtualMachineOrderResourcecontaining bothorderandvirtual_machine, which is a good shape for automation. Exposing this through the CLI would make the official tool much more complete.Are you willing to contribute?