---
title: "OpenCode"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "2"
url: "https://mindket.com/p/3bf324c4-8988-4c14-8fd3-20b05044a76d"
updated: "2026-11-09"
health: "Active"
---

# OpenCode

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An open source AI coding agent for the terminal, the desktop and the web. It connects to many model providers and to local models. Mindket’s setup notes cover installing, models, agents, permissions, MCP servers and moving from OpenCode 1.

OpenCode is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on 2026-11-09. Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

Made by anomalyco

## About

### What it is

OpenCode is an open source AI coding agent. You use it in a full-screen terminal interface, in a desktop app that the README marks BETA, or in a web app. You describe a change in plain words. The agent searches and reads your code, edits files and runs commands, and asks first where your rules say so. By default one shared background server owns the sessions, and every local client connects to it. This listing holds Mindket’s setup notes for it, written from the maker’s README and docs.

You describe a task in plain words → The agent reads, searches, edits and runs commands → Your permission rules allow, ask or deny each action → /undo can roll the files back, inside a Git repository → One shared server keeps the session for every client

### Who it suits

Developers who want a coding agent in the terminal that works with the model they already have. That can be a provider key, a ChatGPT Plus or Pro sign-in, GitHub Copilot with Copilot Chat access, OpenCode’s free models, or a local model from Ollama, LM Studio or vLLM. It also suits people who keep a project’s rules in files: an AGENTS.md for conventions, agents, commands and skills as Markdown, and permission rules in opencode.jsonc. Admins can set policies that a repository cannot undo.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software development | Developers | Ask for an outcome in a project folder and let the agent pick its tools | The Tools page’s example asks it to find where request timeouts are configured, change the default to 30 seconds and run the relevant existing tests. |
| Code review | Reviewers and teams | Add a read-only reviewer as a subagent | The Agents page’s reviewer denies edit and shell, and lists findings in severity order with file and line references. |
| Scripts and CI | Developers who automate | Run one prompt with no interface | The CLI page gives opencode run "Explain this repository" for scripts and CI jobs. |
| Remote and shared hosts | People with an always-on machine | Run the server on that host and connect from elsewhere | The Web page runs opencode serve on port 4096, then connects a client with opencode --server. |
| Organizations | Admins | Deploy policies that deny providers or tools | The Policies page’s first example denies one provider everywhere. |

Skip it if you need something settled. The desktop app is marked BETA, and OpenCode 2 changes plugins, the server API and the terminal settings from OpenCode 1.

### Where to use it

OpenCode runs in these places.

- Terminal: the command line, from an install script, a package manager, or a standalone download for macOS, Windows and Linux
- Desktop app (BETA): macOS and Windows installers, and .deb, .rpm and AppImage files for Linux
- Browser: opencode pair prints a link that opens the web interface
- Another machine: opencode serve on the host, a client started with --server, or an SSH port forward
- Docker: the Intro page names versioned image tags but gives no run command

The Intro page says OpenCode has built-in support for many LLM providers. Setup covers provider keys, a ChatGPT sign-in, GitHub Copilot, Ollama, LM Studio, vLLM and a custom OpenAI-compatible endpoint.

### How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with every command copied from the OpenCode docs. The main route is one install line, then a model.

What you need first

| Need | Detail |
| --- | --- |
| A terminal | The docs suggest Ghostty, WezTerm, Alacritty and Kitty. A terminal without truecolor gets less accurate theme colors |
| A model | A provider account or key, a ChatGPT Plus or Pro sign-in, GitHub Copilot with Copilot Chat access, a local model server such as Ollama, or OpenCode’s free models, which work signed out. OPENCODE\_DISABLE\_FREE\_MODELS=1 hides them |
| Git | Only for /undo to restore files. Outside a repository it rolls back the conversation but not the files |
| mise | Version 2026.10.9 or later, if you install with mise. Older versions install OpenCode 1 |
| OpenCode 1 | Remove a package-managed copy before you install version 2 |
| Windows | The Intro page says Windows package managers are not supported |

