ykononov.com bb + agents / hands-on course Glossary FAQ RU

ykononov.com / Vibe coding from scratch: bb, Claude Code, Codex, and OpenCode / Module 03

How to install Claude Code, Codex, and OpenCode on any OS

Module 03 of 11 · 25 min · updated 2026-11-28

Claude Code, Codex, and OpenCode: installing, signing in, and checking that it all works.

In short

Each agent installs with a single terminal command; you then start it and sign in to your account through the browser. Claude Code: curl -fsSL https://claude.ai/install.sh | bash. Codex: curl -fsSL https://chatgpt.com/codex/install.sh | sh. OpenCode: curl -fsSL https://opencode.ai/v2/install | bash. On Windows, install Git for Windows first.

Why the agents come first

bb doesn’t ship with any agents. It finds the ones already installed on your computer and uses their existing sign-in. So the order is agents first, then bb. If you do it the other way around, nothing breaks. The agent list in bb will just be empty until you come back to this module.

Install the ones you have access to. One is enough to keep going, and you can add the others at any time.

Setup is the same three things for every agent: paste the install command, start the agent, and sign in through the browser. Allow about five minutes per agent.

Your computer
Windows: Git firstOn Windows, install Git for Windows before anything else. bb won’t start without it, and it makes life much easier for the agents. Run the command below in PowerShell, or download the installer from git-scm.com and accept all the defaults. When it’s done, close PowerShell and open it again.
winget install --id Git.Git -e
Mac: about GitOn a Mac, Git usually takes care of itself: the first time something needs it, the system offers to install the “command line developer tools.” Say yes. To check, run git --version.
Linux: about GitMake sure git and curl are installed. On Ubuntu and Debian: sudo apt install git curl.

Claude Code

You need a Claude Pro subscription or higher. If you don’t have one, skip this step.

Your computer
  1. Paste the install command into the terminal and wait for it to finish.
    curl -fsSL https://claude.ai/install.sh | bash
    irm https://claude.ai/install.ps1 | iex
    curl -fsSL https://claude.ai/install.sh | bash
  2. Close the terminal and open a new one so the system picks up the newly installed program.
  3. Start the agent:
    claude
  4. On first launch it asks you to choose a theme and sign in. Pick the option to sign in with your Claude account: your browser opens, you approve access there, and then you return to the terminal.
  5. When you see a box for typing a message, the installation is done. Type hello, make sure the agent replies, and quit with the /exit command.
If something goes wrongThe claude doctor command checks the installation and tells you what to fix. The most common problem is a “command not found” message for claude right after installing. Opening a new terminal window almost always fixes it.

Codex

You need a ChatGPT account, and for serious work, the Plus plan or higher.

Your computer
  1. Install it:
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
    powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
  2. Open a new terminal window and run:
    codex
  3. Choose Sign in with ChatGPT and confirm the sign-in in your browser.
  4. Say hello to the agent, make sure it replies, and close it by pressing Ctrl + C twice.
WindowsCodex has a native Windows version, but some people still run it through WSL out of habit. I couldn’t confirm from the documentation which route OpenAI currently treats as the main one: the page describing it wouldn’t load. Start with the command above. If the agent behaves strangely, run codex doctor.

OpenCode

OpenCode is an open-source agent that isn’t tied to any one company. It’s useful for two reasons: it works with models from a range of model providers, and it offers a set of free models so you can try it without a subscription.

Your computer
  1. Install it:
    curl -fsSL https://opencode.ai/v2/install | bash
    curl -fsSL https://opencode.ai/v2/install | bash

    There’s no one-command installer for Windows. The route that works goes through npm: first install Node.js (the LTS version from nodejs.org), then open a new PowerShell window and run:

    npm install -g @opencode/cli
  2. Open a new terminal window and run:
    opencode
  3. Type /connect and choose where the models come from: OpenCode’s free ones, the OpenCode Go plan, or your ChatGPT or GitHub Copilot subscription.
  4. Type /models and pick a model. The free ones are marked Free.
  5. Ask any question, make sure the agent replies, and quit.

Free models

As of late November 2026, OpenCode lists about ten free models. The most notable:

ModelWhat it is
DeepSeek V4.1 Flash FreeA fast model from the Chinese company DeepSeek. A good choice for small edits and for reviewing another agent’s code
Big PickleThe model OpenCode offers by default
MiMo-V2.6-Flash FreeA fast model from Xiaomi
Nemotron 3.5 FreeNvidia’s models, including a variant that understands images

The same models will show up in bb once you select the opencode agent in the prompt box. Three caveats. They’re free “for a limited time”: the list changes, and a model can disappear or start costing money. Some free models are unavailable in certain countries. And the model provider may use what you send to a free model to improve it, so don’t send anything you wouldn’t want someone else to see.

This is where I’m least sureIn the fall of 2026 OpenCode moved to version 2, and the documentation is still catching up. Older instructions online point you to the opencode-ai package. That’s version 1; don’t install it. I’ve checked the version 2 installation on Windows only against the documentation, not hands-on. One last thing: the website says the free models work without an account, while the documentation says you need an OpenCode Console account. If /connect asks you to sign up, that’s expected.

If OpenCode doesn’t install on the first try, don’t spend your evening on it. It plays a supporting role in this course, and you can come back to it later.

Checking your work

Before installing bb, let’s make sure the agents are in place. Open a new terminal window and run the commands for the agents you installed, one at a time. Each should reply with a version number.

claude --version
codex --version
opencode --version

If you see “command not found” or “is not recognized” instead of a version, that agent’s installation didn’t finish. Go back to its step and run the install command again. You can also paste the whole error message into a regular chatbot and ask what to do. Chatbots are still very good at that.

Before you move on
  • At least one agent replies with a version number
  • I started that agent and signed in through the browser
  • The agent answered my “hello” in the terminal
  • Windows: Git for Windows is installed
Why you had to say helloSigning in is where things break most often. bb can’t sign in for you; it will simply show an error in your very first conversation. If the agent answered in the terminal, you’re signed in, and it will work in bb right away.

Review questions

Why do you install the agents before bb?

bb finds agents that are already installed and uses their existing sign-in. bb doesn’t ship with agents and doesn’t sign in to accounts for you. One installed agent is enough; you can add the others later.

What do you have to do with each agent after installing it?

Start it in the terminal and sign in to your account through the browser. You sign in once, in the terminal. If you skip this step, the agent shows up in bb’s list, but the very first conversation ends with an authentication error.

Right after installation, the terminal says the claude command isn’t found. What do you do first?

Open a new terminal window and run the command again. A terminal window that was already open doesn’t know about a program you just installed. Most of the time, opening a new one is all it takes.

What do you need to install on Windows before anything else?

Git for Windows. The native version of bb doesn’t work without Git for Windows, and the agents use it to run commands.

This page covers a single module. The interactive version of the course has steps, quizzes, and checklists that save your progress.

Open this module in the course →
← 02. What you’ll need 04. Installing bb →

By Yury Kononov, Chief Technology Officer. The course is free and licensed under CC BY 4.0. Updated 2026-11-28. Contact the author: @ykononov.