v0.2.0 Β· pure Node 18+

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 login

Authenticate with an API token. Stored in ~/.hostking/config.json.

hostking init my-site

Create a new site on the platform. Returns site_id + port.

hostking deploy ./app.zip

Upload a zip and trigger a build. Streams deploy logs.

hostking sites:list

List 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> --follow

Tail the systemd journal for a site. Ctrl-C to stop.

hostking keys:list

List your API tokens, with last_used_at timestamps.

hostking whoami

Print the email + org(s) associated with the current token.

hostking usage

Show current usage vs plan limits (sites, seats, deploys, storage).

hostking health

Public 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

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