H
Hostess
CLI Commands

hostess services

List services in a deployment and stream service logs.

Description

View and monitor services within a deployment. The services command group lets you list all services with their status and URLs, and stream real-time logs from any running service.

Aliases

AliasFull Command
hostess pshostess services list
hostess logshostess services logs
hostess services lshostess services list

services list

List all services in the latest deployment for a project, showing their type, status, ports, and URLs.

Usage

Terminal
hostess services list [flags]

Flags

FlagShortTypeDefaultDescription
--project-pstringFrom hostess.ymlProject name
--env-estringLatest deployment if omittedSelect the latest deployment in an environment
--detailedboolfalseShow detailed per-service view with port visibility

Examples

Terminal
# List services
hostess services list
SERVICE          TYPE       STATUS     PORTS     URL
────────────────────────────────────────────────────────────────────────────────
frontend         nextjs     Running    3000      https://my-app-frontend-k7xm9p2q.hostess.run
api              fastapi    Running    8000      https://my-app-api-a3x9d2m1.hostess.run
database         postgres   Running    5432      hostess connect database
cache            redis      Running    6379      hostess connect cache
Terminal
# Using the alias
hostess ps

# Using the nested alias
hostess services ls

# Detailed view with port visibility info
hostess ps --detailed
SERVICE: frontend
  Type:     nextjs
  Status:   Running

  Ports:
    PORT     VISIBILITY   URL
    3000     public       https://my-app-frontend-k7xm9p2q.hostess.run

SERVICE: api
  Type:     fastapi
  Status:   Running

  Ports:
    PORT     VISIBILITY   URL
    8000     public       https://my-app-api-a3x9d2m1.hostess.run

SERVICE: database
  Type:     postgres
  Status:   Running

  Access: hostess connect database

SERVICE: cache
  Type:     redis
  Status:   Running

  Access: hostess connect cache
Terminal
# List services for a specific environment
hostess ps --env staging

services logs

Stream logs from a running service in real time.

Usage

Terminal
hostess services logs <service> [flags]

Flags

FlagShortTypeDefaultDescription
--project-pstringFrom hostess.ymlProject name
--env-estringLatest deployment if omittedSelect the latest deployment in an environment
--follow-fboolfalseStream logs in real-time (like tail -f)
--tail-nint100Number of recent lines to show
--sincestringShow logs since a duration ago (e.g., 5m, 1h, 2d)
--timestampsboolfalseShow timestamps with each log line

Examples

Terminal
# View recent logs from the API service
hostess services logs api
Streaming logs for api...

[2025-03-27 14:23:01] INFO:     Application startup complete.
[2025-03-27 14:23:01] INFO:     Uvicorn running on http://0.0.0.0:8000
[2025-03-27 14:23:05] INFO:     192.168.1.1 - "GET /health HTTP/1.1" 200
[2025-03-27 14:23:12] INFO:     192.168.1.1 - "GET /api/users HTTP/1.1" 200
Terminal
# Using the alias — stream in real-time
hostess logs api --follow

# Show last 50 lines
hostess logs api --tail 50

# Show logs from the last hour
hostess logs api --since 1h

# Combine options
hostess logs api --follow --tail 20 --since 30m

# Show timestamps
hostess logs api --timestamps

# Logs from a specific environment
hostess logs api --env staging --follow

Duration Syntax for --since

The --since flag accepts simple duration strings:

SuffixMeaningExample
sSeconds30s
mMinutes5m
hHours1h
dDays2d

Press Ctrl+C to stop streaming logs when using --follow.