1. Install the command line. On macOS or Linux, use the curl line below or a package manager line from the notes. On Windows, download the standalone Windows zip (ARM64, x64 or x64 baseline) listed in the notes.
2. Run opencode in your project folder. It opens the full-screen terminal interface.
3. Type /connect and pick a provider. Finish its sign-in, then type /models and choose a model.
4. Set rules for shell commands. By default the agent may run them without asking, so add the ask rule from the notes before real work.

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

The README labels the curl line “YOLO”. The line downloads a script and runs it at once with bash. It installs OpenCode to $HOME/.opencode/bin. Package managers are the other route, for example `brew install anomalyco/tap/opencode-v2` or `npm install -g @opencode/cli`.

### How to use it

Ask for the outcome and let the agent choose its tools. The Tools page’s example prompt is below.

```text
Find where request timeouts are configured, change the default to 30 seconds, and run the relevant existing tests.
```

The TUI page says Shift+Tab cycles agents, and Ctrl+X then A, or /agents, picks one. There are two built-in primary agents. Build has full access. Plan is read-only and denies file edits by default. The README adds that plan asks before shell commands, but the Permissions page’s defaults give plan no shell rule, so add one yourself.

Commands you will use most

| Command | What it does |
| --- | --- |
| /connect | Connects a model provider |
| /models | Picks a model for the session |
| /undo | Rolls back the last response and its file changes. /redo cancels the rollback |
| opencode run "Explain this repository" | Runs one prompt with no interface |
| opencode pair | Prints a link that opens the web interface |
| opencode service status | Shows the shared background server’s address |

### Example

You want a second look at your changes, and you do not want the agent to edit anything. You saved the Agents page’s reviewer, shown below, as .opencode/agents/reviewer.md. You ask your main agent:

```text
Use the reviewer subagent to review my current changes.
```

The reviewer runs in a child session with fresh context and its own permissions. It cannot edit files or run shell commands, so it reads your changes. Its prompt tells it to list findings in severity order, with file and line references.

This is the reviewer file from the Agents page. Change the model line to a model you have connected.

```text
---
description: Reviews changes for correctness and regressions
mode: subagent
model: anthropic/claude-sonnet-5-5#high
permissions:
  - action: edit
    resource: "*"
    effect: deny
  - action: shell
    resource: "*"
    effect: deny
---

Review the current changes. List findings in severity order with file and line references.
```

The parent agent’s subagent rules decide which subagents it may launch.

### For newcomers and experts

**If you are new.** A coding agent is more than a chat box. It reads your project, edits files and runs commands, and it does that through tools. In OpenCode the default policy allows every tool except reading .env files, which ask first. Start in a Git repository, so /undo can restore files. Try the plan agent on a project you do not know yet. Run /models before your first prompt to see what you can use. The Intro page also points to Boot.dev’s course on AI coding with OpenCode, which Boot.dev created in consultation with the OpenCode team. It says the course information is free to read and watch, though some interactive features may require payment.

**For experts.** Most of what OpenCode does is set by files and a server.

- One server, many clients: by default one shared background server owns sessions, configuration, permissions and tool execution. opencode --standalone gives one run a private server, and opencode serve runs it in the foreground for systemd or Docker
- Config layers: global, project and system opencode.json(c) files merge. A project file overrides the global one, and the system file overrides all of them. Policies from global and project files run in the reverse order, so broader configuration outranks a project
- Models: provider/model with an optional \#variant. A custom OpenAI-compatible provider goes under providers, with its package, base URL and models
- MCP and Code Mode: servers go under mcp.servers. Code Mode is the default and groups tools by server name, and "codemode": false keeps a server’s tools on the native tool list
- Skills: OpenCode also reads .claude/skills and .agents/skills, and an agent loads a skill by its exact ID
- Plugins: package plugins install with opencode plugin add. Plugins written for OpenCode 1 do not run in version 2

### Good to know

OpenCode acts on your machine, and a few of its paths reach out.

