{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "lploc94-raw-cli--fork-builtin-tool-for-custom-behavior",
 "repo": "lploc94/raw-cli",
 "repo_url": "https://github.com/lploc94/raw-cli",
 "repo_slug": "lploc94-raw-cli",
 "title": "Fork a built-in tool to change how it works",
 "page_title": "How to fork a built-in tool to change how it works with Raw CLI",
 "summary": "Copy the shipped bash tool, rename it, and change its behavior for one agent.",
 "who": "A team lead whose agent needs a shell tool that behaves differently, such as a stricter wrapper or a team-specific default.",
 "problem": "Built-in tools are fixed in most harnesses, so custom behavior usually means forking the whole product.",
 "outcome": "A local copy of the bash tool that one agent selects in place of the built-in, with the change kept in a file the team can read.",
 "steps": [
  "Run `npm install -g @tlelabs/raw` if Raw is not installed yet.",
  "Copy the example folder `examples/tools/bash/` to `~/.config/raw/tools/my_bash/`.",
  "Change the manifest `id` and `name` in the copied folder, then edit its `index.mjs` as needed.",
  "In your agent's `tools.use` list, replace `builtin/bash` with `local/my_bash`.",
  "Run `raw --agent raw \"Run the test suite\"` and check that the output shows your tool's behavior. (inferred, check the README)"
 ],
 "agent_prompt": "Using the repo lploc94/raw-cli, copy examples/tools/bash/ to ~/.config/raw/tools/<tool-name>/, change its manifest id and name, and select local/<tool-name> in the agent <agent-name>. Expected output: a successful run of one shell command through the forked tool. Verify the run output shows the forked tool name and a status line.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README gives the copy path and the id and name edits, but the exact contents of index.mjs are not described, so the change itself is up to you.",
 "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.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lploc94-raw-cli/fork-builtin-tool-for-custom-behavior/",
 "md": "https://dedupedai.com/use-cases/lploc94-raw-cli/fork-builtin-tool-for-custom-behavior/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--fork-builtin-tool-for-custom-behavior.json",
 "api_version": "v1"
}
