CLI Reference
This page covers the two operator-facing CLIs: sie-server (Python) and sie-gateway (Rust). The sie-config and sie-mcp packages ship their own console scripts, and the Rust sie-server-sidecar runs inside worker pods. sie-server uses typer for argument parsing; sie-gateway is a Rust binary using clap.
sie-server
Section titled “sie-server”The inference server. Start with sie-server serve.
sie-server serve [OPTIONS]Start the SIE inference server.
| Option | Default | Description |
|---|---|---|
--port, -p | 8080 | Port to listen on |
--host | 0.0.0.0 | Host to bind to |
--device, -d | auto | Device for inference: auto (detect GPU), cuda, mps, cpu |
--models-dir | The packaged models directory | Models config directory (local path, s3://, gs://, abfs://, or abfss://) |
--bundle, -b | None | Bundle name to load from bundles/ dir (e.g., default) |
--models, -m | None | Comma-separated model names to load (mutually exclusive with --bundle) |
--preload | None | Comma-separated model names to load eagerly at startup |
--local-cache | HF_HOME | Local cache directory for model weights |
--cluster-cache | None | Cluster cache URL for model weights (s3://, gs://, abfs://, or abfss://) |
--hf-fallback/--no-hf-fallback | true | Allow or block HuggingFace Hub downloads after cache miss |
--instrumentation, -i | false | Enable batch instrumentation logging |
--reload | false | Enable auto-reload for development (uses uvicorn reload) |
--tracing | false | Enable OpenTelemetry tracing (exports to localhost:4317) |
--log-level, -l | info | Log level (DEBUG, INFO, WARNING, ERROR); env var SIE_LOG_LEVEL |
--verbose, -v | false | Enable verbose logging |
--json-logs | false | Enable structured JSON logging (for Loki compatibility) |
Examples:
# Start with defaults (auto-detect GPU, port 8080)sie-server serve
# Specific port and devicesie-server serve --port 8081 --device cuda
# Load specific bundlesie-server serve --bundle default
# Load specific models onlysie-server serve --models BAAI/bge-m3,BAAI/bge-reranker-v2-m3
# Use cloud model configssie-server serve --models-dir s3://my-bucket/sie-models/
# Development mode with auto-reloadsie-server serve --reload --verboseresolve-deps
Section titled “resolve-deps”sie-server resolve-deps [OPTIONS]Resolve and print dependencies for a bundle or model list. Used by deployment scripts.
| Option | Description |
|---|---|
--bundle, -b | Bundle name to resolve deps for |
--models, -m | Comma-separated model names |
--models-dir | Models directory |
--cpu | Exclude CUDA-only dependencies (e.g., flash-attn) for CPU-only images |
--json | Output as JSON |
openapi
Section titled “openapi”sie-server openapi [--output PATH] [--indent N]Export the published OpenAPI spec as JSON. Writes to stdout by default; --output/-o writes to a file.
sie-gateway
Section titled “sie-gateway”Stateless Rust request gateway for elastic cloud deployments.
sie-gateway serve [OPTIONS]Start the SIE Gateway server.
| Option | Default | Description |
|---|---|---|
--port, -p | 8080 | Port to listen on |
--host | 0.0.0.0 | Host to bind to |
--worker, -w | None | Local diagnostic worker URLs for ws health checks |
--kubernetes | false | Local diagnostic Kubernetes endpoint discovery for ws health checks |
--k8s-namespace | default | Namespace used by local diagnostic discovery |
--k8s-service | sie-worker | Service name used by local diagnostic discovery |
--k8s-port | 8080 | Worker port used by local diagnostic discovery |
--log-level, -l | info | Log level: debug, info, warning, error |
--json-logs | false | Enable structured JSON logging (for Loki compatibility) |
--health-mode | ws raw CLI, nats via Helm | Gateway health source (nats for SIE server sidecar heartbeats, ws for local WebSocket health) |
--bundles-dir | None | Optional filesystem seed for bundle configs |
--models-dir | None | Optional filesystem seed for model configs |
The Helm chart renders NATS health for the SIE server sidecar path. ws mode and static worker URLs are local diagnostics for the Python /ws/status stream.
Examples:
# Production health source, normally rendered by Helmsie-gateway serve --health-mode nats
# Local WebSocket health diagnosticsie-gateway serve -w http://localhost:8080 --health-mode wsopenapi
Section titled “openapi”sie-gateway openapi [-o PATH]Export the gateway OpenAPI spec as JSON. Writes to stdout by default; -o/--output writes to a file.
version
Section titled “version”sie-gateway versionShow version information.
Environment Variables
Section titled “Environment Variables”Many CLI options can be set via environment variables. CLI arguments override environment variables, which override defaults.
Server (sie-server):
| Variable | CLI Equivalent | Description |
|---|---|---|
SIE_DEVICE | --device | Inference device (cuda, mps, cpu) |
SIE_MODELS_DIR | --models-dir | Models config directory |
SIE_MODEL_FILTER | --models | Comma-separated model names to load |
SIE_LOCAL_CACHE | --local-cache | Local cache directory for weights |
SIE_CLUSTER_CACHE | --cluster-cache | Cluster cache URL (s3://, gs://, abfs://, or abfss://) |
SIE_HF_FALLBACK | --hf-fallback | Allow HF Hub downloads after cache miss (true/false) |
SIE_LOG_LEVEL | --log-level | Log level (DEBUG, INFO, WARNING, ERROR) |
SIE_LOG_JSON | --json-logs | Enable JSON logging (true/false) |
SIE_TRACING_ENABLED | --tracing | Enable OpenTelemetry tracing |
SIE_GPU_TYPE | - | Override detected GPU type |
SIE_MEMORY_PRESSURE_THRESHOLD_PERCENT | - | GPU memory pressure threshold (50-99) |
SIE_IMAGE_WORKERS | - | Image preprocessing worker count (default: 4) |
SIE_INSTRUMENTATION | - | Enable detailed instrumentation |
Gateway (sie-gateway):
| Variable | CLI Equivalent | Description |
|---|---|---|
SIE_GATEWAY_WORKERS | --worker | Local diagnostic worker URLs for ws health checks |
SIE_GATEWAY_KUBERNETES | --kubernetes | Enable local diagnostic K8s discovery (true/false) |
SIE_GATEWAY_K8S_NAMESPACE | --k8s-namespace | K8s namespace for local diagnostic discovery |
SIE_GATEWAY_K8S_SERVICE | --k8s-service | K8s service name for local diagnostic discovery |
SIE_GATEWAY_K8S_PORT | --k8s-port | Worker port for local diagnostic discovery |
SIE_GATEWAY_HEALTH_MODE | --health-mode | Gateway health source (nats for the Helm SIE server sidecar path, ws for local WebSocket runs) |
SIE_NATS_URL | - | NATS URL for queued inference, SIE server sidecar health, result inboxes, and config deltas |
SIE_GATEWAY_ENABLE_POOLS | - | Enable resource pools (true/false) |
SIE_GATEWAY_CONFIGURED_GPUS | - | Comma-separated configured GPU types |
SIE_CONFIG_SERVICE_URL | - | Config service URL for bootstrap and drift polling |
SIE_LOG_JSON | --json-logs | Enable JSON logging |
See Configuration for the complete list.