summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-05-21 14:59:09 -0400
committerJay V <[email protected]>2025-05-21 14:59:09 -0400
commitf768313c4f9123956459490f01663d280caf79e5 (patch)
tree1677af371318163a0be3b6ab26ee0a57fd592877
parentd9c1b2cc904ad9f3bf00c1492276a783a7febcf7 (diff)
downloadopencode-f768313c4f9123956459490f01663d280caf79e5.tar.gz
opencode-f768313c4f9123956459490f01663d280caf79e5.zip
Moving readme to docs
-rw-r--r--www/src/content/docs/docs/cli.mdx3
-rw-r--r--www/src/content/docs/docs/config.mdx84
-rw-r--r--www/src/content/docs/docs/index.mdx37
-rw-r--r--www/src/content/docs/docs/mcp-servers.mdx3
-rw-r--r--www/src/content/docs/docs/models.mdx5
-rw-r--r--www/src/content/docs/docs/shortcuts.mdx5
-rw-r--r--www/src/content/docs/docs/themes.mdx3
7 files changed, 140 insertions, 0 deletions
diff --git a/www/src/content/docs/docs/cli.mdx b/www/src/content/docs/docs/cli.mdx
new file mode 100644
index 000000000..5f81cc866
--- /dev/null
+++ b/www/src/content/docs/docs/cli.mdx
@@ -0,0 +1,3 @@
+---
+title: CLI
+---
diff --git a/www/src/content/docs/docs/config.mdx b/www/src/content/docs/docs/config.mdx
new file mode 100644
index 000000000..e6628d6c3
--- /dev/null
+++ b/www/src/content/docs/docs/config.mdx
@@ -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
+}
+```
diff --git a/www/src/content/docs/docs/index.mdx b/www/src/content/docs/docs/index.mdx
new file mode 100644
index 000000000..3b7d6db09
--- /dev/null
+++ b/www/src/content/docs/docs/index.mdx
@@ -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
+```
diff --git a/www/src/content/docs/docs/mcp-servers.mdx b/www/src/content/docs/docs/mcp-servers.mdx
new file mode 100644
index 000000000..2f964ad87
--- /dev/null
+++ b/www/src/content/docs/docs/mcp-servers.mdx
@@ -0,0 +1,3 @@
+---
+title: MCP servers
+---
diff --git a/www/src/content/docs/docs/models.mdx b/www/src/content/docs/docs/models.mdx
new file mode 100644
index 000000000..1453b65a1
--- /dev/null
+++ b/www/src/content/docs/docs/models.mdx
@@ -0,0 +1,5 @@
+---
+title: Models
+---
+
+
diff --git a/www/src/content/docs/docs/shortcuts.mdx b/www/src/content/docs/docs/shortcuts.mdx
new file mode 100644
index 000000000..85bafb0de
--- /dev/null
+++ b/www/src/content/docs/docs/shortcuts.mdx
@@ -0,0 +1,5 @@
+---
+title: Keyboard shortcuts
+sidebar:
+ label: Shortcuts
+---
diff --git a/www/src/content/docs/docs/themes.mdx b/www/src/content/docs/docs/themes.mdx
new file mode 100644
index 000000000..f8ee32845
--- /dev/null
+++ b/www/src/content/docs/docs/themes.mdx
@@ -0,0 +1,3 @@
+---
+title: Themes
+---