OpenCode
An open-source agentic coding assistant.
OpenCode is taught here in 13 lessons, running from What OpenCode is through to Headless mode, the SDK and CI. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | AI & Intelligent Development |
| Lessons | 13 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Claude Code |
Lessons
- What OpenCode isAn open-source coding agent that runs in your terminal, reads and edits your files, runs commands, and stays model-agnostic.
- Install and first sessionGetting OpenCode running, authenticating a provider, and the first commands worth learning.
- Workflow tips and limitsHow to get useful multi-file changes out of a terminal agent, and the failure modes worth planning for.
- Choosing and configuring model providersAuthenticate a provider, switch models mid-session, and write an opencode.json that pins the right model to the right job.
- Running local models with Ollama and LM StudioPoint OpenCode at a local endpoint, understand why small models break tool calling, and when local inference is genuinely the right trade.
- Plan mode versus build modeUse the read-only agent to get a plan you can argue with before any file changes, and switch to build only when the plan is right.
- Project context and instruction filesInitialize project context, keep standing instructions in AGENTS.md, and use nested context files so guidance arrives where it applies.
- Sessions, snapshots and undoFind and resume past sessions, run several in parallel on one project, and use snapshot-based undo when an edit was the wrong direction.
- Code intelligence with language serversLet the agent see real compiler diagnostics instead of guessing, and learn the cases where the language server misleads it.
- MCP servers and custom toolsGive the agent access to a database, an issue tracker or a browser through MCP, and manage the context cost and trust that comes with it.
- Skills, plugins and custom commandsPackage repeatable procedures as commands, knowledge as skills, and behaviour changes as plugins, then share the whole setup across repositories.
- Permissions, privacy and secret handlingKnow exactly what leaves your machine, tune the command approval policy, and keep credentials out of prompts and transcripts.
- Headless mode, the SDK and CIRun non-interactive agent tasks, drive the server over HTTP from your own code, and put a constrained review step into a pipeline.
More in AI & Intelligent Development
AI Basics AI Agents Math for AI Machine Learning scikit-learn TensorFlow PyTorch Natural Language Processing LangChain Ollama OpenCV Codex Claude Code Vibe Coding Selenium Playwright
FAQ
How long does the OpenCode course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for OpenCode?
Not strictly. It helps to have read Claude Code first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after OpenCode?
Continue with Vibe Coding (13 lessons), the next course in AI & Intelligent Development.