メインコンテンツへスキップ

CLI cheat sheet

The most useful dci commands, one page. For details, see the CLI guide, the command reference in the sidebar, and the changelog.

Sections follow the working order: set up once, find your way around, run and shape your data, then automate. In an interactive terminal the CLI adds pickers, prompts, and full-screen viewers (v2.5.1+), and a bare dci opens the AI session (v2.7+) — all of them switch off automatically in scripts, pipes, CI (detected via the standard CI variable, v2.7+), and agent mode, so nothing here changes how the CLI automates.

Install and update​

brew install doitintl/dci-cli/dci # macOS (Windows: winget install DoiT.dci)
dci --version # validate the install
dci update # update in place — any OS, any install method (v2.5.2+)
dci update --check # just report what's available; installs nothing
dci completion bash|zsh|fish # tab-completion (Homebrew/deb/rpm install it automatically)

Authenticate and verify​

dci login # interactive browser OAuth; success names your active context
export DCI_API_KEY=<token> # CI/automation (personal or service-account token)
dci status # config, session state, agent mode, active context
dci validate # who am I — confirms identity and permissions
dci logout # clear cached credentials

Customer context​

DCI_CUSTOMER_CONTEXT=acme.com dci list-budgets # this command only (env)
dci list-budgets -D acme.com # this command only (flag)
dci customer-context set acme.com # persistent default
dci customer-context show # inspect / clear

Ask in plain English​

dci # bare dci at a terminal opens the interactive AI session (v2.7+)
dci ai # the same session, named explicitly (v2.6+)
dci ai "top 3 cost anomalies this month" # one-shot: answer, then exit — formatted at a terminal, raw stream when piped (v2.7.6+)
dci ai --quiet "what did we spend on GCP in August?" # just the answer; --verbose keeps the full narration (v2.6.1+, no -q shorthand)
dci --help # always prints help; run /default help once in the session to make bare dci do the same
# In the session: /help · /key (also /key set, /key clear, v2.7.1+) · /customer · /model · /export · /login (v2.7.1+)
# /bell (v2.6.1+) · /mouse · /beta (v2.7.1+) · /exit or /quit · Esc cancels a running command or answer
# Run any CLI command with a / prefix — /list-budgets, /beta run-report — with completion and history.
# Bring your own key (ANTHROPIC_API_KEY, or /key set); DoiT employees get provided access after dci login (v2.7.2+, DCI_AI_PROVIDED=off opts out).

Discover commands​

dci --help # all commands, grouped
dci query --help # terse per-command help — curated, tested examples and per-argument descriptions (v2.7.3+)
dci query --help-full # + full request/response schemas
dci commands --json # machine-readable catalog (args, flags, destructive, examples, related commands — v2.7.3+)
dci commands --beta # the early-access command surface (v2.7+)
dci docs # every documentation entry point

Resource names and pickers​

dci get-report "Monthly AWS Spend" # names work wherever IDs do (v2.1+)
dci get-budget Team Backyard # quoting optional; Tab completes names too
dci get-report # no argument? filter-as-you-type picker (v2.5.1+)
dci open report # same picker, then deep-links into the console
dci get-report --id <value> # force a literal ID (skip the lookup)
dci get-report --name <value> # force a name lookup for an ID-shaped name
DCI_NO_RESOLVE=1 dci ... # scripts: disable name resolution and pickers
# Sub-resource commands take names too — dci get-report-config, dci export-cloudflow-flow (v2.7.5+).
# Commands whose identifier is a number, such as dci get-ticket, take the number only.
# Ambiguous name? Interactive terminals offer the matches as a menu (v2.5.1+);
# scripts get every match with its ID and a clean error — nothing runs on a guess.

Reports and queries​

dci query # interactive builder: compose, run, or save a query.json (v2.5.1+)
dci query < query.json # ad-hoc query from a JSON config
dci list-reports --max-results 10
dci list-reports --filter "owner:[email protected]" # server-side filter; keys: reportName, owner, type, folderId (combine with |)
dci list-reports --name-contains "sprint" # case-insensitive name match (ANDs with --filter)
dci get-report <id> # pivot view with totals, trend, heatmap
dci get-report <id> --start-date 2026-01-01 --end-date 2026-01-31
dci get-report <id> --time-range P30D
dci get-report-config <id> > r.json # pull → edit → push, as code
dci update-report <id> < r.json

Shape and explore the output​

