Skip to main content

Non-interactive mode Beta

dbt Wizard can run without the interactive TUI — useful for scripts, CI pipelines, pre-commit hooks, and any workflow where you want a one-shot result without human-in-the-loop approval.

Share your feedback!

We'd love to hear how dbt Wizard is working for you. Share your feedback by either running the /feedback slash command in your interactive terminal session or by going to the #dbt-wizard channel in the dbt Community Slack.

Thanks so much for your help in improving dbt Wizard and dbt data development!

exec — one-shot prompts

Run a single prompt and exit:

wizard exec "list all models with no tests"

Pipe input via stdin:

echo "which sources have stale freshness?" | wizard exec -

Use exec in CI to gate on quality checks:

# Check test coverage before merging
wizard exec "are there any models in models/marts/ with no tests?"

JSON output

For downstream processing, emit a structured JSON event stream:

wizard exec --json "summarize test coverage by schema" > coverage.json

With a JSON Schema to constrain the response shape:

wizard exec \
--json \
--output-schema ./schemas/coverage-response.json \
"summarize test coverage by schema"

Write the final message to a file:

wizard exec \
--output-last-message ./review-output.md \
"review the changes in this branch for correctness"

review — automated code review

Review uncommitted changes:

wizard review --uncommitted

Review a branch diff in CI:

wizard review --base main

Review a specific commit:

wizard review --commit abc1234

Example: GitHub Actions code review

- name: dbt Wizard review
run: |
wizard review \
--base ${{ github.base_ref }} > review.md
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Permissions in non-interactive mode

In non-interactive exec mode, Wizard runs without interactive approval prompts. Pre-grant the sandbox permissions you need:

# Read-only analysis (default — safe for CI)
wizard exec "list models with no documentation"

# Allow file writes inside the workspace
wizard exec -s workspace-write "add not_null tests to all primary keys in staging"

# Allow shell commands like dbt compile
wizard exec -s workspace-write "compile and validate fct_orders"

For read-only analysis tasks (coverage checks, impact queries, documentation gaps), the default permissions are sufficient. For tasks that write files or run dbt commands, pass the appropriate flags explicitly.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading