Moving readme to docs
This commit is contained in:
3
www/src/content/docs/docs/cli.mdx
Normal file
3
www/src/content/docs/docs/cli.mdx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: CLI
|
||||||
|
---
|
||||||
84
www/src/content/docs/docs/config.mdx
Normal file
84
www/src/content/docs/docs/config.mdx
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
---
|
||||||
|
title: Config
|
||||||
|
---
|
||||||
|
|
||||||
|
OpenCode looks for configuration in the following locations:
|
||||||
|
|
||||||
|
- `$HOME/.opencode.json`
|
||||||
|
- `$XDG_CONFIG_HOME/opencode/.opencode.json`
|
||||||
|
- `./.opencode.json` (local directory)
|
||||||
|
|
||||||
|
## Environment variables
|
||||||
|
|
||||||
|
You can configure OpenCode using environment variables:
|
||||||
|
|
||||||
|
| Environment Variable | Purpose |
|
||||||
|
| -------------------------- | ------------------------------------------------------ |
|
||||||
|
| `ANTHROPIC_API_KEY` | For Claude models |
|
||||||
|
| `OPENAI_API_KEY` | For OpenAI models |
|
||||||
|
| `GEMINI_API_KEY` | For Google Gemini models |
|
||||||
|
| `GROQ_API_KEY` | For Groq models |
|
||||||
|
| `AWS_ACCESS_KEY_ID` | For AWS Bedrock (Claude) |
|
||||||
|
| `AWS_SECRET_ACCESS_KEY` | For AWS Bedrock (Claude) |
|
||||||
|
| `AWS_REGION` | For AWS Bedrock (Claude) |
|
||||||
|
| `AZURE_OPENAI_ENDPOINT` | For Azure OpenAI models |
|
||||||
|
| `AZURE_OPENAI_API_KEY` | For Azure OpenAI models (optional when using Entra ID) |
|
||||||
|
| `AZURE_OPENAI_API_VERSION` | For Azure OpenAI models |
|
||||||
|
|
||||||
|
## OpenCode config
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"directory": ".opencode"
|
||||||
|
},
|
||||||
|
"providers": {
|
||||||
|
"openai": {
|
||||||
|
"apiKey": "your-api-key",
|
||||||
|
"disabled": false
|
||||||
|
},
|
||||||
|
"anthropic": {
|
||||||
|
"apiKey": "your-api-key",
|
||||||
|
"disabled": false
|
||||||
|
},
|
||||||
|
"groq": {
|
||||||
|
"apiKey": "your-api-key",
|
||||||
|
"disabled": false
|
||||||
|
},
|
||||||
|
"openrouter": {
|
||||||
|
"apiKey": "your-api-key",
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"agents": {
|
||||||
|
"primary": {
|
||||||
|
"model": "claude-3.7-sonnet",
|
||||||
|
"maxTokens": 5000
|
||||||
|
},
|
||||||
|
"task": {
|
||||||
|
"model": "claude-3.7-sonnet",
|
||||||
|
"maxTokens": 5000
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"model": "claude-3.7-sonnet",
|
||||||
|
"maxTokens": 80
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mcpServers": {
|
||||||
|
"example": {
|
||||||
|
"type": "stdio",
|
||||||
|
"command": "path/to/mcp-server",
|
||||||
|
"env": [],
|
||||||
|
"args": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lsp": {
|
||||||
|
"go": {
|
||||||
|
"disabled": false,
|
||||||
|
"command": "gopls"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"debug": false,
|
||||||
|
"debugLSP": false
|
||||||
|
}
|
||||||
|
```
|
||||||
37
www/src/content/docs/docs/index.mdx
Normal file
37
www/src/content/docs/docs/index.mdx
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
title: Get started
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
#### Using the install script
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install the latest version
|
||||||
|
curl -fsSL https://opencode.ai/install | bash
|
||||||
|
|
||||||
|
# Install a specific version
|
||||||
|
curl -fsSL https://opencode.ai/install | VERSION=0.1.0 bash
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Using Homebrew on macOS and Linux
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install sst/tap/opencode
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Using AUR (Arch Linux)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Using yay
|
||||||
|
yay -S opencode-bin
|
||||||
|
|
||||||
|
# Using paru
|
||||||
|
paru -S opencode-bin
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Using Go
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go install github.com/sst/opencode@latest
|
||||||
|
```
|
||||||
3
www/src/content/docs/docs/mcp-servers.mdx
Normal file
3
www/src/content/docs/docs/mcp-servers.mdx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: MCP servers
|
||||||
|
---
|
||||||
5
www/src/content/docs/docs/models.mdx
Normal file
5
www/src/content/docs/docs/models.mdx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: Models
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
5
www/src/content/docs/docs/shortcuts.mdx
Normal file
5
www/src/content/docs/docs/shortcuts.mdx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: Keyboard shortcuts
|
||||||
|
sidebar:
|
||||||
|
label: Shortcuts
|
||||||
|
---
|
||||||
3
www/src/content/docs/docs/themes.mdx
Normal file
3
www/src/content/docs/docs/themes.mdx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Themes
|
||||||
|
---
|
||||||
Reference in New Issue
Block a user