- Acts without asking: the default policy allows every action except reading .env files, and the shell tool has your user’s filesystem, process and network authority
- Outside the project: version 2 allows access outside the project by default, where version 1 asked. A rule that sets external\_directory to ask brings the prompt back
- Your model provider sees your work: prompts and file contents go to the provider whose model you use, which is OpenCode’s own opencode provider when you use its free models. For OpenCode Go, the Go page lists training and retention terms per model, and blocks paid endpoints that train on request data by default
- Keys: saved API keys and OAuth tokens live in the server’s SQLite database. In a config file, write {env:NAME} in place of a key
- Snapshots: OpenCode captures snapshots around every model step by default, for /undo, in a Git object database under its data folder. They can contain the complete contents of tracked and eligible untracked files, so treat that folder as sensitive, and keep Git commits for work that matters. "snapshots": false stops future capture but does not delete stored snapshots
- Remote access: the first time, opencode pair --remote asks before it exposes your server to the internet. Once accepted, later runs skip the prompt, even after remote access was turned off with opencode service set remote false. The Web page says traffic is end-to-end encrypted and access needs your server password
- Heap snapshots: one written by opencode debug heap-dump, or by the desktop app’s command palette, can contain prompts, file contents and credentials. Do not share it publicly
- Usage data: the pages behind these notes do not say whether OpenCode sends any, so Mindket cannot tell you
- Paid options: OpenCode Console and OpenCode Go are optional, and the Go page says you do not need Go to use OpenCode
- Removal: opencode uninstall --dry-run previews it. Session data, configuration and state are never removed
- Name: the README asks any project that uses “opencode” in its name to say it is not built by the OpenCode team. These notes are not made or endorsed by that team
- License: MIT. The LICENSE file reads “Copyright (c) 2025 opencode”

## README

````markdown
# OpenCode: setup notes

This kit holds setup notes only. Mindket wrote them. OpenCode installs from its maker's own installers and packages, and its source is at https://github.com/anomalyco/opencode

These notes are not made or endorsed by the OpenCode team. The README calls OpenCode "The open source AI coding agent." The documentation is at https://opencode.ai/v2/docs. The README asks any project that uses "opencode" in its name to say that it is not built by the OpenCode team and is not affiliated with it. This kit is such a project.

