Getting Started
Welcome to the world of Opencode! This tutorial will guide you through the installation and your first AI coding task.
1. Install Opencode
You can download the installer from the official website or use a command-line package manager for quick installation.
macOS
Recommended via Homebrew:
brew install anomalyco/tap/opencode
Or download the .dmg file.
Windows
Multiple installation methods are supported:
Method A: Using Chocolatey
choco install opencode
Method B: Using Scoop
scoop bucket add extras
scoop install extras/opencode
Method C: Using NPM (Node.js required)
npm install -g opencode-ai
Linux
Supports .deb, .rpm, and AppImage. You can also use Paru (Arch Linux):
paru -S opencode-bin
2. First Run & Configuration
After launching Opencode, you will see the welcome wizard:
- Sign In: Login with your GitHub or Opencode account to sync settings.
- Select AI Model: Default built-in Gemini/GPT-4o trial, or configure your own API Key.
- Import Settings: If you used VS Code before, you can import extensions and keybindings with one click.
3. Writing Your First Line of Code
- Open a folder or create a new project.
- Use
Cmd+K(macOS) orCtrl+K(Windows) to invoke the AI command box. - Type: "Create a Python Snake game".
- Watch how Opencode automatically generates files and writes code.