# AI use cases for Raw CLI (lploc94/raw-cli)

Repo: [lploc94/raw-cli](https://github.com/lploc94/raw-cli) | Use cases: 4 | Page: https://dedupedai.com/use-cases/lploc94-raw-cli/

Raw is an open-source TypeScript agent harness with a working tool loop, context compaction, sessions, approvals, a terminal REPL, a local browser dashboard and ACP, where every tool, skill, hook and policy is an editable file.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run a coding agent on your own model: https://dedupedai.com/use-cases/lploc94-raw-cli/build-coding-agent-on-own-model/
- Fork a built-in tool to change how it works: https://dedupedai.com/use-cases/lploc94-raw-cli/fork-builtin-tool-for-custom-behavior/
- Package an agent so teammates can install it: https://dedupedai.com/use-cases/lploc94-raw-cli/share-project-helper-agent-as-package/
- Ask for approval before risky shell commands: https://dedupedai.com/use-cases/lploc94-raw-cli/require-approval-for-risky-shell-commands/

## How to run a coding agent on your own model with Raw CLI

Repo: [lploc94/raw-cli](https://github.com/lploc94/raw-cli) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Start a working terminal coding agent on a local or hosted model in one afternoon.

**Who it is for:** A developer who wants a coding assistant that runs on a model they choose, after trying hosted tools and wanting control over tools and the model.

**The problem:** Writing an agent loop with file editing, shell access and saved sessions from scratch takes time before the first useful answer.

**The outcome:** A configured agent that reads files, edits code, runs commands and answers questions about a repository from the terminal.

### Steps

1. Run `npm install -g @tlelabs/raw`.
2. Run `raw config init` to create the config file.
3. Edit the config so the `local` model `model_id` matches your installed model, or add your hosted model with `api_key_env`.
4. Run `raw --agent raw "Explain the tests in this repository"` from the project folder.
5. Run `raw` alone to open the saved REPL and continue the work.

### Prompt to paste into your agent

```text
Install the Raw agent harness from the repo lploc94/raw-cli, set up a configured agent on the model <model-id> at <base-url>, and run it with the task "Explain the tests in <repo-path>". Expected output: a plain-text explanation of the test files. Verify that the run finished with a model answer and no configuration error.
```

### Caveat

Tool calls run automatically with your OS account's full permissions, and cwd is not a sandbox, so add tools.rules for risky commands before pointing the agent at sensitive folders.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lploc94-raw-cli/build-coding-agent-on-own-model/

## How to fork a built-in tool to change how it works with Raw CLI

Repo: [lploc94/raw-cli](https://github.com/lploc94/raw-cli) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Copy the shipped bash tool, rename it, and change its behavior for one agent.

**Who it is for:** A team lead whose agent needs a shell tool that behaves differently, such as a stricter wrapper or a team-specific default.

**The problem:** Built-in tools are fixed in most harnesses, so custom behavior usually means forking the whole product.

**The 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

1. Run `npm install -g @tlelabs/raw` if Raw is not installed yet.
2. Copy the example folder `examples/tools/bash/` to `~/.config/raw/tools/my_bash/`.
3. Change the manifest `id` and `name` in the copied folder, then edit its `index.mjs` as needed.
4. In your agent's `tools.use` list, replace `builtin/bash` with `local/my_bash`.
5. Run `raw --agent raw "Run the test suite"` and check that the output shows your tool's behavior. (inferred, check the README)

### Prompt to paste into your agent

```text
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.
```

### 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.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lploc94-raw-cli/fork-builtin-tool-for-custom-behavior/

## How to package an agent so teammates can install it with Raw CLI

Repo: [lploc94/raw-cli](https://github.com/lploc94/raw-cli) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Export a configured agent with its tools and skills as a .rawpkg for your team.

**Who it is for:** A team lead who built a project helper agent and needs coworkers on other machines to run the same tools and skills with their own model.

**The problem:** Setting up the same agent on each teammate's machine by hand means repeated copying of tools, skills and settings.

**The outcome:** A .rawpkg archive that a teammate installs and binds to their own model alias, keeping the same agent behavior.

### Steps

1. Run `raw package export --agent NAME --name @owner/name --version 1.0.0 --out DIR`.
2. Run `raw package pack DIR --out FILE.rawpkg`.
3. Send FILE.rawpkg to the teammate and have them run `raw package install FILE.rawpkg --as kit`.
4. Have the teammate run `raw agent add NAME --from pkg/kit/agents/EXPORT --model MODEL_ALIAS` with their own model alias.
5. Run `raw --agent NAME "task"` on the recipient machine to confirm it works. (inferred, check the README)

### Prompt to paste into your agent

```text
Export the configured agent <agent-name> from the repo lploc94/raw-cli as a package named @<owner>/<name> version 1.0.0, pack it into <file>.rawpkg, and list the steps the recipient needs to bind their own model. Expected output: a packed .rawpkg file and a short recipient checklist. Verify the package file exists and contains no literal API keys.
```

### Caveat

Updates keep the recipient's local model binding, but the README does not describe how credentials are handled beyond the api_key_env and api_key fields.

Risk, credentials: Do not pack a literal api_key value into the package; the recipient should set their own credentials through api_key_env or their own config.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lploc94-raw-cli/share-project-helper-agent-as-package/

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

Repo: [lploc94/raw-cli](https://github.com/lploc94/raw-cli) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

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

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

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

**The outcome:** An agent that runs normal commands freely and pauses for approval when a bash command matches the rule.

### 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 to paste into your agent

```text
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.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/lploc94-raw-cli/require-approval-for-risky-shell-commands/
