DEV Community

Cover image for First try with OpenCode (Windows): finished the task while I played a game
赵文博
赵文博

Posted on

First try with OpenCode (Windows): finished the task while I played a game

  1. Installation
E:\\ai-tools>curl -fsSL https://opencode.ai/install | bash
Enter fullscreen mode Exit fullscreen mode

After installation, it looks like this:

  1. Set the environment variable as prompted

My install path is: C:\\Users\\m1501\\.opencode\\bin

  1. In CMD it becomes:

  1. Run /models to pick a model. I tried using my existing ChatGPT Plus.
  2. Install the code plugin

I tried many approaches on Windows, and this one worked.

This plugin upgrades OpenCode into a “multi-AI team”. Installation depends on your subscription.

First, confirm your subscription (used for configuration):

  • Claude Pro/Max: use -claude=yes or -claude=max20 (max20 is advanced mode).
  • ChatGPT Plus: use -chatgpt=yes.
  • Gemini: use -gemini=yes.
  • If you don’t have it, use no.

Install Bun (required by Oh My if you don’t have it):

curl -fsSL https://bun.sh/install | bash

Restart the terminal.

One-click install Oh My OpenCode:

bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=yes --gemini=yes
  • Replace the flags based on what you have. For example, only Claude:


bash
bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no

  • If Bun has issues, use npx (requires Node.js):


bash
npx oh-my-opencode install --no-tui --claude=yes ...

Verify:

cat ~/.config/opencode/opencode.json | grep "oh-my-opencode"

If you see the plugin name, installation succeeded.

Complete authentication (if you use paid models):

  • Run opencode auth login, choose a provider, then complete OAuth login in the browser.
  • For Gemini/ChatGPT, you may need an extra plugin (for example opencode-antigravity-auth). Add it to the plugin array in opencode.json.

At this point, my OpenCode configuration was basically done.

Then I tried running it in IntelliJ IDEA:

I wrote my requirements as a document for it. While I played a game of LoL, it finished everything.

That’s insane.

References

Top comments (0)