Commands and flags
decide run [flags] TEMPLATE [DATA...]decide runs list | view [RUN] | resume [RUN]decide templates list | show TEMPLATE | new NAMEdecide models [--provider NAME] [--json]decide --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. A template that reads images, audio, video, or PDFs reads only the files and folders you name. A text template also takes an image, audio, video, or PDF file that you name, on a provider that reads it; see Items.
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. Check the size of a run first
with --dry-run.
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. You can’t combine it with --sample.
decide run code-risk . --limit 5--sample
Section titled “--sample”Picks this many items at random. You can’t combine it with --limit.
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. It works only with text or JSON output.
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,
openai, or gemini. decide uses --provider, then DECIDE_PROVIDER,
then typesafe, or, for a media template, the first provider for its kind
with a key set. The files you name never change the provider.
DECIDE_PROVIDER sets it for every run. See Providers.
decide run sentiment notes.txt --provider cloudflare--model, -m
Section titled “--model, -m”Chooses the model by name. The default is each provider’s own model:
jev-latest for typesafe, clef for cloudflare, gpt-6-luna for
openai, and gemini-decision-1 for gemini.
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, or 2 when a run has images, audio, video, or PDFs.
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. It works only with text output.
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 in the yellow band, close to being flagged, doesn’t count. See
flags and matches.
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. A run keeps a copy of each image, audio, video,
or PDF file it judges, so decide runs resume works after you move the
original.
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. It works with text, JSON, and CSV output.
decide runs view --top 15Use it to read a long run from the top, such as security on a whole
repository.
decide runs resume
Section titled “decide runs resume”Finishes a run that stopped early or had failures. It asks only about
items with no answer yet, and prints the whole run. It takes --details,
--format, --json, --workers, and --fail-on as run does.
decide runs resume --fail-on flaggedTemplates
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 --projectdecide models
Section titled “decide models”Checks that your provider accepts your credentials, and lists the model
names you can pass to --model. It asks no model anything, so it checks
credentials only. A key it accepts may still be out of credit, or lack
permission to run decisions or to use a particular model.
decide modelstypesafe key accepted jev-latest (default) jev-preview
Choose one with: decide run sentiment notes.txt --model jev-latestChecked by listing models.Not checked: running decisions, credit, or access to a model.A missing or rejected key names the variable to fix and exits with code 1.
When decide can’t tell whether a key works, it says so. Try a small
decide run to find out.
--provider
Section titled “--provider”Checks typesafe, cloudflare, openai, or gemini. It reads DECIDE_PROVIDER
too, and defaults to typesafe. DECIDE_MODEL has no effect here.
decide models --provider cloudflare--json
Section titled “--json”Prints one JSON object instead of text, for scripts. listed is false when
the provider doesn’t list its models, and models then holds the names
decide knows.
{ "provider": "typesafe", "listed": true, "checked": "list models", "default": "jev-latest", "models": [{"name": "jev-latest", "description": "", "release_date": ""}]}Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Every item was answered. With --fail-on, none was flagged or matched. |
| 1 | An error, or some items failed. This wins over 2. |
| 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 |
CLOUDFLARE_BASE_URL |
another address for the Workers AI API |
OPENAI_API_KEY |
the key for GPT-6 Luna |
OPENAI_BASE_URL |
another address for OpenAI’s API |
GEMINI_API_KEY |
the key for Gemini Decision |
GEMINI_BASE_URL |
another address for the Gemini API |
DECIDE_PROVIDER |
the provider for every run: typesafe, cloudflare, openai, or gemini |
DECIDE_MODEL |
the model for every run |
DECIDE_HOME |
where templates, runs, and the cache live, in place of ~/.decide |
GITHUB_STEP_SUMMARY |
the file where decide writes its Markdown report in GitHub Actions. GitHub sets it. |
See Providers for each provider’s setup.
decide is Apache 2.0. Made by Deep Noodle, after some very hard thinking.