1. Introduction
It’s hard to ignore how much attention Claude Code has been getting lately. Its capabilities are impressive, and for many developers, it has become a powerful companion that makes everyday coding tasks significantly easier.
That said, as polished and effective as Claude Code is, it remains a paid product — and not a particularly inexpensive one. This naturally raises a question: is there an alternative that offers similar power without the same constraints?
That’s where OpenCode comes in.
OpenCode is an open-source, AI-assisted coding tool that can comfortably stand alongside Claude Code in terms of functionality. In practice, most of what Claude Code can do, OpenCode can do as well. It even provides access to free models out of the box. More importantly, OpenCode gives developers full control: you can configure your own models, choose your own providers, and shape the workflow to fit your preferences rather than the other way around.
In the following sections, I’ll take a closer look at OpenCode — what it offers, how it feels to use, and why it’s worth paying attention to.
2. The OpenCode
The OpenCode supports multiple platforms, you can download it here.
It supports IDE and CLI modes, if you are Cladue Code user, you can try the CLI mode, which can be supported well in VS Code, the screen like below

and the IDE mode as below

3. Trying the Vibe Coding
OK, let’s try it for how it’s working in vibe coding.
For the demo, I just ask it to create a simple blog website with ASP.NET Core, it will generate the to-do list and do it step by step

The first time, it will build all of the code of the website, but there is an error below
SqliteException: SQLite Error 1: 'no such table: Blogs'.
because didn’t do the database migration, and I keep to ask it to fix

After that, the website can be run very well 🙂

Of course, this is only a very simple demo, but we can see that it can work very well.
4. Why OpenCode
I think the advantages of OpenCode are the cost, you can free to use a few models, and it can let you know how many tokens are used in this section

and also can see that in IDE mode

And I am very like it can set the custom API and models.
OpenCode supports many of AI providers

But if you still can’t find the provider that you want, don’t worry, you can add it by yourself.
Update or create the opencode.json file in your project folder or below
Remote config (from .well-known/opencode) - organizational defaults
Global config (~/.config/opencode/opencode.json) - user preferences
Custom config (OPENCODE_CONFIG env var) - custom overrides
Project config (opencode.json in project) - project-specific settings
.opencode directories - agents, commands, plugins
Inline config (OPENCODE_CONFIG_CONTENT env var) - runtime overridesfor example, I want to add a new provider and update the opencode.jsonas below
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"chatfire": {
"npm": "@ai-sdk/openai-compatible",
"name": "ChatFire API",
"options": {
"baseURL": "https://api.chatfire.cn/v1"
},
"models": {
"gemini-3-flash-preview-thinking": {
"name": "gemini-3-flash-preview-thinking"
},
"gpt-4o-mini": {
"name": "gpt-4o-mini"
}
}
}
}
}and also update the ./local/share/opencode/auth.json to set the API key
{
"chatfire": {
"type": "api",
"key": "your api key"
}
}and then I will find this provider

also can connect the provider in CLI mode

and you will can use the new models from the custom provider

also same in CLI mode

This is what I want, how about you? 😄
5. Conclusion
OpenCode is open source and provides free models AI-assisted coding tool, and it can be working well with VS Code, and also can setup the custom API provider, so if you think the Claude Code is too expensive or want to try another one, you can try OpenCode 😁
![]()






