## Introduction

With the advancement of AI-assisted development environments, developer productivity has dramatically improved. Among the growing demand for development support tools leveraging GitHub Copilot, `opencode` and `oh-my-opencode` are particularly noteworthy tools.

This article explains how to install `opencode` and its extension tool `oh-my-opencode` in a WSL environment, and utilize various AI models such as Claude Sonnet 4.5 and GPT-5.2 as agents. This enables you to use multiple AI models according to different purposes and maximize development efficiency.

## What is opencode?

`opencode` is a command-line tool that allows you to directly use AI assistants from the terminal. It integrates with various AI providers including GitHub Copilot, supporting tasks such as code generation, refactoring, and documentation.

## Features of oh-my-opencode

`oh-my-opencode` is a framework that extends `opencode` and enables management and customization of multiple AI agents. It can automatically select and execute the optimal AI model according to the project nature and work content.

Key features include:

- **Multi-agent management**: Configure multiple AI models by purpose
- **Automated task execution**: Automate from planning to code generation
- **Flexible permission settings**: Fine-grained control over file editing and command execution permissions

## Installation Steps

### Prerequisites

This procedure assumes the following environment:

- WSL (Windows Subsystem for Linux) is installed
- GitHub Copilot subscription is active
- Internet connection is available

### 1. Installing opencode

Open a WSL terminal and execute the following command:

```bash
curl -fsSL https://opencode.ai/install | bash
```

This script installs the necessary dependencies and adds the `opencode` command to your system. After installation is complete, start a new shell session or reload the path with the following command:

```bash
source ~/.bashrc
```

Next, launch `opencode`:

```bash
opencode
```

After launch, when the prompt appears, enter the `/connect` command and select **GitHub Copilot** as the provider. Follow the on-screen instructions to complete authentication, establishing the connection with GitHub Copilot.

### 2. Installing oh-my-opencode

With `opencode` running, enter the following command:

```text
Install and configure by following the instructions here https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/README.md
```

This command executes the automated setup described in the `oh-my-opencode` README. Follow the prompts to complete the necessary configuration.

### 3. Configuring Individual AI Models

In `oh-my-opencode`, you can specify the AI model to use for each agent. This allows you to leverage the optimal model according to the task.

The configuration file path is as follows:

```text
~/.config/opencode/oh-my-opencode.json
```

Open this file in a text editor and edit it based on the following content:

```json
{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
  "experimental": {
    "auto_resume": true
  },
  "google_auth": false,
  "sisyphus_agent": {
    "default_builder_enabled": true,
    "planner_enabled": true
  },
  "agents": {
    "Sisyphus": {
      "model": "github-copilot/claude-opus-4.5"
    },
    "oracle": {
      "model": "github-copilot/gpt-5.2"
    },
    "librarian": {
      "model": "github-copilot/grok-code-fast-1"
    },
    "explore": {
      "model": "github-copilot/gemini-3-flash-preview"
    },
    "frontend-ui-ux-engineer": {
      "model": "github-copilot/gemini-3-pro-preview"
    },
    "document-writer": {
      "model": "github-copilot/gemini-3-pro-preview"
    },
    "multimodal-looker": {
      "model": "github-copilot/gemini-3-flash-preview"
    },
    "*": {
      "permission": {
        "edit": "allow",
        "webfetch": "allow",
        "doom_loop": "allow",
        "external_directory": "allow",
        "bash": {
          "*": "allow",
          "git": "allow",
          "rm": "ask"
        }
      }
    }
  }
}
```

Here's an explanation of each agent's configuration:

- **Sisyphus**: Handles complex development tasks and planning. Uses Claude Opus 4.5
- **oracle**: Handles advanced reasoning and problem-solving. Uses GPT-5.2
- **librarian**: Handles code search and documentation reference. Uses Grok Code Fast 1
- **explore**: Handles exploratory research and verification. Uses Gemini 3 Flash Preview
- **frontend-ui-ux-engineer**: Handles frontend development and UI/UX design
- **document-writer**: Handles documentation creation and article writing

In the permission settings (`permission`), rules are defined for when each agent performs file editing, web fetching, and external command execution. Setting only the `rm` command to `ask` helps prevent accidental deletions.

### 4. Installing Dependencies

`oh-my-opencode` agents use `tmux` to manage terminal sessions. Install it with the following command:

```bash
sudo apt install tmux
```

By installing `tmux`, agents can execute multiple terminal sessions in parallel and process tasks efficiently.

## Verification

After installation is complete, verify the operation with the following steps:

1. Launch `opencode`:

```bash
opencode
```

2. At the prompt, enter a command to invoke an agent (e.g., `@Sisyphus Execute the task`).

3. Verify that the agent responds normally and the configured model (e.g., `github-copilot/claude-opus-4.5`) is being used.

4. Check the logs to ensure no errors have occurred.

## Troubleshooting

### When Model is Not Found

Verify that the model identifier specified in the configuration file is correct. Since models available via GitHub Copilot are updated regularly, you need to check for the latest information.

Access [Models.dev](https://models.dev/?search=github-copilot), search for `github-copilot`, and obtain the latest model identifiers. Then update the `oh-my-opencode.json` file and restart `opencode`.

### When Authentication Error Occurs

GitHub Copilot authentication may have failed. Try re-authenticating with the following steps:

1. Launch `opencode` and disconnect the provider with the `/disconnect` command.
2. Execute the `/connect` command again, select GitHub Copilot, and complete authentication.

### When tmux is Not Found

If `tmux` is not installed, agents will not work properly. Complete the installation with the command mentioned earlier.

## Summary

This article explained the installation steps for `opencode` and `oh-my-opencode` in a WSL environment. By utilizing these tools, you can use multiple AI models via GitHub Copilot and significantly improve development efficiency.

By assigning appropriate models to each agent, you can receive optimal support according to the task. Please try using them in your actual projects.

## Related Links

- [oh-my-opencode (GitHub)](https://github.com/code-yeongyu/oh-my-opencode/blob/dev/README.md)
- [opencode Official Site](https://opencode.ai)
- [Models.dev - GitHub Copilot Model List](https://models.dev/?search=github-copilot)
