DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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.

Short answer: Open the agent entry in your config file; then add a tools.rules entry with effect ask for builtin/bash where the command matches rm; add an allow rule for other tools you trust, and keep the rule order intended. All steps.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for lploc94/raw-cli and "Ask for approval before risky shell commands"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer