Auto mode for pi.dev. An LLM reviews your coding agent's commands

vinzenzu1 pts2 comments

GitHub - vinzenzu/pi-auto-reviewer: Auto-review commands your Pi agent (pi.dev) wants to execute · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

vinzenzu

pi-auto-reviewer

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>4 Commits<br>4 Commits

LICENSE

LICENSE

README.md

README.md

auto-reviewer.ts

auto-reviewer.ts

package.json

package.json

View all files

Repository files navigation

pi-auto-reviewer

Automatically review bash commands that your pi agent wants to execute - akin to Codex "Auto-review" and Claude Code "auto mode".

How it works

Every bash command the agent wants to run goes through three tiers:

Tier<br>Action<br>Examples

1. Auto-permitted<br>Runs immediately<br>ls, cd, grep, git status, npm list, echo

2. Auto-blocked<br>Refused immediately<br>rm -rf, sudo, chmod 777, git push --force, shutdown

3. Needs review<br>Sent to a reviewer LLM<br>git commit, npm install, curl, mv, sed -i, cp

When a command falls into Tier 3 , a subagent LLM reviews the command with project context and decides ALLOW or BLOCK.

Install

All projects (global)

cp auto-reviewer.ts ~/.pi/agent/extensions/

Via npm

pi install npm:pi-auto-reviewer

Single project

Copy the extension into your project:

cp auto-reviewer.ts .pi/extensions/

Pi auto-discovers extensions in .pi/extensions/ when the project is trusted.

Single session

pi -e ./auto-reviewer.ts

Usage

Once installed, it works automatically - no configuration needed. Every bash command the agent tries to run will be reviewed.

What to expect

Safe commands (Tier 1) run without any visible delay.

Dangerous commands (Tier 2) are blocked with a notification explaining why.

Everything else (Tier 3) pauses briefly while the reviewer LLM decides. You'll see a status message: Reviewing: ...

If allowed : the command runs and you see Auto-reviewer: ✓

If blocked : the command is refused and you see Auto-reviewer: ✗

If the reviewer fails (timeout, error): you're prompted interactively to allow or deny manually.

Non-interactive mode

In print mode (pi -p) or JSON mode, Tier 3 commands are blocked by default since there's no UI to fall back on.

Customizing review rules

Edit AUTO_PERMITTED and AUTO_BLOCKED arrays in auto-reviewer.ts to add or remove patterns. Edit buildReviewPrompt() to change how the reviewer LLM decides.

About

Auto-review commands your Pi agent (pi.dev) wants to execute

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

star

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

TypeScript<br>100.0%

You can’t perform that action at this time.

auto reviewer agent commands review reload

Related Articles