mini-jev
Small one-pass classifier that labels shell commands as read-only, reversible or destructive before an agent runs them.
Overview
mini-jev is a single-pass shell command classifier inspired by Jev. Instead of generating text, it returns probabilities over three fixed labels: read-only (ls, git status), reversible (mkdir, git commit) and destructive (rm -rf, dd, DROP TABLE). It is meant as a guard in front of any program that executes commands, such as dashboards, coding agents or scripts.
The model is a fine-tuned base of about 22M parameters trained on a synthetic dataset built from templates and rule-based labels, so it runs on CPU or a small GPU. A CLI returns exit codes for allow, confirm and warn, and a FastAPI server exposes /decide and /verdict. The verdict only allows a command when the model says read-only with confidence of at least 0.9 and every tool in the command is on a known-tools list; unknown binaries always require confirmation. The README is explicit that it is an aid, not a guarantee.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Is this shell command read-only, reversible or destructive? | solo_lectura · reversible · destructivo |
| Choice | Verdict for executing the command | allow · confirm · warn |
How it works
- Generate a templated training set and fine-tune the ~22M-parameter base model.
- Pass a command to cli.py check or POST /decide.
- Allow only if read-only with confidence >= 0.9 and all tools are known.
- Otherwise return exit code 10 (confirm) or 20 (warn) so the caller can gate execution.
Strengths
- Small enough to run on CPU.
- Deterministic exit codes make it easy to chain in shell (jev check "$cmd" && eval "$cmd").
- Conservative fallback: unknown binaries always require confirmation.
- Threshold is adjustable via CLI flag or API parameter.
Caveats
- Does not understand context; a command like python script.py can do anything.
- Only covers tools and patterns seen in the synthetic training data.
- README is in Spanish and no licence is stated.
Getting started
pip install -r requirements.txt; python src/gen_dataset.py; python src/train.py; then python src/cli.py check "rm -rf ~/Downloads".At a glance
- Type
- Model
- Status
- prototype
- Language
- Python
- Runtime
- CLI, FastAPI server
- Has code
- yes
Use cases and integrations
How curated lists describe it
Clasificador de comandos de shell de una sola pasada.
wh000wh000/awesome-jev-live
Frequently asked questions
What does mini-jev decide?
Whether a shell command is read-only, reversible or destructive, and from that whether to allow, confirm or warn.
Does it need an API or GPU?
No. It trains and runs locally; the README says it works on CPU because the base model is about 22M parameters.
How do I add my own tools?
List them in a file pointed to by JEV_EXTRA_TOOLS and add templates to gen_dataset.py.
Related projects
Auditable Zig terminal agent pairing Codex for coding with Jev typed preflight and postflight checks under deterministic policy gates.
CLIproductionZigGateway that checks agent tool calls with policy plus Jev evidence, then binds approval to a single-use permit for that exact action.
MCP serverbetaTypeScriptMCP proxy and hooks that screen agent tool calls before they run and their results before the agent reads them, using Jev judgments.
MCP serverbetaTypeScriptXano backend template where Jev judges each agent tool call as safe, needs review or dangerous, and uncertain calls wait for a human.
ProjectbetaXanoScriptOpenAI-compatible endpoint that answers an agent's command-approval call with APPROVE, DENY or ESCALATE from a Jev Choice, failing closed.
ProxybetaPythonClaude Code plugin adding Jev judgments to Bash, Write and Edit calls and their outputs; a semantic guardrail, not a sandbox.
Pluginbeta