Opencode

opencode.json: Wiring a Terminal Coding Agent to a Local Model

One JSON file turns opencode into a fully local assistant — declare an OpenAI-compatible provider, describe your models, and check the resolved config before you trust it

opencode is a terminal coding agent, and it has no opinion about where its tokens come from. Providers are declared in an opencode.json file, so pointing it at a model running on your own machine — LM Studio, an MLX server, llama.cpp, vLLM — is a matter of a baseURL and a couple of lines of metadata. Here’s a config with three providers side by side: a LAN box, a hosted API, and a local server.

AI ai llm cli