dci list-reports --all # fetch and merge every page of a paged list (v2.5+)
dci list-dimensions --search genai # keyword match across every text field and every page (v2.6+)
dci get-report <id> --rollup <columns> # total rows by the listed result columns; per-period rows collapse (v2.6+)
dci list-anomalies -M interactive # full-screen viewer: ←→ columns, s sort, / filter, Enter prints the id (v2.5.1+)
dci query --chart < query.json # stacked per-group chart under the table (v2.5.2+); --chart=line for period totals
dci get-report <id> --chart=sparkline # period totals on one line (v2.7+); --chart=heatmap for one row per group (v2.7+)
dci get-report <id> --chart=treemap # share of total as rectangles — also charts single-period reports (v2.7.2+)
dci get-report <id> --flat # flat rows instead of the pivot
dci query --pivot < query.json # force the pivot anywhere
dci get-report <id> --drop-unlabeled-rows # drop report rows whose group labels are all null (v2.5+)
dci get-report <id> --include-empty-rows # different flag: keep null-group, zero-metric rows (dropped by default)
dci query --output csv < query.json > out.csv # spreadsheet export
dci list-budgets --output csv --output-file budgets.csv # write output to a file; -O is the shorthand, and a directory or . uses the API-suggested name (v2.7.5+)
dci query --rows keyed --output json < query.json # rows as named objects (for jq)
dci query --max-rows 0 < query.json # lift the agent-mode row cap
dci list-anomalies -C id,serviceName,startTime # choose table columns
dci get-report <id> -C service_description,2026-04,TOTAL # -C keeps the pivot on reports; TOTAL and Trend match any case (v2.7.6+)
dci list-reports -M wrap -W 160 # wrap cells / set table width
dci query --raw-numbers --heatmap=false < q.json # exact values, no shading
dci list-budgets --utc # keep table timestamps in UTC
DCI_TZ=Europe/Berlin dci list-reports # show times in a specific timezone
# Human tables land what you came for nearest the prompt (v2.7.2+): lists newest-last, insights top-savings-last,
# report groups largest just above TOTAL. Change with --output-order or DCI_OUTPUT_ORDER; machine formats, agent mode, and pipes keep the classic order.

Budgets, anomalies, allocations​

dci list-budgets # amounts, utilization bars (green → amber at 70% → red at 90%), risk, forecast
dci budgets-at-risk # just the budgets currently at risk (v2.7.2+)
dci list-budget-suggestions # API-suggested budgets
dci anomalies-recent # anomalies from the last 24 hours (v2.7.2+)
dci anomalies-recent --window 7d # hours, days, or weeks — 168h, 7d, 1.5d, 2w; mixed forms like 1d12h are rejected (v2.7.6+)
dci list-anomalies --max-results 10 # recent cost anomalies
dci get-anomaly <id>
dci list-allocations
dci open budget "Team Backyard" # deep link into the console (name or ID)
dci ask-ava-sync ephemeral: true, question: "Why did costs spike yesterday?"

Insights​

dci list-insights # ranked by daily savings; dismissed hidden; easy wins marked
dci list-insights --cloud-provider aws # one cloud (aws, gcp, azure)
dci list-insights --source aws-security-hub # one source (repeatable)
dci list-insights --easy-win # only quick, low-effort wins
dci list-insights --category Security --search-term "public"
dci list-insights --include-dismissed # bring dismissed insights back
dci get-insight <source> <key> # full detail, incl. the long description

DataHub​

dci list-datahub-datasets # your datasets; a display-name column appears when any dataset has one (v2.7.5+)
dci get-datahub-dataset <dataset> # one dataset: record count, who last updated it
dci create-datahub-dataset name: litellm-usage # the name is the `provider` you ingest under
dci update-datahub-dataset <dataset> displayName: "Datadog prod" # also description:, logoName: (empty string clears)
dci delete-datahub-dataset <dataset> --yes # deletes the dataset and its events
dci ingest-datahub-events-csv provider: <dataset>, file: @events.csv # upload a CSV, or a GZ/ZIP of one — @ attaches it (v2.7.4+)
dci ingest-datahub-events < events.json # a JSON batch of events instead of a file
dci import-datahub-provider-records < records.json # provider-native rows as JSON (provider, schemaTemplate, periodStart, periodEnd)
dci export-datahub-dataset-records <dataset> --all -O records.csv # whole dataset: every page and 366-day window, merged (v2.7.5+)
dci export-datahub-dataset-records <dataset> --start-time 2026-08-01T00:00:00Z --end-time 2026-09-01T00:00:00Z --format jsonl
dci export-datahub-dataset-records <dataset> --all --for-reimport -O records.csv # rewritten for ingest-datahub-events-csv (v2.7.5+)
# Leave the dataset name off and the picker opens (v2.7.5+); names complete on Tab and resolve from a partial name.
# Uploads cap at 30 MB per file. Without --all a partial export prints its --page-token on stderr, and a window
# wider than 366 days is rejected up front.

