Skip to main content

Dialog

When something fails, sysg answers like a compiler: what happened, the evidence it captured while it happened, and the exact next commands to run. Every user-facing failure is a structured diagnostic with a stable error code.
SG0104

Anatomy

Every diagnostic has the same shape:

Colors

On a terminal, diagnostics are colored: red for errors, yellow for warnings, cyan for notes and locations, green for the help section, bold for runnable commands, and underlined blue for docs links. Piped or redirected output is plain text with no escape codes, and NO_COLOR is respected.
gamecast — zsh
➜  gamecast sysg start -c sysg.api.yaml —daemonizeerror[SG0104]: service gamecast_api failed to become healthysysg logs -s gamecast_api -p gamecast-api-devsysg status -p gamecast-api-devhttps://sysg.dev/how-it-works/dialog/codes#sg0104
This is the real SG0104 renderer output — the same bytes diag.rs writes to a tty, shown here with its colors.

Error codes

Every diagnostic carries a stable SGXXXX code you can search, script against, or look up. The full list, with a description of each, lives on the Codes page — every code has its own anchor (e.g. SG0104) that the diagnostic’s docs link points at.

Where evidence comes from

sysg already captures every service’s stdout and stderr (see Logs). Diagnostics quote the last lines of that capture at the moment of failure, so the reason a service died — a bad database password, a port conflict, a missing binary — arrives inside the error itself instead of behind a sysg logs round-trip.