← Back to CLIs
Nardjo

hostinger-cli

Manage Hostinger via CLI — vps, dns, domains, hosting, mail, billing, ecommerce, reach, agency-hosting. Use when the user mentions Hostinger, VPS power/restart, DNS records, domains portfolio, hPanel API, hosting websites, or Hostinger mail/billing.

Install

$ npx api2cli install Nardjo/hostinger-cli

Details

Skill type: Wrapper CLI
Auth type: bearer
Version: 0.1.0
Author: Nardjo
Views: 1

README

hostinger-cli

Agent-ready CLI for the Hostinger API. Generated with api2cli.dev from the official OpenAPI spec.

Covers VPS, DNS, domains, hosting (incl. WordPress/PHP/Node/DB), mail, billing, ecommerce, reach, agency-hosting, and horizons — with a JSON envelope ({ ok, data, meta }), retries, and an AgentSkill for Claude Code / Cursor / Hermes / Codex.

Install

npx api2cli install Nardjo/hostinger-cli

Clones the repo, builds the CLI, links it to your PATH, and installs the AgentSkill.

AgentSkill only

npx skills add Nardjo/hostinger-cli

Auth

  1. Create an API token in hPanel → API (developer / API tokens).
  2. Save it:
hostinger-cli auth set "YOUR_HOSTINGER_API_TOKEN"
hostinger-cli auth test

Token is stored at ~/.config/tokens/hostinger-cli.txt (mode 600).

Quickstart

# List VPS instances
hostinger-cli vps get-virtual-machines --json

# VPS details / power
hostinger-cli vps get-virtual-machine-details <virtualMachineId> --json
hostinger-cli vps restart-virtual-machine <virtualMachineId> --json

# DNS
hostinger-cli dns get-dnsrecords example.com --json

# Domains portfolio
hostinger-cli domains get-domain-list --json

# Billing catalog / subscriptions
hostinger-cli billing --help

Complex request bodies: pass flags when available, or merge raw JSON:

hostinger-cli vps create-new-firewall --name "web" --json
hostinger-cli dns update-dnsrecords example.com --json-body '[{"type":"A","name":"@","content":"1.2.3.4","ttl":300}]' --json

Resources

ResourceScope
vpsVirtual machines, firewall, snapshots, backups, docker projects, SSH keys, templates, metrics
dnsZone records, snapshots, validate/reset/restore
domainsPortfolio, WHOIS, forwarding
hostingWebsites, databases, PHP/Node, cron, cache, WordPress plugins/themes/installs
mailMailboxes, forwarders, aliases, autoreplies, webhooks, logs
billingCatalog, subscriptions, payment methods, orders
ecommerceStores, sales channels
reachContacts, segments (email marketing)
agency-hostingAgency orders, websites, domains
horizonsHorizons endpoints
authset, show, remove, test

Run hostinger-cli --help, hostinger-cli <resource> --help, or hostinger-cli <resource> <action> --help for full flags.

Global flags

--json, --format <text|json|csv|yaml>, --verbose, --no-color, --no-header

Exit codes: 0 success, 1 API error, 2 usage error.

Base URL

https://developers.hostinger.com (official OpenAPI server).

License

MIT

Sponsors
hostinger-cli - api2cli | api2cli