Back to blog
Product
March 20, 20263 min

HostStack CLI: Deploy from Your Terminal

By Michael

Today we are releasing @hoststack/cli — a full-featured command-line tool for managing your HostStack infrastructure without leaving the terminal.

Install

npm install -g @hoststack/cli

Deploy in one command

bash
$ hoststack login --key hs_live_...
✓ Authenticated

$ hoststack deploy trigger svc_abc123
✓ Build complete (14s)
✓ Container healthy
✓ Deployed to https://my-app.hoststack.dev

Stream logs

Watch build and runtime logs in real-time:

bash
$ hoststack logs svc_abc123 --lines 50
[12:04:01] GET /api/health 200 2ms
[12:04:03] GET /api/users 200 18ms

Connect to databases

Open psql or redis-cli with credentials pre-filled:

bash
$ hoststack db connect db_abc123

Infrastructure as code

Define your entire stack in a hoststack.yaml file and validate it locally:

bash
$ hoststack init
✓ Created hoststack.yaml

$ hoststack validate
✓ Configuration valid

View the full command reference in our CLI documentation.