An unofficial, provider-neutral Unix client for Jev from TypeSafe AI. Written in Go.
Currently supported providers:
- TypeSafe AI
- Cloudflare
- Vercel
Install via go install:
go install github.com/stefafafan/jev@latestor build from source:
go build -o jev .Use stefafafan/setup-jev to install a released jev binary on a GitHub Actions runner.
- uses: stefafafan/setup-jev@ee163438b847a374ca9e4f44f08e376da69e2df9 # v1.0.0
with:
version: v0.1.1
- run: jev --versionFor a working CI example, see this repository's pr-risk.yml workflow. It sends a pull request diff to Jev through Cloudflare and applies a corresponding merge-risk label.
Set credentials for your favorite provider:
export TYPESAFE_API_KEY=...Then pipe state into one question:
echo "some state" | jev --provider typesafe noul "Is this safe?"JSON is written by default:
{"provider":"typesafe","model":"jev-1.13.0","answers":{"result":{"type":"noul","noul":0.95}},"usage":{"input_tokens":392,"output_tokens":21}}The CLI reports whether evaluation succeeded through its exit code. It does not turn a judgment into policy. Put thresholds downstream:
git diff | jev noul "Could this change introduce a regression?" | jq -e '.answers.result.noul < 0.2'Each invocation asks exactly one question through a primitive subcommand.
cat incident.txt | jev noul "Does this require immediate action?"Repeat --option for each candidate. Commas are ordinary label characters.
git diff |
jev choice \
--option safe \
--option needs-review \
--option unsafe \
"How should this change be classified?"Score levels are ordered from low to high.
kubectl diff -f manifest.yaml |
jev score \
--level low \
--level medium \
--level high \
"How risky is this deployment?"State always comes from stdin. Use ordinary shell redirection for a file:
jev noul "Is this urgent?" < incident.txtThe CLI supports TypeSafe AI, Cloudflare Workers AI, and Vercel AI Gateway.
export TYPESAFE_API_KEY=...
cat input.txt | jev --provider typesafe noul "Is this safe?"export CLOUDFLARE_API_TOKEN=...
export CLOUDFLARE_ACCOUNT_ID=...
cat input.txt | jev --provider cloudflare noul "Is this safe?"export AI_GATEWAY_API_KEY=...
cat input.txt | jev --provider vercel noul "Is this safe?"JSON is the default machine-readable format.
Each answer retains the Jev primitive fields:
- Noul:
type,noul - Choice:
type,choice,confidence,probabilities - Score:
type,score,confidence,legend,probabilities
Use --output text option as needed.
cat input.txt | jev --output text noul "Is this safe?"stdout contains only a successful result. Diagnostics are written to stderr.
jev [global options] noul QUESTION
jev [global options] choice --option LABEL --option LABEL [...] QUESTION
jev [global options] score --level LEVEL --level LEVEL [...] QUESTION
--provider NAME provider: typesafe, cloudflare, or vercel
--output FORMAT json (default) or text
--version show version
-h, --help show help