shell_approval
Require user approval before executing shell commands
What it does
Before executing shell commands, this plugin:
Auto-approves safe commands
Read-only commands like ls, cat, git status execute without prompts.
Asks approval for other commands
Commands that modify files, install packages, or have side effects require user confirmation.
Quick Start
main.py
Python REPL
Interactive
Safe Commands (Auto-Approved)
These read-only commands are automatically approved:
File Operations
ls,llcat,head,tailless,morefind,fdgrep,rgtree,wc
Git (Read-Only)
git statusgit loggit diffgit showgit branchgit remote
System Info
pwd,whoamienv,printenvuname,hostnamedf,du,freeps,topwhich,file
Approval Options
When prompted for approval, you can:
1.
Yes, execute
Execute this specific command
2.
Auto approve '{cmd}'
Auto-approve all commands starting with this (e.g., all rm commands for this session)
3.
No, tell agent what I want
Reject and provide feedback to the agent
How it works
main.py
Events Used
| Event | Handler | Purpose |
|---|---|---|
before_each_tool | _check_approval | Check and prompt before shell commands |
Source
connectonion/useful_plugins/shell_approval.py
main.py
