ai huntt

OpenCode

Freemium

Write code with an open source AI agent in your terminal, desktop app, or IDE extension, using free included models or connecting your own from any provider.

About

OpenCode is an open-source coding assistant that runs in your terminal. It connects to 75+ model providers or local models, then writes and edits code while you watch.

You stay in your terminal. The agent reads files, runs commands, and fixes its own errors using LSP diagnostics. You approve each change or let it work in batch.

It is MIT licensed and free to use. You pay only for API calls to providers like Anthropic, OpenAI, or the optional Zen service for curated Chinese models.

Open it if you live in the terminal and want open-source flexibility. Skip it if you need a polished IDE or point-and-click workflow.

Who OpenCode is best for

These are the people who actually get value from it.

  • Terminal-native developers using Neovim or heavy CLI workflows: You never leave your keyboard. The Bubble Tea TUI feels native to your setup.
  • Teams needing provider flexibility or local/self-hosted AI: You can run air-gapped with Ollama or vLLM. No code leaves your network.
  • Users wanting to avoid vendor lock-in to Anthropic or OpenAI: You switch models with one config change. You are not trapped in a subscription.
  • Developers running agents on remote infrastructure or cloud sandboxes: The client-server split lets you run the heavy parts on a box and keep a light TUI locally.
  • TypeScript/Python developers who want automatic LSP-based error correction: The agent sees compiler errors and fixes them without you running tsc manually.
  • Teams needing granular permission control over agent actions: You allow git status but require approval for git push. Claude Code cannot do this.
  • Developers philosophically committed to open source tools: You can read, fork, and extend the code. The license is MIT.
  • Claude Code migrants who want open-source: You get similar agent behavior without the $20/month subscription.

Best things about OpenCode

These are the parts you notice after daily use.

  • The LSP self-correction loop: It catches type errors across dozens of files and fixes them automatically. You do not feed compiler output back manually.
  • Provider agnosticism: You pick from 75+ providers or run local models. Switching takes seconds, not hours.
  • Session persistence: The client-server architecture keeps your session alive across reconnects and devices.
  • Granular permissions: You control exactly which commands need approval. You are not stuck with coarse yes/no buckets.
  • Plan vs Build modes: Hit Tab to preview changes before they happen. You decide when the agent writes and when it just thinks.

How you use OpenCode

The setup is one terminal command, then configuration.

  1. Install with npm, Homebrew, or Docker and run opencode in your project root.
  2. Set your API key or point to a local model in the JSON config.
  3. Start a session, describe what you want built, and toggle Plan mode to preview or Build mode to execute.
  4. Approve actions as they come, or batch them when you trust the flow.
  5. Use /undo or /redo when the agent goes wrong.

Why you should ignore it

Skip it when the fit is wrong. These are the real limits.

  • You are IDE-centric: The terminal-first TUI excludes you. There is no tight VS Code or JetBrains integration yet.
  • You want it to just work: Setup requires choosing models and configuring providers. You will not open it and start coding immediately.
  • You need long, focused sessions: Sessions degrade after ~100K tokens. Responses get slower and less coherent.
  • You cannot babysit the agent: It still needs hand-holding and explicit prompts to avoid overcomplicated solutions.
  • You are on a memory-tight machine: With TypeScript LSP, it uses ~1.2GB versus ~400MB for Claude Code.

Tags for OpenCode