Installation
Get jevrail installed, configured, and wired into your coding agent: five commands, no daemon, no shell wrapper.
Prerequisites
Before you install, you'll want:
- Go 1.22 or newer
- A Jev API key (early access is waitlisted). Or skip this and run fully offline in deterministic-only mode
- Claude Code, opencode, or Codex, if you want the hook wired in automatically
1. Install the binary
Pick whichever fits: a direct install for a quick try, or a source checkout while jevrail is still pre-release.
go install github.com/SamanPandey-in/jevrail/cmd/jevrail@latestEither way, the binary lands in $GOPATH/bin or $HOME/go/bin. Make sure that's on your PATH.
2. Configure your API key
jevrail configurePrompts interactively and saves the key to ~/.config/jevrail/config.json with 0600 permissions. Every other command reuses it.
jevrail configure --key "sk-jev-..."export TYPESAFE_API_KEY="sk-jev-..."No key yet?
Set"no_model": true in the config and jevrail runs in deterministic-only mode. Nothing leaves your machine. See Privacy for the full data-flow breakdown.3. Wire it into your agent
Pick your agent. Each installs a slightly different hook.
jevrail install --agent claudeMerges a PreToolUse hook into ~/.claude/settings.json (existing settings are backed up first).
4. Verify with jevrail doctor
jevrail doctorJevrail doctor
✓ config: loaded (model = jev-1.13.0, base_url = https://api.typesafe.ai)
✓ api key: present
✓ api reach: https://api.typesafe.ai reachable
✓ claude hook: installed in /home/u/.claude/settings.json
Smoke test (no-model fast paths):
"git status" → allow (tier0)
"rm -rf /" → deny (tier0)
"echo hi" → allow (tier0)Checks that config loads, the model is pinned (warns on jev-latest), the timeout sits in the 500–5000ms range, the key is present, the base URL is reachable, and the hook is installed. It never prints the key itself.
5. Take it for a dry run
jevrail explain "rm -rf ./dist"Runs any command through the full pipeline and prints every probability, the context that was sent, and the verdict without actually running the command. Good first thing to try after install.
You're set
From here, everyBash tool call from Claude Code or opencode is evaluated before it runs. No shell wrapper, no daemon required.Uninstalling
jevrail uninstall --agent claude
jevrail uninstall --agent opencode
jevrail uninstall --agent opencode --projectRemoves the hook and restores your previous settings from the backup jevrail made on install.
Troubleshooting
- 1
jevrail: command not found
Your Go bin directory isn't on
PATH. Rungo env GOPATHand add$GOPATH/bin(or$HOME/go/bin) to your shell profile. - 2
doctor reports the API unreachable
Check
base_urlin~/.config/jevrail/config.json, and confirm outbound HTTPS isn't blocked on your network. - 3
Hook isn't firing
Restart your agent after install (opencode in particular only loads plugins at startup), then re-run
jevrail doctorto confirm it's still registered. - 4
Too many ask prompts
The default bands are conservative starting guesses. Tune
bandsin the config. See Decisions for how probabilities map to verdicts.
Next steps
- How It Works: the pipeline and the "model can only tighten" rule
- Usage Guide: full worked examples for every command
- Configuration: every config field, explained