hostking β the CLI
Deploy sites from the terminal. One install, twenty commands, zero clicks. The fastest path between git push and HTTP 200.
Quickstart
# 1. Install β one line, no npm needed $ curl -fsSL https://www.hostkingpro.com/install.sh | sh # 2. Mint an API token at /dashboard/api-keys, then: $ export HOSTKING_API_TOKEN=hk_live_VUiijozz_BdfkA8F60weqzK3eLESF1Ap # 3. Verify it works $ hostking whoami β token valid, 1 org(s) accessible: Β· Hostking Pro (owner) 00000000-0000-0000-0000-000000000001 # 4. Create + deploy in two commands $ hostking init my-app --org 00000000-0000-0000-0000-000000000001 β created site "my-app" id=b2222222-2222-2222-2222-222222222222 port=18302 $ hostking deploy ./app.zip b2222222-2222-2222-2222-222222222222 β uploaded 12.4 KB queueing buildβ¦ buildingβ¦ ready in 8s β https://b2222222.hostkingpro.com β HTTP 200
All commands
hostking loginAuthenticate with an API token. Stored in ~/.hostking/config.json.
hostking init my-siteCreate a new site on the platform. Returns site_id + port.
hostking deploy ./app.zipUpload a zip and trigger a build. Streams deploy logs.
hostking sites:listList every site in your org with status + port + domain.
hostking site:metrics <id>Live memory and CPU for a site (from cgroup v2).
hostking site:logs <id> --followTail the systemd journal for a site. Ctrl-C to stop.
hostking keys:listList your API tokens, with last_used_at timestamps.
hostking whoamiPrint the email + org(s) associated with the current token.
hostking usageShow current usage vs plan limits (sites, seats, deploys, storage).
hostking healthPublic liveness check. Used by CI smoke tests.
And more: hostking site:restart, hostking site:stop, hostking site:start, hostking site:redeploy, hostking site:get, hostking deploys:list, hostking deploys:logs, hostking ready, hostking completion bash
vs the alternatives
| Feature | hostking | Generic CLIs |
|---|---|---|
| One-line install | β curl | sh | β manual npm install |
| Tailored to Hostking Pro | β yes | β generic |
| --json output for scripting | β all commands | β no |
| Built-in tab completion | β bash + zsh | β no |
| Streaming deploy logs | β --follow | β poll-only |
| Zero dependencies | β pure Node 18+ | β needs C++ toolchain |
Script-friendly output
Every command supports --json (or HOSTKING_OUTPUT=json) so you can pipe into jq without parsing colored output.
# Get the site id of a site named "api-prod"
$ hostking --json sites:list | jq -r '.[] | select(.name == "api-prod") | .id'
b2222222-2222-2222-2222-222222222222
# Tail the deploy logs of every site
$ hostking --json sites:list | jq -r '.[].id' | xargs -I {} hostking site:logs {}
# Daily usage report
$ hostking --json usage | jq '{sites: .sites.used, deploys_30d: .deploys_30d}'
{
"sites": 12,
"deploys_30d": 142
}Ready?
Install the CLI, mint a token, deploy your first site in under a minute.