A robust CLI for System One models, enabling seamless data handling.
Project details
Onesie is an advanced Unix-pipeable CLI designed for interacting with System One models like Jev. It allows users to pipe text directly, execute questions through various models, and manage shell commands with precision and safety. Simplify tasks while ensuring robust control over your programming environment.
onesie is a sophisticated and expressive command-line interface (CLI) designed for Unix systems, specifically tailored for working with System One models, such as TypeSafe's Jev and Berget's models. This tool facilitates seamless interaction with natural language processing capabilities, allowing users to pipe text into the command line and receive actionable responses—ideal for automating decision-making processes and scripting.
Effortlessly pipe text into onesie to query its capabilities and receive an assessment based on urgency or relevance. For instance:
echo 'EVERYTHING IS DOWN, CALL ME NOW' | onesie 'does this convey urgency' -r
# Response: 0.99
Manage shell commands safely with integrated exit codes that determine actions:
onesie -f shell-safety -q --state 'git status'
# exit 0: run it
onesie -f shell-safety -q --state 'rm -rf ~'
# exit 1: block it
onesie -f shell-safety -q --state 'echo hello > notes.txt'
# exit 7: not sure, ask a person
With the calibrate feature, assess accuracy by analyzing prior labeled records, enabling fine-tuning of the system's responses. An example command would be:
onesie calibrate -f shell-safety -i jsonl --map .command --id .id -m jev-1.13.0 \
--label destroys=.destroys --label secrets=.secrets --label network=.network \
--cuts 0.25,0.5,0.65 --out answers.jsonl --resume < commands.jsonl
The CLI allows for complex question formations and provides rate-based assessments of inquiries:
echo 'I was charged twice for my order' | onesie 'who should handle this' --pick billing,shipping,technical -r
# Response: billing
Integrate onesie into scripts to enhance automated workflows and decision-making processes, for instance, in a triage ticketing system:
tail -f tickets.jsonl | onesie 'is this urgent' -i jsonl --map .body --id .id -o json
This functionality can also extend to handling pull requests on GitHub, ensuring vital communications regarding code changes are automated and streamlined.
onesie supports various providers including TypeSafe, OpenRouter, and Berget, providing flexibility in how queries are routed. It also includes features like caching for repeated requests, dry runs for testing requests without execution, and a comprehensive help system for user guidance.
For detailed command references, see REFERENCE.md. For contributors, guidelines are available in CONTRIBUTING.md.
Comments
0Start the conversation
Share the first comment.