dotbabel

ADR-0014 — CLI ✓/✗/⚠ output format

Status: Accepted (2026-04-14)

Context

The original validate-settings.sh prefixed each line with a colored glyph — (green) for pass, (red) for fail, (yellow) for warn. Readable, grep-friendly, widely copied across projects.

When 0.2.0 added Node bins, the question was whether to keep this format or switch to a structured logger (pino, winston, bunyan). The bins had to work well interactively (humans reading terminal output) and in CI (machine consumers, usually jq).

Decision

Keep the gold-standard format. Every bin + every shell script uses the same ✓/✗/⚠ prefix, factored into two helpers that stay byte-compatible:

--json is the machine mode. In that mode, the ✓/✗/⚠ lines are replaced with a single JSON envelope:

{
  "events": [
    { "kind": "fail", "message": "...", "details": { "code": "...", ... } }
  ],
  "counts": { "pass": 0, "fail": 1, "warn": 0 }
}

--no-color (or NO_COLOR= env) suppresses ANSI. TTY detection falls back to no-color automatically when stdout isn’t a TTY.

Consequences

Alternatives considered

Revisit triggers