mail-api-cli

command module
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Hostinger Mail API CLI

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.

Installation

Homebrew (macOS & Linux)
brew install hostinger/tap/hostinger-mail

Upgrade with brew upgrade hostinger-mail. Shell tab-completion (bash/zsh/fish) and man pages (man hostinger-mail) are installed automatically.

Binary download

Download the binary for your platform from the releases page. Then enable tab-completion with hostinger-mail completion install (see AUTOCOMPLETE.md).

Configuration

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 prompt

Usage

hostinger-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.

Output
  • 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 with hostinger-mail config set format json.
  • --jq '<expr>' filters the JSON response (strings print raw), e.g. --jq '.[].id'.
  • List commands with pages take --all to fetch every page.
Prompts and safety
  • In a terminal, missing arguments and required flags are asked for, with choices listed where they are known. --no-input (or no_input: true) turns prompting off.
  • Commands that delete, stop, restore or purchase ask for confirmation. Pass --yes to skip it; non-interactive runs (scripts, CI) must pass --yes.
  • --dry-run prints the request as a curl command instead of sending it.
  • Commands that start an asynchronous action take --wait to block until it finishes.
  • --verbose prints each HTTP request and its status to stderr.
Exit codes
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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
cmd
Package site resolves the website a command acts on and remembers it per directory, like `vercel link`.
Package site resolves the website a command acts on and remembers it per directory, like `vercel link`.
tools
gendocs command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL