Skip to content

CLI Reference

Global flags

These flags are available on all commands:

--config string      Config file path
--state-dir string   State directory path
--socket-path string gRPC unix socket path
--interval duration  Reconciliation interval
--api-addr string    API gateway gRPC address
--log-level string   Log level (debug, info, warn, error)
--log-format string  Log format (json, text)

segla run

Start the agent daemon. This is the main command used in production.

segla run --config /etc/segla/config.yaml

The agent will:

  1. Load or create local state
  2. Register with the platform (if not already registered)
  3. Start the reconcile loop
  4. Listen on the unix socket for local CLI commands

segla status

Show the current agent status.

segla status

Connects to the running agent via the unix socket and displays registration state, last reconcile time, and resource status.


segla state

Inspect the local bbolt state database.

segla state

Useful for debugging — shows the raw persisted state including agent ID, resource data, and last applied desired state.


segla inventory

Display machine inventory information.

segla inventory

Shows the hardware and OS information that the agent reports to the platform during registration.


segla version

Print the agent version, commit hash, and build date.

segla version

Example output:

segla version v0.1.0 (commit: abc1234, built: 2025-01-15T10:30:00Z)