# AI use cases for Opencode (anomalyco/opencode)

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Use cases: 5 | Page: https://dedupedai.com/use-cases/anomalyco-opencode/

OpenCode is an open source AI coding agent that runs as a command-line tool and as a beta desktop app.

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

- Explore an unfamiliar codebase without risking edits: https://dedupedai.com/use-cases/anomalyco-opencode/explore-unfamiliar-codebase-read-only/
- Hand multistep code searches to a subagent: https://dedupedai.com/use-cases/anomalyco-opencode/delegate-multistep-code-search/
- Build a code change with the default full-access agent: https://dedupedai.com/use-cases/anomalyco-opencode/build-feature-with-full-access-agent/
- Install the OpenCode desktop app for daily use: https://dedupedai.com/use-cases/anomalyco-opencode/install-desktop-app-without-terminal/
- Install OpenCode into a chosen directory on a shared machine: https://dedupedai.com/use-cases/anomalyco-opencode/install-opencode-to-chosen-directory/

## How to explore an unfamiliar codebase without risking edits with Opencode

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use the read-only plan agent to map a new repo and plan changes before touching any files.

**Who it is for:** A developer who just joined a project or inherited a repo and needs to understand it before changing anything.

**The problem:** Pointing a coding agent at unknown code is risky when it can edit files or run commands right away.

**The outcome:** A written summary of how the codebase is structured and a short change plan, with no files edited.

### Steps

1. Run `npm i -g @opencode/cli@latest` (or use `brew install anomalyco/tap/opencode-v2` on macOS and Linux).
2. Change into the project folder and start OpenCode with `opencode`. (inferred, check the README)
3. Press the `Tab` key until the plan agent is selected.
4. Ask it to map the main modules, entry points, and how the tests are run.
5. Ask for a step-by-step plan for your change and review it before switching to the build agent.

### Prompt to paste into your agent

```text
Using the OpenCode repo at anomalyco/opencode, start the plan agent in <project-path> and ask it to summarize the code structure and list the files that would need changes for <task>. Expected output: a structured summary plus a numbered change plan. Verify that no files were edited, since the plan agent denies file edits by default.
```

### Caveat

The README names the plan and build agents but does not say which models or providers they use, so check Opencode.ai/docs before relying on a specific setup.

Risk, credentials: Any model or provider credentials you configure for OpenCode are used by the agent, so keep them out of shared project files.

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/anomalyco-opencode/explore-unfamiliar-codebase-read-only/

## How to hand multistep code searches to a subagent with Opencode

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Call the built-in general subagent with @general to run complex searches across a repo.

**Who it is for:** A developer tracing a bug or behavior across many files who does not want to run each search by hand.

**The problem:** Complex searches across a repo take many steps, and it is slow to do each one manually.

**The outcome:** The general subagent returns the search results it found, so you can decide the next change.

### Steps

1. Run `npm i -g @opencode/cli@latest`.
2. Change into the project folder and start OpenCode with `opencode`. (inferred, check the README)
3. Type a message that starts with `@general` and describe the search, for example where a setting is read and written.
4. Review the results it returns and ask follow-up questions in the same session.

### Prompt to paste into your agent

```text
In the anomalyco/opencode CLI, send a message beginning with @general asking it to find every place <symbol-or-setting> is read or written in <project-path>. Expected output: a list of file paths and line references with a one-line note on each. Verify by opening two of the listed files and confirming the references match.
```

### Caveat

The README says the general subagent is used internally, so do not expect a documented way to configure it beyond invoking it with @general.

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/anomalyco-opencode/delegate-multistep-code-search/

## How to build a code change with the default full-access agent with Opencode

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use the build agent, the default, to make changes in a project after reviewing a plan.

**Who it is for:** A developer ready to implement a change that has already been scoped.

**The problem:** Writing and running the change across several files takes time, and an agent with full access can do it faster when pointed at a clear goal.

**The outcome:** The requested change applied to the project, which you then review with your normal tools.

### Steps

1. Run `npm i -g @opencode/cli@latest`.
2. Change into the project folder and start OpenCode with `opencode`. (inferred, check the README)
3. Confirm the build agent is selected, since it is the default; press `Tab` to switch if the plan agent is active.
4. Describe the change and the files or behavior it should affect.
5. Review every diff with your version control tool before committing.

### Prompt to paste into your agent

```text
Using the anomalyco/opencode build agent in <project-path>, implement <change description> and summarize the files you edited. Expected output: a list of changed files and a one-paragraph explanation. Verify by running the project's own test command yourself and reviewing the diff before committing.
```

### Caveat

The README describes the build agent as full access but does not list safeguards for it, so review its edits and commands yourself.

Risk, credentials: The build agent has full access, so it can read any files in the project folder, including secrets stored there.

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/anomalyco-opencode/build-feature-with-full-access-agent/

## How to install the OpenCode desktop app for daily use with Opencode

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Download the beta desktop app for your platform and open it without using a terminal.

**Who it is for:** A developer or team member who prefers a graphical app over the command line.

**The problem:** Not everyone wants to set up a command-line tool just to use an AI coding agent.

**The outcome:** The OpenCode desktop app running on your computer, ready to use.

### Steps

1. Open Opencode.ai/download in your browser.
2. Download the file for your platform from the table: a `.dmg` for macOS, a `.exe` for Windows, or a `.deb`, `.rpm`, or `.AppImage` for Linux.
3. On macOS you can alternatively run `brew install --cask opencode-desktop`.
4. Open the installed app and complete its first-run steps.

### Prompt to paste into your agent

```text
Install the OpenCode desktop app from opencode.ai/download for <platform> in the anomalyco/opencode project. Expected output: the app launches and shows its main window. Verify that the installed version matches the download you chose for your architecture (Apple Silicon or Intel on macOS).
```

### Caveat

The README marks the desktop app as BETA, so expect it to change and check the download page for the latest build.

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/anomalyco-opencode/install-desktop-app-without-terminal/

## How to install OpenCode into a chosen directory on a shared machine with Opencode

Repo: [anomalyco/opencode](https://github.com/anomalyco/opencode) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Use the install script with OPENCODE_INSTALL_DIR to place the binary where you want it.

**Who it is for:** A systems administrator or developer setting up OpenCode on a shared Linux or macOS machine where the install location must be controlled.

**The problem:** The default install path may not match where a team keeps shared tools, so the binary needs to go somewhere specific.

**The outcome:** The Opencode binary installed in your chosen directory and ready to run from the command line.

### Steps

1. Review the install script at Opencode.ai/v2/install before running it.
2. Run `OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/v2/install | bash` (replace the path with your own directory).
3. Make sure the directory is on your PATH, then confirm the install location.
4. Run `opencode` from a new terminal to confirm it starts. (inferred, check the README)

### Prompt to paste into your agent

```text
Install OpenCode from the anomalyco/opencode install script into <install-directory> by setting OPENCODE_INSTALL_DIR. Expected output: an opencode binary in that directory. Verify with the install directory check you choose, and confirm that no earlier install takes precedence on the PATH.
```

### Caveat

The README lists the install directory priority order, but it does not say what the script changes beyond placing the binary, so check the script before running it.

Risk, remote script: This pipes a script from Opencode.ai straight into bash, so read the script first and only run it on machines where you accept that code.

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/anomalyco-opencode/install-opencode-to-chosen-directory/
