OpenCode Tutorials
Home
Tutorials
Ecosystem
FAQ
Comparisons
Posts
  • Official Website
  • Official Download
  • Official Docs
  • About
  • Contact
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Trademark Notice
  • 简体中文
  • English
  • Deutsch
Home
Tutorials
Ecosystem
FAQ
Comparisons
Posts
  • Official Website
  • Official Download
  • Official Docs
  • About
  • Contact
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Trademark Notice
  • 简体中文
  • English
  • Deutsch
  • Tutorials

    • Opencode Tutorial Center - From Beginner to Expert
    • Getting Started
    • Advanced Configuration
    • Shortcuts

Core Modes Explained

The biggest difference between Opencode and traditional IDEs is its introduction of Plan (Planning) and Build (Building) modes.

Plan Mode (Planning Mode)

When you press the Tab key to switch to Plan Mode, Opencode transforms into an "architect".

  • Purpose: It will not directly modify code, but will analyze your requirements, read existing code, and then provide a detailed implementation plan.
  • Use Cases:
    • "I want to add a user login feature to this app, how should I do it?"
    • "Help me refactor the database module."
    • Any task involving multiple files and complex logic.
  • Interaction: You can discuss the plan with it repeatedly until you're satisfied.

Tip: In Plan mode, you can drag in design diagrams or screenshots to have the AI generate solutions based on visual mockups.

Build Mode (Building Mode)

Once you confirm the plan is correct, press Tab again (or confirm in the dialog) to enter Build Mode.

  • Purpose: Opencode transforms into a "senior engineer" and begins executing the plan, directly writing, modifying, and deleting code in your files.
  • Capabilities:
    • Automatically creates new files.
    • Runs terminal commands (like npm install), requires authorization.
    • Fixes compilation errors (it sees terminal errors and automatically fixes them).
  • Undo: If something goes wrong, type /undo to roll back with one command.

Summary

ModeRoleBehaviorShortcut
PlanArchitectRead-only analysis, outputs stepsTab
BuildEngineerRead/write code, execute commandsTab

Common Commands (CLI Commands)

In Opencode's dialog box, you can use the following Slash Commands (/) for quick operations:

  • /init: Initialize the current project, generate AGENTS.md (project manual) to help AI understand your architecture.
  • /connect: Connect to cloud account, manage subscriptions and API Keys.
  • /undo: Undo the last AI code change.
  • /redo: Redo the last undone operation.
  • /share: Generate a shareable link for the current conversation to send to colleagues.
  • /reset: Clear current context and start a new topic.
Last Updated: 2/28/26, 2:48 PM