-
Notifications
You must be signed in to change notification settings - Fork 9
Enhancement: add --output flag for text vs JSON output mode #140
Copy link
Copy link
Open
Labels
Description
Overview
Currently all commands print raw JSON from the dbt Cloud API. For agentic workflows this is ideal, but human users sometimes want a more readable summary. Adding an --output flag would let the caller choose.
Proposed interface
--output [json|text] Output format (default: json)
json(default): current behaviour — pretty-printed JSON bodytext: concise human-readable summary (e.g. "Job 42: Do nothing! — SUCCESS")
Why this matters for agents
Agents calling the CLI as a subprocess get back the full JSON today, which is correct. The --output text mode would be for human use only. The default must stay json to avoid breaking existing integrations.
Notes
DBT_CLOUD_OUTPUTenv var as a fallback would be consistent with other env-var conventions in the project- Only high-value commands need a text formatter initially (job get/run, run get)
- Status/progress messages already go to stderr (Fix stdout pollution: route status messages to stderr #133), so stdout is already clean JSON
Related
- RFC: First-class support for agentic / autonomous agent use #107 — parent RFC
- Fix stdout pollution: route status messages to stderr #133 — stderr routing
Reactions are currently unavailable