Hostinger API CLI
hapi is the command line interface for the Hostinger API.
This repository is generated. Do not open pull requests here — every file
is overwritten by the next generation run. The CLI is generated from the
OpenAPI specification by
hostinger/public-api-generator
(see the cli/ directory there). Report issues or contribute in that repository.
Installation
Homebrew (macOS & Linux)
brew install hostinger/tap/hapi
Upgrade with brew upgrade hapi. Shell tab-completion (bash/zsh/fish) is installed
automatically.
Binary download
Download the binary for your platform from the
releases page.
Configuration
Create $HOME/.hapi.yaml:
api_token: <your API token>
or set the HAPI_API_TOKEN environment variable. Generate a token at
hPanel → API.
Usage
hapi <group> <subgroup> <verb> [args] [flags]
Examples:
hapi billing catalog list
hapi vps virtual-machines list
hapi vps vm start 123 # vm is an alias for virtual-machines
hapi dns records list example.com
Output format defaults to a table; use --format json|table|tree to change it.
Command documentation lives in docs/, and manifest.json maps every
API operation to its command. Shell autocompletion: see
AUTOCOMPLETE.md.