Docs menu

OpenCode

Run OpenCode interactively or for one question, pick one of its free models, and keep private material out of free-model sessions.

OpenCode is an open-source coding agent for the terminal. Start it from the project folder, either as an interactive interface or for a single question:

opencode
opencode run "explain what src/gap_follow does"
Command Effect
opencode -m provider/model Picks the model for the session; it can also be changed inside the interface
opencode -c Continues the last session
opencode auth login Connects a provider

Free models

The team has access only to OpenCode’s free models. OpenCode Zen, the built-in provider, offers several of them free for a limited time, and the list changes, so check the current Zen models before picking one.

While a model is free, OpenCode states that data sent to it may be used to improve the model. Keep credentials, device logins and anything private out of a free-model session.

Official documentation: OpenCode docs and the CLI reference.