The open source coding agent.
TypeScript
Moving readme to docs
Jay Vf768313c4f91
diff --git a/www/src/content/docs/docs/cli.mdx b/www/src/content/docs/docs/cli.mdxnew file mode 100644index 00000000000..5f81cc866a1--- /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.mdxnew file mode 100644index 00000000000..e6628d6c3be--- /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.mdxnew file mode 100644index 00000000000..3b7d6db0936--- /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.mdxnew file mode 100644index 00000000000..2f964ad87dc--- /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.mdxnew file mode 100644index 00000000000..1453b65a1a8--- /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.mdxnew file mode 100644index 00000000000..85bafb0de3a--- /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.mdxnew file mode 100644index 00000000000..f8ee328453c--- /dev/null+++ b/www/src/content/docs/docs/themes.mdx@@ -0,0 +1,3 @@+---+title: Themes+---