@fredlackey/cli-hostinger
v0.0.3
Published
AI-first CLI for Hostinger VPS, DNS, and domain management
Maintainers
Readme
@fredlackey/cli-hostinger
Command-line interface for Hostinger VPS, DNS, domain, firewall, and SSH key management. JSON output by default so AI agents and scripts can consume it directly, with a human-friendly mode when you're working interactively.
Install
npm install -g @fredlackey/cli-hostingerUsage
Every command accepts credentials directly as flags. No setup step is required.
hostinger vps list --api-token <token>
hostinger dns list --domain example.com --api-token <token>
hostinger firewall add-rule \
--api-token <token> \
--id <firewall-id> \
--protocol tcp \
--port 443 \
--source anyIf you've already run hostinger configure, you can omit the credential flags:
hostinger vps list
hostinger vps restart --id <vm-id>
hostinger key create --name deploy --key @~/.ssh/id_ed25519.pubConfigure (Optional)
The configure command is optional. Every command accepts credentials directly as flags (e.g. --api-token). You never need to run configure to use this tool. It exists as a convenience so you don't have to pass the same flags on every invocation.
hostinger configure --api-token <token>Running hostinger configure without flags prompts for the token interactively. Credentials are stored in ~/.config/cli-hostinger/config.json and that file is the only config source. There are no environment variables to set.
Create a token at Hostinger > Profile > API Tokens.
If a required credential is missing at runtime, the error tells you exactly what to do:
{
"error": "Missing required value: --api-token. Pass it as a flag or run \"hostinger configure\"."
}Full Command Reference
For the complete list of commands and flags, see COMMANDS.md.
Output
All commands write JSON to stdout by default. When run in an interactive terminal, output switches to a human-friendly format with colors. Use the global --json and --interactive flags to override the auto-detection.
Contributing
If you find a gap or have a feature request, open an issue or submit a pull request on GitHub.
Questions?
If you have questions, comments, or just want to talk shop, feel free to reach out.
Fred Lackey
[email protected]
https://fredlackey.com
License
Apache-2.0
