Installation

Get jevrail installed, configured, and wired into your coding agent: five commands, no daemon, no shell wrapper.

Go 1.22+ Jev API key (optional) Claude Code / opencode / Codex

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.

Terminal
go install github.com/SamanPandey-in/jevrail/cmd/jevrail@latest

Either way, the binary lands in $GOPATH/bin or $HOME/go/bin. Make sure that's on your PATH.

2. Configure your API key

Terminal
jevrail configure

Prompts interactively and saves the key to ~/.config/jevrail/config.json with 0600 permissions. Every other command reuses it.

Non-interactive / CI
jevrail configure --key "sk-jev-..."
Env var (always wins if set)
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.

Terminal
jevrail install --agent claude

Merges a PreToolUse hook into ~/.claude/settings.json (existing settings are backed up first).

4. Verify with jevrail doctor

Terminal
jevrail doctor
Expected output
Jevrail 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

Terminal
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, every Bash tool call from Claude Code or opencode is evaluated before it runs. No shell wrapper, no daemon required.

Uninstalling

Terminal
jevrail uninstall --agent claude
jevrail uninstall --agent opencode
jevrail uninstall --agent opencode --project

Removes the hook and restores your previous settings from the backup jevrail made on install.

Troubleshooting

  1. 1

    jevrail: command not found

    Your Go bin directory isn't on PATH. Run go env GOPATH and add $GOPATH/bin (or $HOME/go/bin) to your shell profile.

  2. 2

    doctor reports the API unreachable

    Check base_url in ~/.config/jevrail/config.json, and confirm outbound HTTPS isn't blocked on your network.

  3. 3

    Hook isn't firing

    Restart your agent after install (opencode in particular only loads plugins at startup), then re-run jevrail doctor to confirm it's still registered.

  4. 4

    Too many ask prompts

    The default bands are conservative starting guesses. Tune bands in the config. See Decisions for how probabilities map to verdicts.

Next steps