The Free OpenCode Engine™

A full AI coding agent
for zero dollars

OpenCode is an open-source coding agent that lives in your terminal — same idea as Claude Code. OmniRoute is a free router that runs on your own machine. Ten lines of JSON connect them, and you get an agent that writes real code through free models. Here's the exact setup, plus three builds it made to prove it.

Three animated pages built by OpenCode through the free OmniRoute router — northern lights, a 3D sun, a jellyfish tank
$0.00 per build · verified 90+ free models 3 live demos it built 10 lines of config ~10 min setup
✦ ✦ ✦
1 · the idea

What this combo actually is

Two open-source tools. One does the coding. One kills the bill.

OpenCode is a terminal coding agent.

You type what you want. It writes the files, runs the commands, fixes its own errors. A real agent loop.

Normally you point it at a paid provider and every build costs tokens.

OmniRoute is a router that runs on your computer at localhost:20128.

It speaks the same API language as the paid providers — but behind it sit 237 providers, 90+ of them free.

OpenCode lets you add any compatible provider with a JSON block.

So you add OmniRoute. That's the whole trick.

You "build me a page" OpenCode writes · runs · fixes real agent loop OmniRoute localhost:20128 90+ free models free $0
You prompt → OpenCode does the work → OmniRoute makes it free
"Why not just use Claude Code?"

Keep using it — I do. This isn't a replacement, it's the overflow lane.

Bulk work, throwaway prototypes, background builds — anything you'd hesitate to spend tokens on, send here instead. Your paid tools stay for the work that earns money.

my story · why this exists

I watched the meter run while my agents worked

Before

Every coding agent I ran had a meter on it.

Prototype an idea — tokens. Test a dumb theory — tokens. Let an agent loop on a bug overnight — a bill in the morning.

I tried free models one at a time. Sign up here, grab a key there, hit a 404 on half of them.

I had five tabs of provider dashboards and no idea which key was burning.

Then I wired OmniRoute into OpenCode.

After

Now there's a second coding agent on my machine with no meter at all.

I threw three real builds at it — an aurora simulator, a 3D sun, a jellyfish tank. Every one came back at $0.00.

When a build had a bug, I sent the error back and it fixed its own file.

And it sits inside my Agent OS as a dropdown — my whole team can use it without touching a terminal.

You can have this too. Same tools. Ten minutes.

the receipts

Real people. Real wins. Running this stack right now.

Here's what's happening for the members already building with free-first engines like this one — agency owners, ecom founders, course creators, solo operators. Different businesses. Same result.

4,000+ members inside AIPB
258 documented wins
38 countries
400K YouTube subscribers
163K X followers
29K+ Udemy students

Members post wins as they happen — token bills cut, first agents shipped, client work automated. All collected in one doc you can read right now.

Read the member wins doc (158 pages) →
before you scroll on —

Commit to installing this today. Not someday.

You've seen the proof above. Real people, real results.

The next ten minutes show the exact setup — every command, every config line.

So here's the deal.

Promise yourself one thing right now: you'll finish this guide AND run the install before you close the laptop tonight. Just the install.

Because the moment a free coding agent exists on your machine, the way you treat ideas changes. You stop rationing prompts. You start throwing every idea at it — because failing costs nothing.

The people sitting still are getting passed. The people who install today are the ones who look back in six months and say "that was the moment."

Be one of them.

Commit to the transition. Take action today. This changes how you build.

2 · the system

The Free OpenCode Engine™ — three layers

Everything in this guide builds one machine with three layers.

i.

The Router

OmniRoute on localhost:20128. Talks to 237 providers, 90+ free. Compresses every request before it leaves your machine.

ii.

The Agent

OpenCode in your terminal. Writes files, runs commands, fixes its own errors. Pointed at the router with one JSON block.

iii.

The Cockpit

The Agent OS. OmniRoute models in the OpenCode dropdown, every build in a workspace gallery with live previews.

3 · setup

Step 1: Install both tools

Two installs. Both free, both open source.

OpenCode

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

Or npm i -g opencode-ai@latest if you prefer npm. Check it with opencode --version.

OmniRoute

npm install -g omniroute omniroute serve --no-open

The dashboard comes up at localhost:20128. Connect a couple of free providers in the Providers tab — OpenCode Zen and Pollinations need no signup at all.

Already running OmniRoute for Hermes from the Free Hermes Engine™ guide? Skip this step — same gateway serves both.

"Another thing running on my machine?"

It's one small process, and it only works when you send it something. Set it up once with your system's autostart and forget it exists. Mine has been running for weeks untouched.

4 · setup

Step 2: The ten lines that make coding free

OpenCode reads custom providers from one file. Add this and you're done.

