docs: rebuild v2 documentation

This commit is contained in:
Dax Raad
2026-07-06 00:58:00 -04:00
parent 4e019ba5d9
commit e6e951b252
27 changed files with 254 additions and 1679 deletions
+189 -43
View File
@@ -1,56 +1,202 @@
---
title: "Introduction"
description: "Welcome to the new home for your documentation"
title: "Intro"
description: "Get started with OpenCode."
---
## Setting up
[**OpenCode**](https://opencode.ai) is an open source AI coding agent. It's available as a terminal-based interface or
desktop app.
Get your documentation site up and running in minutes.
<img
src="https://raw.githubusercontent.com/anomalyco/opencode/dev/packages/web/src/assets/lander/screenshot.png"
alt="OpenCode TUI with the opencode theme"
/>
<Card title="Start here" icon="rocket" href="/quickstart" horizontal>
Follow our three step quickstart guide.
</Card>
Let's get started.
## Make it yours
---
Design a docs site that looks great and empowers your users.
#### Prerequisites
<Columns cols={2}>
<Card title="Edit locally" icon="pen-to-square" href="/development">
Edit your docs locally and preview them in real time.
</Card>
<Card title="Customize your site" icon="palette" href="/essentials/settings">
Customize the design and colors of your site to match your brand.
</Card>
<Card title="Set up navigation" icon="map" href="/essentials/navigation">
Organize your docs to help users find what they need and succeed with your product.
</Card>
<Card title="API documentation" icon="terminal" href="/api-reference/introduction">
Auto-generate API documentation from OpenAPI specifications.
</Card>
</Columns>
To use OpenCode in your terminal, you'll need:
## Create beautiful pages
1. A modern terminal emulator like:
- [Ghostty](https://ghostty.org), Linux and macOS
- [WezTerm](https://wezterm.org), cross-platform
- [Alacritty](https://alacritty.org), cross-platform
- [Kitty](https://sw.kovidgoyal.net/kitty/), Linux and macOS
2. API keys for the LLM providers you want to use.
Everything you need to create world-class documentation.
---
<Columns cols={2}>
<Card title="Write with MDX" icon="pen-fancy" href="/essentials/markdown">
Use MDX to style your docs pages.
</Card>
<Card title="Code samples" icon="code" href="/essentials/code">
Add sample code to demonstrate how to use your product.
</Card>
<Card title="Images" icon="image" href="/essentials/images">
Display images and other media.
</Card>
<Card title="Reusable snippets" icon="recycle" href="/essentials/reusable-snippets">
Write once and reuse across your docs.
</Card>
</Columns>
## Install
## Need inspiration?
<Note>The curl install script is not available in beta.</Note>
<Card title="See complete examples" icon="stars" href="https://mintlify.com/customers">
Browse our showcase of exceptional documentation sites.
</Card>
You can also install it with the following package managers.
<Tabs>
<Tab title="npm">
```bash
npm install -g @opencode-ai/cli@next
```
</Tab>
<Tab title="bun">
```bash
bun install -g @opencode-ai/cli@next
```
</Tab>
<Tab title="pnpm">
```bash
pnpm install -g @opencode-ai/cli@next
```
</Tab>
<Tab title="Yarn">
```bash
yarn global add @opencode-ai/cli@next
```
</Tab>
</Tabs>
<Note>During beta, the executable is named `opencode2`.</Note>
### Homebrew
Homebrew installation is not available in beta.
### Arch Linux
Arch Linux installation is not available in beta.
### Windows
<Tip>
For the best experience on Windows, use [Windows Subsystem for Linux
(WSL)](https://opencode.ai/docs/windows-wsl). It provides better performance and full compatibility with OpenCode's
features.
</Tip>
<Tabs>
<Tab title="chocolatey">
Chocolatey installation is not available in beta.
</Tab>
<Tab title="scoop">
Scoop installation is not available in beta.
</Tab>
<Tab title="mise">
Mise installation is not available in beta.
</Tab>
<Tab title="docker">
Docker installation is not available in beta.
</Tab>
</Tabs>
Standalone binaries are not available in beta.
---
## Connect
With OpenCode you can use any LLM provider by configuring its API key.
If you are new to LLM providers, we recommend [OpenCode Zen](https://opencode.ai/docs/zen). It's a curated list of models
that have been tested and verified by the OpenCode team.
1. Run `/connect` in the TUI, select **opencode**, and open [opencode.ai/auth](https://opencode.ai/auth).
```text
/connect
```
2. Sign in, add your billing details, and copy your API key.
3. Paste your API key into the prompt.
Alternatively, select another provider. See the current [provider directory](https://opencode.ai/docs/providers#directory).
---
## Usage
You are now ready to use OpenCode in your project. Here are a few common workflows.
### Ask questions
Ask OpenCode to explain your codebase.
<Tip>Use `@` to fuzzy search for files in the project.</Tip>
```text
How is authentication handled in @packages/functions/src/api/index.ts
```
### Add features
For larger features, start by asking OpenCode to create a plan.
1. **Create a plan**
Switch to **Plan mode** with `Tab`. Plan mode prevents OpenCode from making changes while it proposes an implementation.
```text
<TAB>
```
Describe the feature with enough context to understand the desired behavior.
```text
When a user deletes a note, flag it as deleted in the database.
Create a screen that shows recently deleted notes.
From this screen, the user can restore a note or permanently delete it.
```
<Tip>Give OpenCode plenty of context and examples.</Tip>
2. **Iterate on the plan**
Give feedback or add more detail after OpenCode proposes a plan.
```text
Use the attached image as a visual reference for the new screen.
```
You can drag and drop images into the terminal to add them to your prompt.
3. **Build the feature**
When the plan looks right, press `Tab` to return to **Build mode** and ask OpenCode to implement it.
```text
Sounds good. Go ahead and make the changes.
```
### Make changes
For straightforward work, ask OpenCode to make the change directly and include relevant files and examples.
```text
Add authentication to the /settings route. Follow the approach used in
@packages/functions/src/notes.ts and implement it in
@packages/functions/src/settings.ts.
```
### Undo changes
Use `/undo` when a change isn't what you wanted.
```text
/undo
```
OpenCode reverts the changes and restores your original message so you can revise it. Run `/undo` multiple times to undo
multiple changes, or use `/redo` to reapply them.
```text
/redo
```
---
## Customize
Make OpenCode your own by [picking a theme](https://opencode.ai/docs/themes), [customizing
keybinds](https://opencode.ai/docs/keybinds), [configuring formatters](https://opencode.ai/docs/formatters), [creating
commands](https://opencode.ai/docs/commands), or editing the [OpenCode config](https://opencode.ai/docs/config).