DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to ask for approval before risky shell commands with Raw CLI

Add tools.rules so an agent prompts only for matching bash commands such as rm.

Authorization notice. Raw CLI is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forAn ops engineer who wants an agent to run shell work on a server but must confirm destructive commands first.

The problemTool calls run automatically in terminal, headless, dashboard and ACP modes, so without a rule a destructive command runs with no prompt.

The outcomeAn agent that runs normal commands freely and pauses for approval when a bash command matches the rule.

What you need first

  • Node.js 22.13+ on macOS, Linux or Windows 10/11
  • Bash for the bash tool (Git Bash on Windows, or PowerShell if Bash is absent)
  • A local model served over an OpenAI-compatible endpoint, or a hosted model with an API key
  • Comfort editing a strict JSON config file

Steps

  1. Open the agent entry in your config file.
  2. Add a tools.rules entry with effect ask for builtin/bash where the command matches rm.
  3. Add an allow rule for other tools you trust, and keep the rule order intended.
  4. Run raw --agent raw "Clean up the build folder" and confirm that an rm command triggers a prompt. (inferred, check the README)
  5. Run the same task with -y and confirm that the explicit ask rule still prompts.

Prompt for your agent

Using the repo lploc94/raw-cli, add an ordered tools.rules entry to the agent <agent-name> that asks before any bash command containing rm, then run it with the task "List files in <folder>" and "Remove <file>". Expected output: the list runs and the removal triggers an approval prompt. Verify the prompt appears and the -y flag does not skip it.

Caveat. Policy rules written for builtin/bash do not cover builtin/powershell, so add separate rules for each shell an agent selects.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page