Gate scripts and CI on fast, calibrated System One judgments: a score, a choice or an exit code.
Project details
onesie puts model judgments in your shell. Pipe in text, ask a yes or no, pick or rate question, and get a score, a choice or an exit code a script can gate on. It runs on fast System One models like Jev, streams JSONL and CSV, and its calibrate command shows what each cut catches on your own labelled examples, so a gate's threshold comes from evidence, not a guess.
onesie is a command line tool that asks a System One model, such as Jev, one question about a piece of text and gives back an answer a script can use: a probability, a chosen option or an exit code. No prompt to tune and no prose to parse.
echo 'I was charged twice for my order' | onesie 'who should handle this' --pick billing,shipping,technical -o raw
# billing
onesie 'is this urgent' returns the probability of yes.--pick billing,shipping,technical chooses one option, with its confidence.--rate low,medium,high chooses a level on an ordered scale.--ask names several questions and sends them in one request, and -f loads saved questions from a file.
--assert turns an answer into an exit code, so a judgment can stop a pipeline:
onesie -f shell-safety -q --state 'git status' # exit 0: pass
onesie -f shell-safety -q --state 'rm -rf ~' # exit 1: fail, so block
onesie -f shell-safety -q --state 'echo hello > notes.txt' # exit 7: unsure, so hand off to a person
--abstain-if gives a gate a middle ground: answers too close to call exit 7 instead of a yes or a no, so a person decides only the hard cases. Any other exit code is an error, so a gate fails closed.
onesie calibrate runs your questions over your own labelled examples and reports what every cut would catch, with AUC, precision and recall per question, so a gate's threshold comes from data:
destroys, yes/no: labelled 40, 16 yes, 24 no, 0 errors. AUC 1.00
--require turns that report into a CI check, so a model or prompt change that weakens a gate fails the build.
Four calibrated starter sets ship built in: moderation, personal-data, prompt-injection and shell-safety. onesie questions lists them beside your own.
tail -f.-o csv --merge writes your rows back with the answers added as columns.--id names each record, --resume picks up an interrupted run where it stopped, and repeated records are asked once.-j sets how many records are in flight, and retries back off on rate limits.--mock answers from a fixture file instead of the API, so gate scripts can be tested in CI for free, errors and timeouts included.--print-request shows the exact request body without sending it.--cache stores responses on disk and answers a repeated request from them.onesie works with TypeSafe, OpenRouter, Berget, Levanto and Cloudflare. Profiles keep each provider's settings, and keys stay in the OS keychain unless you choose a file. Point ONESIE_BASE_URL at your own server that speaks a provider's API, and no key is needed.
setup-onesie installs a verified binary in one step, and its run mode asks a question and sets pass, fail or unsure as an output, with no bash:
- uses: frodi-karlsson/setup-onesie@v1
env:
TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
with:
file: shell-safety
state: ${{ github.event.pull_request.title }}
A Claude Code plugin ships skills that teach an agent when to reach for onesie, how to write a gate that fails closed, how to stream a file and how to calibrate, plus a session hook that checks onesie is installed and a key resolves.
/plugin marketplace add frodi-karlsson/onesie
/plugin install onesie@onesie
brew install frodi-karlsson/tap/onesie
# or
curl -fsSL https://raw.githubusercontent.com/frodi-karlsson/onesie/main/install.sh | sh
# or
go install github.com/frodi-karlsson/onesie/cmd/onesie@latest
Then store a key with onesie profile create work --provider typesafe, which prompts for it, and ask your first question:
echo 'the build is red again' | onesie 'is this urgent'
Every release is signed and carries build provenance. onesie is open source under the MIT license.
Comments
0Start the conversation
Share the first comment.