Opencode: AI coding agent, built for the terminal

(github.com)

225 points | by indigodaddy 17 hours ago ago

65 comments

  • xrd 15 hours ago

    Isn't it more appropriate to compare this to aider?

    I prefer the command line tools to IDE integration, even though I don't feel like the contextual options are great. In other words, I don't always feel that I can see the changes fully. I like Claude Code's option to expand the result using ctrl-r, and I like the diffs it provides. But, it still feels like there is a way to get better than what I see inside Zed and what I see inside Claude and Aider.

    Maybe an editor that can be controlled and modified on the fly using natural language?

    • JeremyNT 6 hours ago

      I've settled on aider and vim.

      The best experience I've had is to completely divorce editing from vibe coding. Ask the chatbot to do something, then review the results as if a junior developer submitted them - that means diffs and opening files in the editor.

      Fundamentally I think these are really distinct operations. I understand why the kitchen sink IDEs jam the genAI tools into their UIs, but I don't think it's necessarily important to link the two functions.

      • jspdown 4 hours ago

        I share the same experience. Looking at diffs inside a terminal is as helpful as looking at diffs inside GitHub. I need code navigation to fully understand the impact of a code change or just the code base.

        I exclusively use Claude Code these days, and I don't remember having accepted the result of a prompt a single time on the first shot. I always have to fix some stuff here and there, improve some tests or comments or even make the code more readable. Being in an IDE is a must for me, and I don't see how this could change.

    • jpalomaki 4 hours ago

      I'm running Claude Code with vscode. With frequent commits I can use the source control tab to get a feeling of changes being made. This helps in spotting changes to files that should not have been changed.

      • gwd an hour ago

        I've been using VSCode with aider, but with auto-committing turned off. VSCode has a thing where changes not yet checked into the tree are highlighted in the scrollbars -- blue for modified, green for added, red for removed. You can then click the colored part of the sidebar to see a diff.

        Just for fun I typically also have an emacs window open; "git diff > working.diff" lets you see the diff, then "C-c C-c" on a diff hunk will take you the place in the file where that change was made.

    • QRY 13 hours ago

      That's an interesting idea! I struggle with the same issues you've mentioned, that space between the IDE integrated option and pure CLI. Your comment sparked an idea of using something like vim or similar where you can edit the config on the fly and reload it. I wonder how hard it would be to bolt a prompt interface to the front to have it build the editor for you?

      It would likely quickly devolve into typical editor config bikeshedding, only AI powered? At least for me, maybe someone smarter could streamline it enough to be useful though!

      • xrd 12 hours ago

        I was hoping I would goad someone into doing it.

        But, do it for emacs, ok? </joke>

        Actually, I *do* prefer emacs.

    • flowingfocus 10 hours ago

      specifically for working better with diffs, I can recommend tmux + lazygit with this keybinding for quickly opening a floating lazygit:

      bind-key C-g display-popup -E -d "#{pane_current_path}" -xC -yC -w 80% -h 75% "lazygit"

      not only does it allow you to see the diffs, but you can directly discard changes you don't want, stage, commit, etc.

      • Syzygies 6 hours ago

        tmux! That was today's project. I'm using Claude Code Opus 4 to translate a K&R C computer algebra system (Macaulay) from the 1980's into C23. Finally getting to the "compiles but crashes" (64 bit issues) I found us living inside the lldb debugger. While I vastly prefer a true terminal to the periscope AI agent view in Cursor, it was still painful having at best a partial view of Claude's shell use, interleaved with our chat. What I wanted was a separate terminal session AI and I could share as equal partners.

        tmux is the quickest way to implement such an idea.

      • carraes 10 hours ago

        Damn, thanks, i have some floating panes on tmux but never thought about doing something like this lol

    • syabro 7 hours ago

      I use claude code + pycharm (when need to check changes, improve something)

    • WhyNotHugo 11 hours ago

      Being able to open the diff in vimdiff view (or your editor's equivalent) would be a neat approach. Not entirely sure how to actually implement that.

  • jeremy_k 11 hours ago

    Just wanted to say I had been happily plodding along using AI tools in Zed, which had worked pretty well but seeing the SST team was behind OpenCode I decided to finally give a terminal based agent a try. I was blown away, primarily by the feedback loops of say OpenCode writing new tests, running the test suite, seeing the tests errored and looping back start the whole process again. That looping does not happen in Zed!

    It was the first time I felt like I could write up a large prompt, walk away from my laptop, and come back to a lot of work having been done. I've been super happy with the experience so far.

    • dohguy 2 hours ago

      "It was the first time I felt like I could write up a large prompt, walk away from my laptop, and come back to a lot of work having been done. I've been super happy with the experience so far." - this yet-to-be-defined "happiness" metric will be important moving forward. Apart from Opencode & Leap.new (so far) I still haven't found something where I feel as happy.

      I don't know if others share this sentiment but with all these tools/agents coming out, the main personal "metric" I look at when using them is happiness, rather than other more traditional metrics that I look at when evaluating tools.

    • crgwbr 11 hours ago

      I’ve definitely had exactly that sort of looping work with Zed, as long as I tell it how to run the tests. Are you perhaps not using one of the “thinking” models?

    • manojlds 3 hours ago

      That's tablestakes at this point. If Zed is not doing it, it's far behind others like Ampcode and rest.

    • brabel 4 hours ago

      Intellij’s agent, Junie, does that too… and you get a proper UI as well!

      • KronisLV 2 hours ago

        I've had pretty good experiences with Junie, their UI is really pleasant! Kind of wish I could put in an API key for Sonnet or Gemini myself and get rid of any rate limits.

        Outside of JetBrains IDEs I also quite enjoy RooCode, though stuff like GitHub Copilot is decent.

  • brainless 5 hours ago

    I have a question around pricing:

    I am using Claude Code almost exclusively. I am using the Claude Pro subscription and it allows Claude Code usage, with limits on the number of prompts per 5 hours, according to their site. I have not hit these limits yet even though I use this full-time, daily.

    With other tools, do I have to pay API based costs or are there ways to use my subscription? As I see it, the API costs add up quickly. That means we can be stuck with a few tools from the top tier model companies.

    • vlade11115 2 hours ago

      > do I have to pay API based costs Usually, yes, you do. However, in this case, opencode kinda cheats by using Antropic client ID and pretending to be Claude Code, so it can use your existing subscription. > We recommend signing up for Claude Pro or Max, running opencode auth login and selecting Anthropic. It’s the most cost-effective way to use opencode. https://opencode.ai/docs/

    • siddboots 4 hours ago

      This ain’t what you asked but I’m using Claude Code with a pro subscription and I get about an hour use out of it before I run out of tokens. Then I spend 4 hours thinking about how to set up my context for the next session.

      • brainless 2 hours ago

        I have a very different experience. I have built https://github.com/pixlie/SmartCrawler almost entirely on Claude Code with some usage of Google Jules. Even all GitHub workflows are from CC. I still have tokens left since I try multiple other ideas in parallel.

        I have coded a few landing pages and even a full React Native app with the same Claude Pro account in the last month. I do not consider this huge usage, but this is similar to a couple months of my own programming with AI assistance (like Zed + Supermaven).

        Please note: SmartCrawler is not ready for usage, you can surely try it out though but I am changing the inner workings and it is half-complete.

        Also, there are many branches of code that I have thrown away because I did not continue that approach. Example, I was trying a bounding box way to detect what data to extract, using the HTML element's position and size on browser. All coded with Claude Code. Generating such ideas is cheap in my opinion.

      • herbst 3 hours ago

        Gave it my first try yesterday burned trough the 20$ limit in maybe an hour and haven't hit the pro limit yet.

        Guess I really have to look into making this more efficient.

        • blitzar 3 hours ago

          More walking around the block thinking and more breaks for a cup of coffee.

  • jauntywundrkind 15 hours ago

    Could really use a comparison versus the seemingly de-facto terminal AI coding tool Aider. https://aider.chat/

  • thdxr 12 hours ago

    hey one of the authors here

    we're a little over a month into development and have a lot on our roadmap

    the cli is client/server model - the TUI is our initial focus but the goal is to build alternative frontends, mobile, web, desktop, etc

    we think of our task as building a very good code review tool - you'll see more of that side in the following weeks

    can answer any questions here

    • cchance 10 hours ago

      Would be cool if it could be an alternative frontend for gemini-cli, claude code, acli and the other tui's

  • orliesaurus 7 hours ago

    I feel like the guy behind this project loves getting into internet fights to create drama/clickbait. That being said, it's a cool project - still in its early stages and nowhere as usable as the other CLIs...but it's a darn shame about all the drama.

  • totaa 15 hours ago

    community drama aside, great to see more open source agentic CLIs tools.

    other than the focus on tui design, does this have any advantage over Claude Code, Aider, Gemini using the same model?

    • thdxr 12 hours ago

      author here

      we're very focused on UX and less so on LLM performance. we use all the same system prompts/config as claude code

      that said people do observe better performance because of out of the box LSP support - edit tools return errors and the LLM immediately fixes them

      • dotancohen 9 hours ago

          > we're very focused on UX and less so on LLM performance
        
        Could you spin that as an actual advantage? For people like me who use VIM, have a preference about filesystems, and backup phones via adb?
    • manishsharan 15 hours ago

      In my experience, Claude Code is scary good. Gemini CLI is just plain dumb and not worth the time.

  • cranium 3 hours ago

    Has anyone done a (somewhat) apple-to-apple comparison between opencode and claude code, as they both can use claude pro/max subscription?

    I'm curious about how they feel to use and their "performance".

  • scosman 15 hours ago

    OpenCode is great. A tier TUI. Basically an open Claude code.

    • graeber_28927 44 minutes ago

      Best part for me is it's model agnostic. I liked Claude Code, it worked better for me than VSCode Copilot Agent, but Claude was too expensive, so I rarely used it, and the price/friction felt bad when I did.

      sst/opencode I can use with my existing Copilot subscription, and select Claude Sonnet 4 freely. I never hit the limit before, and all friction is gone! If Google ever builds a better model, I can switch the same day, and keep my workflows, configs, etc.

      Also, with Claude COde I always felt a little mistrust, since theoretically they benefit from providing a more expensive service. opencode doesn't have this misaligned incentive.

  • zombot 3 hours ago

    It doesn't say how to configure a local ollama model.

  • preciz 16 hours ago

    Hmm, there is already a similar project with the same name: https://github.com/opencode-ai/opencode

    • isomorphic 15 hours ago

      https://x.com/thdxr/status/1933561254481666466

      ETA: The above link is at the bottom of the original submission's README. (https://github.com/sst/opencode) I posted it without context, and I have no opinion on the matter. Please read theli0nheart's comment below for an X rebuttal.

      • theli0nheart 15 hours ago

        https://x.com/meowgorithm/status/1933593074820891062

        --

        I’m the founder and CEO of Charm. There are claims circulating about OpenCode which are untrue, and I want to clarify what actually happened.

        In April, Kujtim Hoxha built a project called TermAI—an agentic coding tool built on top of Charm’s open-source stack: Bubble Tea, Lip Gloss, Bubbles, and Glamour.

        Two developers approached him offering UX help and promotion, and suggested renaming the project to OpenCode. One of them bought a domain and pointed it at the repo.

        At the time, they explicitly assured Kujtim that the project and repo belonged entirely to him, and that he was free to walk away at any point.

        We loved what Kujtim built and offered him a full-time role at Charm so he could continue developing the project with funding, infrastructure, and support. The others were informed and declined to match the offer.

        I also mentioned that if the project moved to Charm, a rename might follow. No agreement was made.

        Shortly after, they forked the repo, moved it into their company’s GitHub org, retained the OpenCode name, took over the AUR package, and redirected the domain they owned.

        To clarify specific claims being circulated:

        - No commit history was altered

        - We re-registered AUR packages for continuity

        - Comments were only removed if misleading or promotional

        - The project is maintained transparently by its original creator

        The original project, created by Kujtim, remains open source and active—with the full support of the team at Charm.

        That’s the story. We’ll have more to share soon.

        • hengheng 15 hours ago

          > an agentic coding tool built on top of Charm’s open-source stack: Bubble Tea, Lip Gloss, Bubbles, and Glamour.

          Okay I feel old now.

          • skeeter2020 9 hours ago

            It's pretty funny to refer to your libraries for building a TUI as an "open-source stack". From the commonly accepted vision of a "stack" it's a pretty thin slice. It's like saying "my over-engineered component library is a stack because it involves 15 layers of abstraction!".

            Neither of these companies are focused on LLMs or AI, they're both just using this as AI dust to sprinkle on top of their products.

          • esafak 13 hours ago

            Come on man, the BLBG stack is where it's at! What are you using, Github Copilot?!

            Seriously, though: Charm creates CLI tools, not coding agents: https://charm.sh/ https://github.com/orgs/charmbracelet/repositories

            Also, https://github.com/kujtimiihoxha 's recent commits are in https://github.com/opencode-ai/opencode .

            But what does https://sst.dev/ (org behind https://github.com/sst/opencode) have to do with either charm or opencode?? Like Charm, it has nothing to do with coding agents.

            Not for me.

            • robbomacrae 2 hours ago

              You’re implying the door has now closed for people to get into coding agents. It’s a bit early for that don’t you think? These guys might one day be considered part of the founders of coding agents for all we know.

        • dizhn 2 hours ago

          > The original project, created by Kujtim, remains open source and active—with the full support of the team at Charm.

          Anybody know where exactly this is hosted?

      • 15 hours ago
        [deleted]
    • dizhn 15 hours ago

      Both are go based using charmbracelet's gui libraries. There's actually a note about the project you posted being developed under the charm repo now but it doesn't seem to be public. Maybe they are the same project?

      • vidyesh 6 hours ago

        Kujtim started opencode few years back, they were developing this it even before any other CLI tools were in the market. Few months back thdxr(dax)(SST) and Adam started contributing to opencode. And quickly became the biggest contributors to the project. I think they also wanted to make it more presentable and Dax bought a domain and stuff while working on it. At some point charm approached Kujtim for some deal to move opencode to charm and keep working on it under them. Dax and Adam wanted to keep it open source as is. (Dax's commits were somehow squashed and removed at this point too) So they ended up rewriting opencode with the same name in TypeScript TUI away from Kujtim's vision. And thats where we are, since then opencode doesn't seem to have much progress done but Dax's opencode is being worked on non-stop.

        This is a third party retelling of this story from some post I read, as I came to know about it only after Dax started working on TS TUI for opencode under SST.

  • adhamsalama 6 hours ago

    Would be nice to compare it to Aider.

  • theusus 5 hours ago

    If I know it correctly. SST didn't build Opencode.

  • 9 hours ago
    [deleted]
  • rw_panic0_0 15 hours ago

    the UI looks very great. Just tried it, it's a pity that it doesn't support permissions before executing write/edit commands. I'm a Goose user btw

    • thdxr 12 hours ago

      it's implemented in the backend, will expose in frontend soon

    • 14 hours ago
      [deleted]
  • willahmad 15 hours ago

    UI looks really neat and pleasant to use. Does it create a todo list per prompt similar to Claude Code?

    • daliusd 13 hours ago

      I have tried it and it does.

  • careful_ai 15 hours ago

    [dead]

  • entelechy0 13 hours ago

    [dead]

  • Tepix 14 hours ago

    The name is already taken, openCode is a large important code repository in Europe.

    • brabel 4 hours ago

      Exactly. And they are great with lots of actually open source tools for developers. Hope this bullshit AI, Claude copycat is forced to change its name.