OpenCode - The Claude Code Alternative
Written by Nikos Vaggalis   
Tuesday, 04 November 2025

Introducing OpenCode, an opensource, powerful, fully-hackable AI coding agent for the terminal that takes on commercial agents head to head.

You've been there, in between the conflict of Claude Code vs Gemini CLI vs Codex CLI, trying to get a definitive answer of which is the best.

Now add yet another contender to the fight; OpenCode.
Powerful like those above but with a few extra advantages on top. First, it's 100% open source both in code and association, meaning that its code is available to the public and that at the same time it's not coupled to any provider commercially or supports propriety APIs only. Being totally provider-agnostic it works the same well with Anthropic, OpenAI or Google, and local models too.

Then its fully hackable; you can extend it or customize by simply fiddling with its configuration files. For instance in order to change themes, edit your Opencode config 'opencode.json' and set the theme to say, Tokyonight:

{
"$schema": "https://opencode.ai/config.json",
"theme": "Tokyonight"
}

There's plenty of built-in theme such as everforest, ayu, catppuccin, gruvbox etc, but you can make your own custom schemas too. On top you can customize your key bindingss through the 'keybinds' option.

It also sports another powerful functionality through its Plugin system. Under it you can register plugins to be called before and after each tool call, something that can be used for example for logging and debugging purposes.

A plugin is just a JavaScript/TypeScript module that exports one or more functions. Each function receives a context object and returns a hooks object. For instance to send notifications when certain events occur, write a plugin like the following:

export const NotificationPlugin = async ({ project, client, $, directory, worktree }) => {
      return {
              event: async ({ event }) => {
                 // Send notification on session completion
               if (event.type === "session.idle") {
                  await $`osascript -e 'display notification "Session                          completed!" with title "opencode"'`

                }
          },
    }
}

As all CLI agents do, OpenCode understands your codebase and lets the underlying LLM to invoke tools to perform the rquired action. The built-in tools it comes with are:

  • bash
    Execute shell commands in your project environment.
  • edit
    Modify existing files using exact string replacements.
  • write
    Create new files or overwrite existing ones.
  • read
    Read file contents from your codebase.
  • grep
    Search file contents using regular expressions.
  • glob
    Find files by pattern matching.
  • list
    List files and directories in a given path.
  • patch
    Apply patches to files.
  • todowrite
    Manage todo lists during coding sessions.
  • todoread
    Read existing todo lists.
  • webfetch
    Fetch web content.

but you can extend it with custom tools or MCP servers.
You can define MCP servers in your OpenCode config under mcp to refer to that MCP by name when prompting the LLM.

opencode.jsonc
{
"$schema": "https://opencode.ai/config.json",
   "mcp": {
        "name-of-mcp-server": {
             // ...
          "enabled": true,
         },
    "name-of-other-mcp-server": {
          // ...
     },
   },
}

Of course OpenCode is terminal based but that doesn't mean that GUI users are out of the question. Actually because of the fact that it’s terminal-based it means that you can pair it with your preferred code editor, say VSCode.

Getting started, install it on Linux with:

curl -fsSL https://opencode.ai/install | bash

and on Windows Using Chocolatey

choco install opencode

After you configured a LLM provider or a local model, you can navigate to a project that you want to work on.

cd /path/to/project

And run OpenCode.

opencode

Next, initialize OpenCode for the project by running the following command.

/init

Thats it. You can now use OpenCode to:

  • Ask questions
  • Add features
  • Make changes
  • Undo changes
  • Use MCP , etc

Excellent.

To conclude, OpenCode, in contrast to other paid offerings, fosters privacy as everything can be run locally,
is fully customizable and costs nothing to use, excluding of course the fees of calling paid LLM APIs.

 

More Information

OpenCode

Related Articles

LocalCode - A Perl-Based AI Coding Agent

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Exploring The Microsoft Agent Framework
30/10/2025

Microsoft has merged Semantic Kernel and AutoGen to create the Agent Framework, stirring the AI Agent waters.



Microsoft Announces GitHub Copilot App For Java And .NET
27/10/2025

GitHub Copilot has been updated with app modernization features for Java and .NET applications. The news was announced by Microsoft at  last month's Migrate and Modernize Summit, alongside new ag [ ... ]


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info