Jev directory
CommunityJev Agents & MCP
Pi Auto Reviewer
A Pi extension that reviews shell commands before execution in three tiers — auto-permitted, auto-blocked, and model-reviewed — with Jev, OpenRouter, or a pi model returning ALLOW or BLOCK for risky commands.
- Reading time
- 2 min
- Published by
- Community
- Author
- vinzenzu
- Last verified
- Oct 2026
- Languages
- TypeScript
- Platforms
- CLI
- Capabilities
- Open sourceRequires API key
Highlights
- Routes every shell command into three tiers: auto-permitted, auto-blocked, or sent to the configured reviewer.
- Detects 15 risky behaviors, from force-push and recursive-delete to disk-destructive commands and PowerShell elevation.
- Read-only commands with redirection, pipes, or secret-looking env vars fall through to tier 3 instead of being auto-permitted.
- Tier-3 reviews take up to 60s with one automatic retry; a twice-failed review prompts interactively or blocks in JSON mode.
- The Jev backend sends tier-3 commands to TypeSafe's /v1/systemone; malformed, inconsistent, or tied answers fail review.
Watch out
MIT-licensed, but the README leaves tier pattern lists and review behavior to a provider model and says to use the extension at your own discretion. Each review attempt is written to the OS temporary directory under pi-reviewer-debug, with the newest 20 files kept.
Questions about this entry
Short answers drawn from the linked project or page.
Run pi install npm:pi-auto-reviewer, or copy auto-reviewer.ts, review-tool.ts, jev-decisions.ts, and reviewer-cost.ts into ~/.pi/agent/extensions/pi-auto-reviewer/, a trusted project's .pi/extensions/, or load one session with pi -e ./auto-reviewer.ts. All four files must sit side by side.
Tier 1 runs immediately (ls, grep, git status); tier 2 is refused immediately (rm -rf /, sudo, chmod 777); tier 3 goes to the configured reviewer (git push --force, git reset --hard, recursive deletes).
Set PI_REVIEWER_BACKEND=jev with the provider and model, for example openrouter with typesafe/jev-1.13, or typesafe with jev-latest and a TYPESAFE_API_KEY. Other compatible APIs take a provider ID, model, and full endpoint, with an optional apiKeyEnv.
The command, detected risky behaviors, compact excerpts of the conversation, recent shell commands, git state, project docs, and OS information. The reviewer then decides ALLOW or BLOCK, and Jev's reason is a fixed description of that choice rather than a generated explanation.
Interactive mode prompts you to decide manually; non-interactive mode (pi -p or JSON mode) blocks the command. Jev failures log the error message rather than provider error bodies, and the 60-second deadline applies per attempt.
Fifteen behaviors feed the reviewer prompt: force-push, branch-delete, worktree-remove, hard-reset, git-clean, recursive-delete, privilege-escalation, broad-chmod, fork-bomb, disk-destructive, system-shutdown, remote-shell, and the three Windows equivalents.
No. Tiers 1 and 2 are unchanged; Jev only reviews tier-3 commands, using the same rules and context. It validates the choice, confidence, and probability distribution, and there is no additional confidence threshold beyond the existing deadline, retry, and fallback.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
YouTube: Kubernetes admission control with a decision model, fail-closed.
Hacker News: SafeDep Gryph plus Jev checks for compromised coding-agent behavior.
2 pointsDetecting Compromised AI Coding Agents with Jev and GryphRead the thread on Hacker NewsX: Jev and Laya on security queries
X: Testing Jev for prompt injection
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.