Jay V пре 9 месеци
родитељ
комит
f768313c4f

+ 3 - 0
www/src/content/docs/docs/cli.mdx

@@ -0,0 +1,3 @@
+---
+title: CLI
+---

+ 84 - 0
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
+}
+```

+ 37 - 0
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
+```

+ 3 - 0
www/src/content/docs/docs/mcp-servers.mdx

@@ -0,0 +1,3 @@
+---
+title: MCP servers
+---

+ 5 - 0
www/src/content/docs/docs/models.mdx

@@ -0,0 +1,5 @@
+---
+title: Models
+---
+
+

+ 5 - 0
www/src/content/docs/docs/shortcuts.mdx

@@ -0,0 +1,5 @@
+---
+title: Keyboard shortcuts
+sidebar:
+  label: Shortcuts
+---

+ 3 - 0
www/src/content/docs/docs/themes.mdx

@@ -0,0 +1,3 @@
+---
+title: Themes
+---