For the complete documentation index, see llms.txt. This page is also available as Markdown.

Hostinger CLI

Install and use the hostinger command-line client — Homebrew and binary downloads, browser sign-in or API token authentication, command structure, and output formats.

hostinger is the official command-line client for the Hostinger API. It's generated from the same OpenAPI specification as the API reference, so it tracks the API as endpoints are added.

Install

On macOS and Linux, install with Homebrew:

brew install hostinger/tap/hostinger

Upgrade later with brew upgrade hostinger.

On Windows, or without Homebrew, download the archive for your platform from the releases page and put the hostinger binary on your PATH. Each archive also bundles the shell completion files.

Confirm the install:

hostinger version

Authenticate

You don't need to generate a token first. Run any command without one and the CLI opens a browser sign-in, then caches and refreshes those credentials for you.

To authenticate with a token instead — in CI, for example — set HOSTINGER_API_TOKEN, or add api_token to $HOME/.hostinger.yaml:

api_token: <your API token>

Generate tokens in hPanel → API. See Security & Access for how tokens are managed.

Note: A configured token takes precedence over browser sign-in. If commands suddenly fail to authorize, check for a stale api_token in your config file or environment before anything else.

Run commands

Commands follow the pattern hostinger <group> <subgroup> <verb>:

Add --help at any level to see what a group or subgroup contains:

Shell completion is available for bash, zsh, fish, and PowerShell — Homebrew installs the bash, zsh, and fish ones for you. To set them up manually, see AUTOCOMPLETE.md in the CLI repository.

What you can manage

The CLI covers the whole Public API, grouped by product area. Use this to find the right group, then --help your way down to the verb.

Group
What it covers

hosting

Websites and the hosting environment — databases, PHP versions and extensions, cron jobs, cache, subdomains, and Node.js builds.

vps

Virtual machines and everything around them — power actions, backups and snapshots, firewall, Docker, SSH keys, recovery mode, PTR records, OS templates, malware scanning.

mail

Mailboxes, forwarders, aliases, auto-replies, catch-alls, access logs, and webhooks.

wordpress

Installations, plugins, themes, one-click login links, maintenance mode, LiteSpeed and object caching, and AI tools.

domains

Availability checks, registration, transfers, forwarding, WHOIS contact profiles, and ownership verification.

dns

Zone records and zone snapshots, including validation and restore.

agency-hosting

Agency plan websites and their per-site resources — provisioning, databases, cron jobs, cache, files, Node.js builds, and WordPress.

ecommerce

Stores, physical and digital products, payment methods, shipping, and sales channels.

reach

Email marketing — contacts, segments, and sending profiles.

billing

Catalog lookups, purchase orders, payment methods, subscriptions, and auto-renewal.

horizons

Hostinger Horizons websites.

Output formats

Results print as a table by default. Use --format json to pipe them into other tools, or --format tree to see nested data as a tree:

For exit codes, passing JSON to flags, and the commands worth being careful with, see Scripting with the CLI.

Full command reference

Every command is documented in the CLI repository. Start from the command index, which links through to each group and on to the individual verbs.


Last updated: August 5, 2026

Last updated

Was this helpful?