Softwr

AI Coding Assistants · head to head

OpenCode vs Preact

OpenCode logo

OpenCode

AI Coding Assistants

Open-source coding agent for terminal, desktop and mobile that works with any model

From
Free
Free plan
Yes
Preact logo

Preact

Web Development

3kB alternative to React with the same modern API

From
Free
Free plan
Yes

The short version

  • OpenCode is an open-source coding agent.
  • Preact is free; OpenCode starts at $10/mo.
  • Only OpenCode lists terminal interface; only Preact lists 3kB runtime.
  • Where OpenCode falls short: model costs depend on your provider when bringing your own key.
  • Where Preact falls short: compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose.

How do OpenCode and Preact differ?

OpenCode and Preact differ on pricing model, platforms and category. Only the attributes on which OpenCode and Preact actually diverge.

Attributes where OpenCode and Preact differ
AttributeOpenCodePreact
Pricing modelFreemiumOpen source, no licence fee
PlatformsmacOS, Windows, Linux, iOS, AndroidWeb
CategoryAI Coding AssistantsWeb Development

Identical on both: starting price (Free), free tier (Yes).

Which features does each one have?

They share no listed features; 9 appear only for OpenCode and 4 only for Preact. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in OpenCode

  • Terminal interface
  • Desktop app
  • Mobile app
  • SDK for scripts and CI
  • 200+ model providers
  • Parallel agent sessions
  • MCP server support
  • Custom agents and skills

Only in Preact

  • 3kB runtime
  • preact/compat
  • Same modern API
  • Fast rendering

What is each one used for?

OpenCode is most often brought in for terminal-first coding with any model; Preact for embedded widgets that load inside someone else’s page and must stay small. The jobs each tool is most often brought in to do.

OpenCode

  • Terminal-first coding with any modelnot Preact
  • Using a ChatGPT or Copilot subscription in an open agentnot Preact
  • Running several agents in parallel on one repositorynot Preact
  • Driving a coding agent from CI via the SDKnot Preact

Preact

  • Embedded widgets that load inside someone else’s page and must stay smallnot OpenCode
  • Marketing and content sites where JavaScript payload affects Core Web Vitalsnot OpenCode
  • Applications targeting low-bandwidth or low-powered devicesnot OpenCode

Where do OpenCode and Preact fall short?

OpenCode's most cited limit: model costs depend on your provider when bringing your own key. Preact's: behavioural differences from React exist in edge cases, particularly around event handling. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

OpenCode

  • Model costs depend on your provider when bringing your own key
  • Go subscription limits apply per model and per five hours
  • Mobile iOS build is distributed through TestFlight
  • Free models change and are not guaranteed to match paid ones

Preact

  • Compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose
  • Behavioural differences from React exist in edge cases, particularly around event handling
  • A much smaller community, so unusual problems have fewer existing answers than React

How much do OpenCode and Preact cost?

OpenCode has a free plan, with paid plans from $10/mo; Preact is free to use. Plan by plan below, from each vendor's own pricing page.

OpenCode

Free
  • Go$10/mo
    • Curated open-weight models
    • Fixed monthly price
  • Go Plus$40/mo
    • Higher limits
    • Fewer interruptions

Preact

Free
  • PreactFree
    • Full library
    • Commercial use permitted
    • No usage limits

Which should you pick?

Choose OpenCode if

  • You need terminal interface.
  • You want to start without paying.
  • You work on macOS, Windows, Linux, iOS, Android.
  • You also want desktop app.

Choose Preact if

  • You need 3kb runtime.
  • You want to start without paying.
  • You also want preact/compat.

Questions people ask

Is OpenCode or Preact better?
It depends on the job. OpenCode fits terminal-first coding with any model; Preact fits embedded widgets that load inside someone else’s page and must stay small. OpenCode starts at Free and Preact at Free.
Which is cheaper, OpenCode or Preact?
OpenCode starts at Free and Preact at Free.
Does OpenCode or Preact run on more platforms?
OpenCode runs on macOS, Windows, Linux, iOS, Android. Preact runs on Web.
Can I use OpenCode for free?
Both have a free tier, so you can try either at no cost before committing.
What is OpenCode best used for?
OpenCode is most often used for terminal-first coding with any model, using a chatgpt or copilot subscription in an open agent, running several agents in parallel on one repository, driving a coding agent from ci via the sdk. Of those, terminal-first coding with any model and using a chatgpt or copilot subscription in an open agent are not what Preact is typically brought in for.
What can OpenCode do that Preact cannot?
OpenCode covers Terminal interface, Desktop app, Mobile app, SDK for scripts and CI. Preact covers 3kB runtime, preact/compat, Same modern API, Fast rendering.

Answered from the vendors’ own pages

OpenCode: Is OpenCode free?

The software is open source and ships with free models that need no account. Optional OpenCode Go subscriptions cost $10 or $40 a month.

Source
Preact: Is Preact free?

Yes, open source under the MIT licence.

OpenCode: Which models does OpenCode support?

It supports 200+ LLM providers through Models.dev, including local models, and can log in with ChatGPT Plus or Pro or GitHub Copilot.

Source
Preact: Can I use React libraries with Preact?

Most, through the preact/compat layer. Compatibility is good but not complete, so libraries relying on React internals can break.

OpenCode: Where does OpenCode run?

It runs in a terminal, in a desktop app for macOS, Windows and Linux, on mobile, or through an SDK.

Source
Preact: Why choose Preact over React?

Bundle size, almost always. If payload is not a binding constraint, React’s ecosystem is usually the better trade.

Share

Related pages

Other head to heads