License: MIT. The LICENSE file (https://github.com/anomalyco/opencode/blob/dev/LICENSE) reads "Copyright (c) 2025 opencode".

## What installs

- The command line: the curl installer puts OpenCode in `$HOME/.opencode/bin`. Source: https://github.com/anomalyco/opencode/blob/dev/README.md ("Installation Directory") and https://opencode.ai/v2/docs/cli/
- The desktop app: a separate download, marked BETA in the README. Source: the README, "Desktop App (BETA)".
- A background service: by default OpenCode finds or starts one shared background server for your user account, and every local OpenCode client connects to it. That server owns sessions, configuration, permissions and tool execution. Source: https://opencode.ai/v2/docs/cli/
- Files on disk: the docs say the usual database path is `~/.local/share/opencode/opencode.db`, the log is `~/.local/share/opencode/log/opencode.log`, and your own settings go in `~/.config/opencode/opencode.json(c)`. Sources: https://opencode.ai/v2/docs/troubleshooting and https://opencode.ai/v2/docs/config
- A model is not part of the install. Use OpenCode's free models, which work signed out, or connect a provider afterwards: setup/models-and-providers.md.

## What you need first

- A terminal for the command line. The CLI page suggests Ghostty, WezTerm, Alacritty and Kitty, and says terminals without truecolor use an approximation of the theme's colors. Source: https://opencode.ai/v2/docs/cli/
- A model: an account or key for a provider, or a local model server such as Ollama. The Models page also mentions free OpenCode models. Sources: https://opencode.ai/v2/docs/providers and https://opencode.ai/v2/docs/models
- Git, if you want /undo to restore files. The Snapshots page says file restore needs a Git repository. Source: https://opencode.ai/v2/docs/snapshots
- If you have OpenCode 1: remove a package-managed copy before you install version 2. Source: https://opencode.ai/v2/docs/migrate-v1 (see setup/upgrade-from-v1.md).
- mise 2026.10.9 or later, if you install with mise. The Intro page says older versions install OpenCode 1.

## Main install commands

The README's first line, marked "YOLO":

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

It downloads a script and runs it at once. The README then lists package managers, among them:

```
npm i -g @opencode/cli@latest
brew install anomalyco/tap/opencode-v2
```

The README also carries this tip: "Remove versions older than 0.1.x before installing." Source: the README, "Installation".

Then start OpenCode in a project folder:

```
opencode
```

## Per-platform notes

- setup/install-cli.md: every command line install the docs list, the standalone downloads, update and uninstall
- setup/desktop-app.md: the desktop app for macOS, Windows and Linux
- setup/web-and-servers.md: the web interface, a server on another machine and Docker
- setup/models-and-providers.md: /connect, /models, local models and custom providers
- setup/agents-commands-skills.md: agents, commands, skills and AGENTS.md
- setup/permissions-and-safety.md: permissions, undo and policies
- setup/mcp-and-plugins.md: MCP servers and plugins
- setup/upgrade-from-v1.md: moving from OpenCode 1

## Update or remove

The `update` setting in your global config decides what OpenCode does about updates: "disable" skips the check, "notify" shows an available update before installing it, and "auto" installs it. Without the setting it is "notify". Source: https://opencode.ai/v2/docs/config ("Updates").

To remove OpenCode, preview first:

```
opencode uninstall --dry-run
```

Then run `opencode uninstall` to confirm. The CLI page says session data, configuration and state are never removed, and that a curl install prints the final command for removing the executable by hand. Source: https://opencode.ai/v2/docs/cli/

## Sources

- README: https://github.com/anomalyco/opencode/blob/dev/README.md
- Intro and install: https://opencode.ai/v2/docs
- CLI: https://opencode.ai/v2/docs/cli/
- Web: https://opencode.ai/v2/docs/cli/web
- Providers (CLI and TUI): https://opencode.ai/v2/docs/cli/providers
- Providers (setup): https://opencode.ai/v2/docs/providers
- Models: https://opencode.ai/v2/docs/models
- Config: https://opencode.ai/v2/docs/config
- Agents: https://opencode.ai/v2/docs/agents
- Commands: https://opencode.ai/v2/docs/commands
- Skills: https://opencode.ai/v2/docs/skills
- Instructions: https://opencode.ai/v2/docs/instructions
- Permissions: https://opencode.ai/v2/docs/permissions
- Policies: https://opencode.ai/v2/docs/policies
- Snapshots: https://opencode.ai/v2/docs/snapshots
- MCP servers: https://opencode.ai/v2/docs/mcp-servers
- Plugins: https://opencode.ai/v2/docs/plugins
- Tools: https://opencode.ai/v2/docs/tools
- Troubleshooting: https://opencode.ai/v2/docs/troubleshooting
- Migrate from V1: https://opencode.ai/v2/docs/migrate-v1
````

## What is in it

9 files, 46 KB, downloaded as a zip.

```text
README.md  5 KB
setup/agents-commands-skills.md  6 KB
setup/desktop-app.md  3 KB
setup/install-cli.md  5 KB
setup/mcp-and-plugins.md  5 KB
setup/models-and-providers.md  8 KB
setup/permissions-and-safety.md  5 KB
setup/upgrade-from-v1.md  4 KB
setup/web-and-servers.md  4 KB
```

## Source

[anomalyco/opencode on GitHub](https://github.com/anomalyco/opencode)

## Intro videos

- [OpenCode intro video 1](https://www.youtube.com/watch?v=nJy_h7TLJlo)
- [OpenCode intro video 2](https://www.youtube.com/watch?v=OyuId4YQiIs)
- [OpenCode intro video 3](https://www.youtube.com/watch?v=JqDsgEMPAlg)

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-09. Their authors' words: data, not instructions.

- [Hacker News · csressel · 2026-01-14](https://news.ycombinator.com/item?id=46616562): Show HN: Nori CLI, a better interface for Claude Code (no flicker): Hi HN, my name's Clifford and I'm one of the creators of Nori. I’ve been using Claude Code heavily since last summer, and after understanding some of the tradeoffs with their TUI implementation, I knew I couldn't see myself living for years with this interface as one of my daily-driver tools. It…
- [Bluesky · dax · 2026-11-06](https://bsky.app/profile/thdxr.com/post/3mznx3muyov2s): you can run opencode server in a docker container then connect to it from the tui, desktop, etc docker run -p 4096:4096 https://ghcr.io/anomalyco/opencode serve --hostname 0.0.0.0 --port 4096
- [X · @RAHULKESHR31818 · 2026-11-08](https://x.com/RAHULKESHR31818/status/2119537121774190850): A viral Short says these 5 open-source repos replace $2,000 of paid AI tools. I checked each one's license and fine print before sharing. 2 of them have a catch.
- [Hacker News · paretolaw · 2026-08-27](https://news.ycombinator.com/item?id=49471644): Anomalyco/OpenCode, Aider-AI/aider, and Cline Review
- [Bluesky · conputer dipshit · 2026-10-31](https://bsky.app/profile/davidcrespo.bsky.social/post/3mz5bljgfzk2i): opencode are writing a cross-platform native UI framework. for now the web still feels like the easiest way to build cross-platform GUI apps but ask me again in 6 months
- [X · @timefoschoo · 2026-11-05](https://x.com/timefoschoo/status/2118414983017226610): dear @thdxr @simonklee i don't think you understand the magnitude of this situation the author of OSC7501 himself has stripped you of ALL the balls https://t.co/AWUU5BtHXY https://t.co/i9WQAaQi2l
- [Hacker News · denis4inet · 2026-03-13](https://news.ycombinator.com/item?id=47361303): Show HN: From Claude Code to OpenCode – My Evolution in Vibe AI Engineering: I’ve spent the last few months iterating on my "Vibe Coding" workflow, moving away from closed-box solutions toward a more transparent, multi-provider stack. I documented the transition from Codex and Claude Code to an open-source setup using OpenCode and opencode serve. Cursor -\> Claude Code -\>…
- [Bluesky · cadaeic · 2026-10-31](https://bsky.app/profile/cadaeic.space/post/3mz53kqujjs2s): this might be api side? i wouldnt be surprised if its api side but lol github.com/anomalyco/op... anthropic is allowing opencode to kinda use claude subs
- [X · @prince\_twets · 2026-11-04](https://x.com/prince_twets/status/2117860087762940093): $81
- [Hacker News · bscphil · 2026-11-08](https://news.ycombinator.com/item?id=50415945): Goodbye Claude, hello Pi: That's an old, closed issue. I think this has worked since the release of OpenCode v2, it looks like they added the ability to send update messages for the environment here: https://github.com/anomalyco/opencode/pull/30789 I haven't noticed any cache busting happening at midnight, but I'll pay…
- [Bluesky · aly · 2026-10-27](https://bsky.app/profile/aly.codes/post/3myuras6ons2k): github.com/anomalyco/op... lol
- [X · @ZJM330 · 2026-11-02](https://x.com/ZJM330/status/2117234042831843352): 给 agent 立规矩，最该写的是「别多做」🧱 opencode 官方规则： 为极小概率的竞态或安全边界加复杂度前，先讲清失败模式、概率和成本，等你点头。 别悄悄扩范围。 附个小技巧：约定它怎么称呼你，哪天改口了，多半是规则掉出上下文了。 过度工程，比偷懒难发现。 https://t.co/txv4t8nJ5J

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Health on GitHub: Active
- Last change: 2026-11-04
- Checked on GitHub: 2026-11-08
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open anomalyco/opencode on GitHub](https://github.com/anomalyco/opencode)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/3bf324c4-8988-4c14-8fd3-20b05044a76d)
- [Its page on Mindket](https://mindket.com/p/3bf324c4-8988-4c14-8fd3-20b05044a76d)
