Install OpenCode on Mac with Homebrew

An open-source coding agent for the terminal that works with any model. It's our pick among AI apps for Mac.

How to install OpenCode

$ brew install opencode

Paste it into Terminal. Don’t have Homebrew yet? Install it first:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Official site: opencode.ai

Set up the rest of your Mac too

Add OpenCode to a Dock of the apps most people install on a new Mac, then copy one command that installs all of them.

Add OpenCode to my Dock

Alternatives to OpenCode

  • Claude

    Our pickHomebrew

    Anthropic's desktop app for chat, writing and coding help.

    brew install --cask claude
  • T3 Code

    Our pickHomebrew

    A minimal desktop app for running Claude Code, Codex and other agents side by side.

    brew install --cask t3-code
  • Grokbot

    Our pickHomebrew

    xAI's desktop agent that works across your apps.

    brew install --cask grok-bot
  • Capy

    Web app

    Runs many coding agents in parallel in the cloud, each on its own machine, and opens the pull requests.

  • ChatGPT

    Homebrew

    OpenAI's desktop app with the Option-Space shortcut.

    brew install --cask chatgpt

More guides