We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Installing OpenCode

OpenCode is an open-source AI coding agent. It can read your repository, edit files, run commands, and use your local dev tooling to validate its own work.

If that sounds similar to Claude Code, Cursor, or Codex, that's because it is. They all do the same thing: let an LLM work inside a real software project instead of just chatting about one.

I've used Claude Code, Cursor, and Zed's in-editor agents. They're all in the same category, but I think the OpenCode team's taste, especially around UX, is the best.

OpenCode is:

  • Terminal-first: Everyone on the team can use it no matter which editor they prefer.
  • Open-source: It has a big community contributing to it, and you can see for yourself how it works under the hood.
  • Provider-agnostic: It isn't tied to one AI provider (like Anthropic or OpenAI), so you can choose your favorite.
  • Optimized for UX: The team isn't trying to sell models, so all their energy goes into improving the agent itself.

Sloperator

In this course, we'll be working on "Sloperator," an interpreter for the SlopLang programming language. You'll use OpenCode to help you build Sloperator and learn about effective agentic AI usage. Sloperator is written in Python, but runs .slop files, which are text files containing SlopLang code.

Assignment

Get OpenCode running in Sloperator.

From this lesson on, the panel that shows run/submit commands for the CLI will instead have copy-pastable prompts that you can give to your agent. Each prompt asks it to run the Boot.dev CLI on your behalf.

  1. curl -fsSL https://opencode.ai/v2/install | bash
    
  2. curl -fsSL https://docs.astral.sh/uv/install.sh | bash
    
  3. opencode --version
    uv --version
    
  4. uv python install 3.13
    
  5. git clone https://github.com/bootdotdev/learn-ai-coding-starter.git
    cd learn-ai-coding-starter
    
  6. uv sync
    
  7. Use uv to run examples/hello.slop using the sloperator.py interpreter. Don't change any files.
    

Copy the Submit prompt from the test panel, paste it into OpenCode's chat, and send it. Approve the command if asked.