All eleven commands are in the DataHub command group.

CloudFlow​

dci list-cloudflows # your flows, id first — the value export, refine, and test-run take (v2.7.2+)
dci build-cloud-flow question: "Every Monday run the Monthly AWS Spend report and post it to Slack" # alias build-cloudflow (v2.7.2+)
dci refine-cloud-flow <flow-id> question: "Add an approval step before the delete node" # alias refine-cloudflow
dci export-cloudflow-flow <flow-id> > bundle.json # portable, credential-free JSON bundle (v2.6.1+)
dci import-cloudflow-flow --dry-run < bundle.json # validate and return the import plan; writes nothing
dci import-cloudflow-flow --idempotency-key "$(uuidgen)" < bundle.json # create-only: new draft flows, key required
dci test-run-cloudflow-flow <flow-id> --dry-run # deep validation with the checks publishing applies; accepts drafts
dci test-run-cloudflow-flow <flow-id> --idempotency-key "$(uuidgen)" # one test run — kept out of run history and statistics
dci list-cloudflow-flow-runs <flow-id> --mode test # --mode standard for production runs only; both by default
dci get-cloudflow-flow-run <flow-id> <run-id> # status plus what every node consumed and produced
dci trigger-cloudflow-flow <flow-id> # run a published flow · dci stop-cloudflow-flow <flow-id> stops the active run
# Free text containing commas must go through stdin.

For what flows can do, see CloudFlow.

Dimensions and support requests​

dci list-dimensions --filter type:system_label # the dimensions you can group and filter by
dci list-tickets --filter "severity:urgent|severity:high" # support requests, newest first
dci get-ticket <number> # one ticket; create-ticket, update-ticket and the comment/tag commands complete the group

Early access​

dci beta run-report <report> # asynchronous report execution (v2.7+); names resolve, no argument opens the picker (v2.7.2+)
dci beta run-report-config < r.json # the same, for an ad-hoc config
dci beta get-report-operation <id> # poll the operation
dci beta get-report-results <id> # fetch the finished results · dci beta cancel-report-operation <id> to stop one
# Beta commands use your existing sign-in, customer context, and output formats; idempotency keys are
# generated unless you pass your own. Accounts not yet enrolled get a hint instead of a bare error.

Destructive commands​

dci delete-report "old draft" # interactive: a confirm dialog shows the resolved name + ID; Cancel is the default (v2.5.1+)
dci delete-report <id> --dry-run # local preview, no request
dci delete-report <id> --yes # scripts/CI: explicit confirmation (else exit 30)

Script it​

export DCI_API_KEY=<token> # never the browser flow in CI
budgets=$(dci list-budgets --output json)
dci get-report <id> --output json || echo "failed with $?"
# Pipes and CI never see pickers, prompts, or the AI session — same output as before v2.5.1.
# DCI_NO_TUI=1 turns them off in a terminal too, keeping tables and color.
# Exit codes: 0 ok · 1 generic failure · 2 usage · 10 auth · 11 permission · 20 not found · 21 conflict ·
# 30 validation/unconfirmed destructive · 40 server · 41 network · 50 rate limit

For AI agents​

dci skill claude # install the usage skill (codex, cursor, gemini, kiro, opencode)
dci skill update # refresh installed copies after a CLI update (v2.7.2+)
dci skill list # embedded files with token estimates
dci --agent status # force agent mode (auto-detected in most harnesses)
# Agent mode: TOON output, JSON error envelopes on stderr, 500-row cap with markers
# The skill also teaches CloudFlow authoring: build/refine, or export → edit → dry-run → import (v2.7.2+)

A compact, CLI-only documentation index lives at https://help.doit.com/llms-cli.txt — every entry links to its page as plain Markdown, so agents can fetch just the commands they need.

Useful environment variables: DCI_API_KEY, DCI_CUSTOMER_CONTEXT, DCI_AGENT_MODE, DCI_NO_TUI, DCI_NO_RESOLVE, DCI_CONFIRM_DESTRUCTIVE, DCI_SKIP_BODY_VALIDATION, DCI_OUTPUT_ORDER, DCI_TZ, DCI_NO_UPDATE_CHECK, DCI_ACTIVE_HELP, DCI_API_BASE_URL, NO_COLOR. For the AI session: ANTHROPIC_API_KEY, DCI_AI_EFFORT (low, medium, high, default; medium is the default), DCI_AI_STATS=1 for one telemetry line per answer, DCI_AI_PROVIDED=off. CI is detected too (v2.7+), so a pipeline never hangs on the interactive session. Full tables in the CLI guide.