Skip to main content
sgl is the open-source node operator CLI. It generates your node’s keys, registers it on the grid, runs inference, manages the background service, and toggles maintenance mode. This is the complete command reference.
Install sgl from the official open-source release (see Node setup). You also need a local inference runtime (llama-server) and a GGUF model file to serve.

Typical first run


Commands

sgl login

Log in via the browser and register this node (recommended — binds the node to the wallet that holds your stake).

sgl init

Initialize the node without the browser flow: generate keys and register directly under a wallet.

sgl attest

Verify attestation — sign the orchestrator’s challenge and submit the hardware attestation proof. Only attestation-verified nodes receive jobs. Run after login/init and after any binary update.

sgl start

Run the node in the foreground: start the local inference server, begin heartbeating, and process jobs.
Use sgl start to test in the foreground; use sgl service install for production so the node survives reboots, logout, crashes, and idle sleep.

sgl status

Show node status, hardware capabilities, and orchestrator connection info.

sgl off-grid

Go off-grid (maintenance): stop receiving new jobs without penalty, for planned downtime. In-flight jobs finish cleanly. Tamper slashing is unaffected — off-grid only pauses job routing, it can’t dodge a tamper penalty.

sgl on-grid

Come back on-grid: resume receiving jobs.

sgl price

View or set your per-token price. By default your node bills the platform suggested rate (and you keep 80%); you may optionally set your own price within an allowed band — floor = suggested × 0.5, ceiling = suggested × 5. Prices are USD per 1M tokens, split into input (prompt) and output (completion). A model with no custom price simply bills at the suggested rate.
The server enforces the band and a short cooldown between changes. You can also manage prices from the operator dashboard, and callers compare nodes at GET /v1/providers?model=….

sgl service — background service

Runs the node as a managed OS service (launchd on macOS / systemd on Linux) so it keeps serving across reboots, logout, crashes, and idle sleep.

sgl service install

Install and start the background service.

sgl service stop

Stop and remove the background service.

sgl service status

Show whether the service is installed and running.

Maintenance workflow

After updating the node binary, re-run sgl attest so the network re-verifies your enclave. See Node setup and Earnings.