OpenCode: A Terminal-Based AI Coding Agent
OpenCode
I spend my days in the terminal. Neovim for editing, tmux for sessions, a tiling window manager for everything else. So when AI coding assistants arrived, they felt alien: another GUI, another tab, another context switch.
OpenCode fixed that. It is an AI coding agent that lives in your terminal, no IDE, no browser tab, no separate window. It sits inside tmux like any other tool, which makes it feel less like a product and more like another command on my system.
From Tab-Completion to Agents
The jump from autocomplete to agents is bigger than it sounds. Instead of suggesting a line, OpenCode plans across the whole codebase: it searches files, runs commands, reads documentation, and makes multi-file edits. The difference is delegation instead of suggestion, you describe the outcome, the agent handles the mechanics.
Configuration: A Single File
My setup starts with a minimal config file that points at the schema:
{
"$schema": "https://opencode.ai/config.json"
}
Everything else lives in the config directory, agents, skills, and permissions, so my entire AI workflow is version-controlled like any other dotfile.
Agents: Specialized AI Workers
The most powerful idea is agents, specialized personas, each with a narrow mission. Instead of one generic assistant, I have a whole team in my ~/.config/opencode/agents directory:
- A code reviewer that audits diffs for bugs and security issues
- A security auditor that scans every change for exposed secrets
- A test writer that generates coverage without touching my patterns
- A refactoring specialist that preserves behavior while cleaning code
Each agent has its own system prompt, so the reviewer never starts refactoring and the refactorer never starts writing tests. You pick the right worker for the task, the same way you would assign work to a colleague.
Skills: Reusable Capabilities
On top of agents sit skills, packaged workflows an agent can load on demand. Instead of asking the model to improvise an accessibility audit or a code review from memory, skills provide structured, tested procedures.
The pattern matters: a skill is not a prompt, it is a documented workflow. My configuration currently ships dozens of them, covering everything from debugging and security auditing to technical writing and database migrations. Agents stay focused, and knowledge stays reusable across every future session.
Building on the SDK
The terminal is only the front door. OpenCode exposes a plugin SDK, so the assistant can be extended with custom tools, shell helpers, and integrations. If there is a workflow my team performs a hundred times, it becomes a plugin once, and then it is available in every session.
Conclusion
OpenCode proved to me that AI coding assistance belongs in the terminal. It composes with tmux, respects my editor, and, through agents and skills, it adapts to how I actually build software instead of forcing me to adapt to it.
Your terminal already has a terminal-based AI agent waiting in its config directory. Mine is at ~/.config/opencode, make yours the same.