Commands and flags
decide run [flags] TEMPLATE [DATA...]decide runs list | view [RUN] | resume [RUN]decide templates list | show TEMPLATE | new NAMEdecide --help, and --help on any command, prints the same flags.
decide --version prints the version you have.
decide run
Section titled “decide run”Asks a template’s questions about each item in your data. With no files named, it reads stdin.
decide run code-risk src --include '*.go' --limit 5git diff main | decide run code-risk --each functionecho "This is great" | decide run sentimentOver 100 items, it asks before it starts, unless you add --yes.
Choosing the data
Section titled “Choosing the data”--include, -i
Section titled “--include, -i”Reads only the files that match a pattern. A pattern without a slash matches at any depth. Repeat it for more patterns.
decide run code-risk src --include '*.go' --include '*.py'--exclude, -x
Section titled “--exclude, -x”Skips the files that match a pattern. Repeatable.
decide run code-risk src --include '*.go' --exclude '*_test.go'--each
Section titled “--each”Chooses what one item is: file, line, paragraph, section,
function, or hunk. The default depends on the data; see
Items.
decide run relevance docs --each section -p question="pricing"--items
Section titled “--items”Says where the records are inside a JSON file, as a dotted path or a JSON Pointer.
decide run ticket-routing export.json --items data.tickets--field
Section titled “--field”Asks about one field of each JSON record, such as body or ticket.body.
The model sees only the field, and --json output keeps the whole record
as input.
decide run ticket-routing tickets.jsonl --field body--limit, -n
Section titled “--limit, -n”Stops after this many items.
decide run code-risk . --limit 5--sample
Section titled “--sample”Picks this many items at random.
decide run sentiment reviews.txt --sample 50Asking
Section titled “Asking”--param, -p
Section titled “--param, -p”Sets a template parameter, as name=value. Repeatable.
decide templates show TEMPLATE lists a template’s parameters and their
defaults.
decide run relevance notes.txt -p question="pricing"--dry-run
Section titled “--dry-run”Shows what a run would look at and how many answers the cache already holds, without calling the model.
decide run code-risk . --dry-run--no-cache
Section titled “--no-cache”Asks every question again, and keeps the new answers in place of the old.
decide run code-risk src --no-cache--provider
Section titled “--provider”Chooses the model’s provider for this run: typesafe, cloudflare, or
openai. See Providers.
decide run sentiment notes.txt --provider cloudflare--model, -m
Section titled “--model, -m”Chooses the model by name. The default is the provider’s own.
decide run sentiment notes.txt --model jev-1.13.0--workers
Section titled “--workers”Sets how many requests run at once. The default is 4.
decide run code-risk src --workers 8--yes, -y
Section titled “--yes, -y”Starts a run of more than 100 items without asking first.
decide run code-risk . --yesPrinting results
Section titled “Printing results”--details, -d
Section titled “--details, -d”Shows the probability of every option, and the model’s confidence.
echo "It's fine, I guess" | decide run sentiment --details--format, -f
Section titled “--format, -f”Prints results as text, json, csv, md, or github. See
Output formats.
decide run code-risk src --format csv > results.csv--json
Section titled “--json”Prints one JSON line per item. It is short for --format json.
decide run code-risk src --json | jq .answers--fail-on
Section titled “--fail-on”Exits with code 2 if any item is flagged, or matched, so a script or CI
job can stop on the result. An answer close to being flagged doesn’t count.
git diff main | decide run code-risk --each function --fail-on flaggedSaved runs
Section titled “Saved runs”decide runs # list runs, newest firstdecide runs view # show the latest run's resultsdecide runs view 20261002 # a run ID, or the start of onedecide runs view --top 20 # the 20 items nearest their flagsdecide runs resume # finish the latest runRuns are saved in ~/.decide/runs. Set DECIDE_HOME to keep templates
and runs somewhere else.
decide runs list
Section titled “decide runs list”Lists saved runs, newest first. decide runs alone does the same.
decide runs view
Section titled “decide runs view”Shows a run’s results again, without calling the model. It takes a run
ID, or the start of one, and shows the latest run by default. It takes
--details, --format, and --json as run does.
Shows only this many items: the flagged ones first, then those nearest a flag.
decide runs view --top 15--top ranks items by how far their likeliest flagged answer is above or
below its flag’s threshold. It uses matches when a template has no flags,
and leaves out items that failed. Use it to read a long run from the top,
such as security on a whole repository, where the ranking says where to
look.
decide runs resume
Section titled “decide runs resume”Finishes a run that stopped early or had failures, using the saved inputs
and questions. It never asks again about an item that already has an
answer, and it keeps the cache setting of the run it resumes. It takes
--details, --format, --json, --workers, and --fail-on as run
does.
decide runs resume --fail-on flaggedIts output covers the whole run, the items answered before it stopped as
well as the new ones, so --fail-on gates on the whole run.
Templates
Section titled “Templates”decide templates list
Section titled “decide templates list”Lists the templates you can run: your project’s, your own, and the
built-in ones. decide templates alone does the same.
decide templates show
Section titled “decide templates show”Explains what a template asks, when it flags an answer, its parameters, and how to run it.
decide templates show code-riskdecide templates new
Section titled “decide templates new”Creates your own template. See Write your own template.
--from
Section titled “--from”Starts from a copy of another template.
decide templates new my-routing --from ticket-routing--project
Section titled “--project”Saves it in this folder’s .decide/templates, to commit and share with
your team.
decide templates new my-routing --projectExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Every item was answered, or a diff had nothing to judge. With --fail-on, none was flagged or matched. |
| 1 | An error, or some items failed or were not reached. This wins over 2, even if items were flagged. |
| 2 | With --fail-on, at least one item was flagged or matched. |
| 130 | Stopped with Ctrl-C. Resume with decide runs resume. |
A template’s flags or matches set where the line is. To fail at a
different probability, copy the template with decide templates new and
change them.
Environment variables
Section titled “Environment variables”| Variable | Sets |
|---|---|
TYPESAFE_API_KEY |
the key for Jev, the default provider |
TYPESAFE_BASE_URL |
another service that speaks the Jev API |
CLOUDFLARE_AUTH_TOKEN, CLOUDFLARE_ACCOUNT_ID |
the token and account for Clef on Workers AI |
OPENAI_API_KEY |
the key for GPT-6 Luna |
OPENAI_BASE_URL |
another address for OpenAI’s API |
DECIDE_PROVIDER |
the provider for every run: typesafe, cloudflare, or openai |
DECIDE_MODEL |
the model for every run |
DECIDE_HOME |
where templates, runs, and the cache live, in place of ~/.decide |
See Providers for each provider’s setup.