Getting Started

Get OpenCode up and running in under 60 seconds.

Prerequisites

Before you begin, make sure you have:

  • Node.js 18+ - Download from nodejs.org
  • npm, yarn, or pnpm - Package manager of your choice

Quick Installation

Create a new OpenCode project with a single command:

npx opencode init my-app
cd my-app
npm run dev

That's it! Your development server is now running at http://localhost:3000.

What's Included

Every new OpenCode project comes with:

  • TypeScript - First-class TypeScript support
  • Hot Reload - Instant feedback during development
  • Optimized Builds - Production-ready output
  • Testing - Built-in test runner
  • Linting - Code quality tools pre-configured

Project Structure

my-app/
├── src/
│   ├── index.ts        # Entry point
│   └── components/     # Your components
├── public/             # Static assets
├── tests/              # Test files
├── opencode.config.js  # Configuration
└── package.json

Next Steps