Mindket

OpenCode

Newversion 2 · updated
Star225k

Overview

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 . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • 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
Start with
curl -fsSL https://opencode.ai/v2/install | bash
opencode

Platform

OpenCodeCoding agent
macOSOperating system
WindowsOperating system
LinuxOperating system
DockerContainer
ChatGPTAI chat

And 1 more in Where to use it

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.

  1. You describe a task in plain words
  2. The agent reads, searches, edits and runs commands
  3. Your permission rules allow, ask or deny each action
  4. /undo can roll the files back, inside a Git repository
  5. 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
IndustryWho uses itHow they use itExample
Software developmentDevelopersAsk for an outcome in a project folder and let the agent pick its toolsThe 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 reviewReviewers and teamsAdd a read-only reviewer as a subagentThe Agents page’s reviewer denies edit and shell, and lists findings in severity order with file and line references.
Scripts and CIDevelopers who automateRun one prompt with no interfaceThe CLI page gives opencode run "Explain this repository" for scripts and CI jobs.
Remote and shared hostsPeople with an always-on machineRun the server on that host and connect from elsewhereThe Web page runs opencode serve on port 4096, then connects a client with opencode --server.
OrganizationsAdminsDeploy policies that deny providers or toolsThe 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
NeedDetail
A terminalThe docs suggest Ghostty, WezTerm, Alacritty and Kitty. A terminal without truecolor gets less accurate theme colors
A modelA 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
GitOnly for /undo to restore files. Outside a repository it rolls back the conversation but not the files
miseVersion 2026.10.9 or later, if you install with mise. Older versions install OpenCode 1
OpenCode 1Remove a package-managed copy before you install version 2
WindowsThe 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.
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.

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
CommandWhat it does
/connectConnects a model provider
/modelsPicks a model for the session
/undoRolls back the last response and its file changes. /redo cancels the rollback
opencode run "Explain this repository"Runs one prompt with no interface
opencode pairPrints a link that opens the web interface
opencode service statusShows 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:

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.

---
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 and files

README

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

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

Files
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

9 files, 46 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

csresselShow 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…37 points · 9 repliesdaxyou 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 409625 likes · 1 reply@RAHULKESHR31818A 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.paretolawAnomalyco/OpenCode, Aider-AI/aider, and Cline Review1 point · 3 repliesconputer dipshitopencode 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 months9 likes · 1 reply@timefoschoodear @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/i9WQAaQi2ldenis4inetShow HN: From Claude Code to OpenCode – My Evolution in Vibe AI EngineeringI’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 ->…2 pointscadaeicthis 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 subs6 likes · 1 reply@prince_twets$81bscphilGoodbye Claude, hello PiThat'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…alygithub.com/anomalyco/op... lol3 likes@ZJM330给 agent 立规矩,最该写的是「别多做」🧱 opencode 官方规则: 为极小概率的竞态或安全边界加复杂度前,先讲清失败模式、概率和成本,等你点头。 别悄悄扩范围。 附个小技巧:约定它怎么称呼你,哪天改口了,多半是规则掉出上下文了。 过度工程,比偷懒难发现。 https://t.co/txv4t8nJ5J

Searched

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Developer

See all in Developer

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k