{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "lploc94-raw-cli--require-approval-for-risky-shell-commands",
 "repo": "lploc94/raw-cli",
 "repo_url": "https://github.com/lploc94/raw-cli",
 "repo_slug": "lploc94-raw-cli",
 "title": "Ask for approval before risky shell commands",
 "page_title": "How to ask for approval before risky shell commands with Raw CLI",
 "summary": "Add tools.rules so an agent prompts only for matching bash commands such as rm.",
 "who": "An ops engineer who wants an agent to run shell work on a server but must confirm destructive commands first.",
 "problem": "Tool calls run automatically in terminal, headless, dashboard and ACP modes, so without a rule a destructive command runs with no prompt.",
 "outcome": "An agent that runs normal commands freely and pauses for approval when a bash command matches the rule.",
 "steps": [
  "Open the agent entry in your config file.",
  "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.",
  "Run `raw --agent raw \"Clean up the build folder\"` and confirm that an `rm` command triggers a prompt. (inferred, check the README)",
  "Run the same task with `-y` and confirm that the explicit `ask` rule still prompts."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Policy rules written for builtin/bash do not cover builtin/powershell, so add separate rules for each shell an agent selects.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "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"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lploc94-raw-cli/require-approval-for-risky-shell-commands/",
 "md": "https://dedupedai.com/use-cases/lploc94-raw-cli/require-approval-for-risky-shell-commands/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lploc94-raw-cli--require-approval-for-risky-shell-commands.json",
 "api_version": "v1"
}
