AI coding agent in your terminal, powered by GPTunnel.
TunnelCode is a fork of OpenCode with built-in GPTunnel integration. One install, one API key — and you have a full-featured AI coding agent with access to the best models through GPTunnel.
npm i -g tunnelcode- Get your API key at gptunnel.ru/profile/business
- Run
tunnelcodein your project directory - Enter your API key when prompted
- Choose a model and start working
You can also set the key via environment variable:
export GPTUNNEL_API_KEY=your-key-here
tunnelcode- Full AI coding agent: file editing, bash commands, code search, MCP support
- Access to all models available through GPTunnel (GPT-4o, Claude, Gemini, and more)
- Terminal UI with two built-in agents:
- build — full-access agent for development (default)
- plan — read-only agent for analysis and code exploration
- Subagent
@generalfor complex searches and multistep tasks - Project-level config via
tunnelcode.json(withopencode.jsonfallback) - Custom agents and skills via
.tunnelcode/directory - Client/server architecture — run locally, drive remotely
- LSP support out of the box
TunnelCode uses tunnelcode.json for project configuration. If not found, it falls back to opencode.json.
Custom agents and themes live in .tunnelcode/ (with .opencode/ fallback).
TunnelCode is built on top of OpenCode — the open-source AI coding agent. We maintain a minimal diff from upstream to stay up to date with the latest features and fixes.
Key differences from OpenCode:
- Pre-configured to work with GPTunnel out of the box
- Simplified onboarding — no provider selection, just enter your GPTunnel API key
- Models are loaded dynamically from the GPTunnel API with local caching
- TunnelCode-first config paths (
tunnelcode.json,.tunnelcode/)
MIT