Skip to content

Shared DX + AX Contract

All 18 CLIs in the Keel Data Stack follow the same operational contract so both human operators (DX) and AI coding/data agents (AX) move seamlessly across tools without re-learning conventions.

1. Dual-Mode Output (--format auto|human|agent|json)

Section titled “1. Dual-Mode Output (--format auto|human|agent|json)”
  • auto (default): renders readable colorized tables when connected to an interactive TTY, and switches automatically to clean, zero-ANSI structured output when piped or called by an agent.
  • human: rich terminal formatting and progress summaries.
  • agent: token-budgeted structured output designed to fit cleanly inside LLM context windows without noisy ASCII borders.
  • json: deterministic machine-readable JSON envelopes for scripts and CI checks.
  • stdout emits pure data payloads only.
  • stderr carries progress indicators and file-write notices only.

Piping <tool> ... --format json | jq ... never breaks on stray log lines.

Failures emit stable error codes (E_*), concise failure counts, bounded sample rows (never dumping millions of rows into an agent’s context), a concrete fix_hint, and a retryable boolean flag.

Keel tools never hang on [y/N] prompts in CI or headless agent shells. Destructive or target-changing operations use explicit flags and dry-run plan commands.

Exit Code Meaning
0 Pass / clean check / migration verified
1 Data quality, SQL audit, contract, or drift check failure
2 I/O, connection, parse, CLI usage, or config error

Because docs drift from installed versions, every binary embeds its own SKILL.md so an agent always learns the exact behavior of the binary on $PATH.