hostinger-mail is the command line interface for the Hostinger Mail 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.
brew install hostinger/tap/hostinger-mailUpgrade with brew upgrade hostinger-mail. Shell tab-completion (bash/zsh/fish) and man pages
(man hostinger-mail) are installed automatically.
Download the binary for your platform from the
releases page. Then enable tab-completion
with hostinger-mail completion install (see AUTOCOMPLETE.md).
Run hostinger-mail config set api_token (it asks for the token without echoing it) or set the
HOSTINGER_MAIL_API_TOKEN environment variable. Generate a token at hPanel → API.
hostinger-mail auth status shows which credentials are in use. Settings live in
$HOME/.hostinger-mail.yaml (hostinger-mail config list shows them):
api_token: <your API token>
format: json # default output format
no_input: false # true: never prompthostinger-mail <group> <verb> [args] [flags]
Examples:
hostinger-mail account current
hostinger-mail feedback submit <mailbox-resource-id>
hostinger-mail folders list <mailbox-resource-id>
hostinger-mail messages list <mailbox-resource-id> <folder>
Every command's --help lists its required flags separately and shows examples. Flags that take
JSON accept inline JSON, @file.json, or - for stdin; the help shows the expected shape.
- Tables on a terminal, JSON when the output is piped or redirected. Choose explicitly with
-o/--format table|json|yaml|tree, or set a default withhostinger-mail config set format json. --jq '<expr>'filters the JSON response (strings print raw), e.g.--jq '.[].id'.- List commands with pages take
--allto fetch every page.
- In a terminal, missing arguments and required flags are asked for, with choices listed where
they are known.
--no-input(orno_input: true) turns prompting off. - Commands that delete, stop, restore or purchase ask for confirmation. Pass
--yesto skip it; non-interactive runs (scripts, CI) must pass--yes. --dry-runprints the request as acurlcommand instead of sending it.- Commands that start an asynchronous action take
--waitto block until it finishes. --verboseprints each HTTP request and its status to stderr.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | API, network or other error; aborted prompt |
| 2 | Invalid arguments, flags or input |
| 3 | No credentials, or authentication failed (HTTP 401/403) |
| 4 | Not found (HTTP 404) |
| 5 | Validation failed (HTTP 422) |
Command documentation lives in docs/ and in the man pages, and manifest.json maps every
API operation to its command. Shell autocompletion: see AUTOCOMPLETE.md.