Open ~/.config/opencode/opencode.json (create it if it's missing) and add OmniRoute to the provider block:

{ "$schema": "https://opencode.ai/config.json", "provider": { "omniroute": { "npm": "@ai-sdk/openai-compatible", "name": "OmniRoute (free router)", "options": { "baseURL": "http://localhost:20128/v1", "apiKey": "omniroute-local" }, "models": { "auto/coding": { "name": "Auto coding (free)" }, "auto/best-coding": { "name": "Best coding (free)" }, "auto/best-fast": { "name": "Fast answers (free)" } } } } }

That's the entire integration.

The auto/coding model is the one I verified end to end — the router picks the best free coding model available and falls back automatically when one hits a limit.

"Why is there an API key if it's free?"

The key authenticates you to your own router on your own machine — it never goes to a paid provider. Any string works; the router is local.

5 · setup

Step 3: Prove it works

One command, then check the meter.

opencode run -m "omniroute/auto/coding" "Say OK if you can hear me"

You'll get an answer in the terminal.

Now open the OmniRoute dashboard at localhost:20128 — the request is logged there with its cost: $0.00.

From here, real work is the same command with a real prompt. Ask for a landing page. A script. A game. It writes the files right into your folder.

"The command answered but never exits?"

Known quirk — OpenCode sometimes lingers after finishing. The answer is already printed and the files are already written. Ctrl+C is safe. Judge the run by its output, not its exit.

6 · the cockpit

Step 4: Put it in the Agent OS

The terminal is fine. A dashboard is better.

My Agent OS has an OpenCode page — prompt in, build streams out, every project lands in a workspace gallery with a live preview.

The OmniRoute models sit in its model dropdown, next to the other free engines.

Same build button. Zero dollars. And the gallery keeps every build, so nothing you make ever gets lost.

Agent OS OpenCode workspace gallery showing the three OmniRoute builds with live thumbnails
The OpenCode workspace inside my Agent OS — OmniRoute builds sitting in the gallery with live previews
"I don't have the Agent OS — is the setup still worth it?"

Yes — steps 1–3 give you the full free coding agent in any terminal. The OS just adds the cockpit: dropdown, gallery, previews, history. That part ships pre-wired inside the Boardroom if you want it.

7 · the proof

Three builds. One free router. Zero hand-edits.

I didn't want "hello world" proof. So I asked for three animated, interactive pages.

Every build ran through the Agent OS build route — the exact same button you'd click.

Every build was render-tested in a headless browser. Console errors and visual bugs went back to the model, and it repaired its own files. I never touched the code.

the self-fix loop — no human hands model builds writes index.html headless test render + console + pixels bug found? errors sent back ships live demo · $0 "fix these exact problems" → model repairs its own file
The jellyfish tentacles broke once, the sun's particles rendered square once — the model fixed both itself
"Is code from free models actually usable?"

The three demos above are untouched model output — verified for console errors, blank screens and visual bugs before shipping.

That's the standard: it works on your screen, or it doesn't ship.

8 · the maths

What this replaces

Not your main coding tool. The part of the bill that never needed to exist.

monthly spend on experiments & bulk builds paid API tokens $20–100+ same work via the router $0.00
Every build in this guide is logged at $0.00 on the router dashboard
"What's the catch?"

Free models are slower and dumber than frontier ones — that's the honest trade.

For prototypes, bulk pages, demos and background jobs it doesn't matter. For the code your business runs on, keep the paid tools. The win is knowing which work goes in which lane.

✦ ✦ ✦
The Free OpenCode Engine™ — pre-built inside

Want this without the setup?

Everything in this guide is part of the Agent OS — the system I run my business on. Inside the AI Profit Boardroom you get it pre-wired, plus the people to help when something doesn't work first try.

Free OpenCode Engine™ pre-configured — router, provider block and OS dropdown ready to go
The complete Agent OS — every CLI in one dashboard, set up in an afternoon
The Free Hermes Engine™ — the same router powering agents, not just code
Agent Kanban — agents that keep working while you sleep
5 live coaching calls a week — get unblocked by people on your exact setup
1,000+ prebuilt agents — ready to run and customise
Token-efficiency playbooks — stop thinking about API bills
4,000+ members in 38 countries — someone's online whenever you're stuck
Get the Free OpenCode Engine™ → Inside the AI Profit Boardroom
9 · the recap

What you end up with

i.

A second coding agent

OpenCode in your terminal, writing real files through a real agent loop.

ii.

With no meter

Every request routed through OmniRoute's 90+ free models. Verified $0.00 per build.

iii.

That fixes itself

Send errors back and the model repairs its own files. Three live demos prove it.

iv.

In your cockpit

A dropdown and a gallery in the Agent OS. Your paid tools untouched, for the work that earns.

One more thing

Install it tonight

Two installs, ten lines of JSON, one test command. That's the whole thing.

If you'd rather build it with help than figure it out alone, that's what the Boardroom is for. 4,000+ people are already inside, and with five live calls a week you're never stuck for long.

Join the AI Profit Boardroom → The Free OpenCode Engine™ is waiting inside