@neurocode-ai/web 1.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/astro.config.mjs +324 -0
- package/config.mjs +14 -0
- package/package.json +44 -0
- package/public/apple-touch-icon-v3.png +1 -0
- package/public/apple-touch-icon.png +1 -0
- package/public/favicon-96x96-v3.png +1 -0
- package/public/favicon-96x96.png +1 -0
- package/public/favicon-v3.ico +1 -0
- package/public/favicon-v3.svg +1 -0
- package/public/favicon.ico +1 -0
- package/public/favicon.svg +1 -0
- package/public/robots.txt +6 -0
- package/public/site.webmanifest +1 -0
- package/public/social-share-zen.png +1 -0
- package/public/social-share.png +1 -0
- package/public/theme.json +183 -0
- package/public/web-app-manifest-192x192.png +1 -0
- package/public/web-app-manifest-512x512.png +1 -0
- package/src/assets/lander/check.svg +2 -0
- package/src/assets/lander/copy.svg +2 -0
- package/src/assets/lander/screenshot-github.png +0 -0
- package/src/assets/lander/screenshot-splash.png +0 -0
- package/src/assets/lander/screenshot-vscode.png +0 -0
- package/src/assets/lander/screenshot.png +0 -0
- package/src/assets/logo-dark.svg +18 -0
- package/src/assets/logo-light.svg +18 -0
- package/src/assets/logo-ornate-dark.svg +18 -0
- package/src/assets/logo-ornate-light.svg +18 -0
- package/src/assets/web/web-homepage-active-session.png +0 -0
- package/src/assets/web/web-homepage-new-session.png +0 -0
- package/src/assets/web/web-homepage-see-servers.png +0 -0
- package/src/components/Footer.astro +125 -0
- package/src/components/Head.astro +54 -0
- package/src/components/Header.astro +136 -0
- package/src/components/Hero.astro +11 -0
- package/src/components/Lander.astro +721 -0
- package/src/components/LanguageSelect.astro +29 -0
- package/src/components/Share.tsx +644 -0
- package/src/components/SiteTitle.astro +59 -0
- package/src/components/icons/custom.tsx +87 -0
- package/src/components/icons/index.tsx +4454 -0
- package/src/components/share/common.tsx +128 -0
- package/src/components/share/content-bash.module.css +85 -0
- package/src/components/share/content-bash.tsx +67 -0
- package/src/components/share/content-code.module.css +26 -0
- package/src/components/share/content-code.tsx +30 -0
- package/src/components/share/content-diff.module.css +153 -0
- package/src/components/share/content-diff.tsx +240 -0
- package/src/components/share/content-error.module.css +64 -0
- package/src/components/share/content-error.tsx +25 -0
- package/src/components/share/content-markdown.module.css +154 -0
- package/src/components/share/content-markdown.tsx +74 -0
- package/src/components/share/content-text.module.css +63 -0
- package/src/components/share/content-text.tsx +38 -0
- package/src/components/share/copy-button.module.css +30 -0
- package/src/components/share/copy-button.tsx +36 -0
- package/src/components/share/part.module.css +428 -0
- package/src/components/share/part.tsx +816 -0
- package/src/components/share.module.css +832 -0
- package/src/content/docs/acp.mdx +156 -0
- package/src/content/docs/agents.mdx +781 -0
- package/src/content/docs/ar/acp.mdx +156 -0
- package/src/content/docs/ar/agents.mdx +754 -0
- package/src/content/docs/ar/cli.mdx +616 -0
- package/src/content/docs/ar/commands.mdx +322 -0
- package/src/content/docs/ar/config.mdx +685 -0
- package/src/content/docs/ar/custom-tools.mdx +196 -0
- package/src/content/docs/ar/ecosystem.mdx +78 -0
- package/src/content/docs/ar/enterprise.mdx +165 -0
- package/src/content/docs/ar/formatters.mdx +131 -0
- package/src/content/docs/ar/github.mdx +321 -0
- package/src/content/docs/ar/gitlab.mdx +195 -0
- package/src/content/docs/ar/go.mdx +224 -0
- package/src/content/docs/ar/ide.mdx +48 -0
- package/src/content/docs/ar/index.mdx +344 -0
- package/src/content/docs/ar/keybinds.mdx +194 -0
- package/src/content/docs/ar/lsp.mdx +207 -0
- package/src/content/docs/ar/mcp-servers.mdx +511 -0
- package/src/content/docs/ar/models.mdx +222 -0
- package/src/content/docs/ar/network.mdx +57 -0
- package/src/content/docs/ar/permissions.mdx +235 -0
- package/src/content/docs/ar/plugins.mdx +385 -0
- package/src/content/docs/ar/providers.mdx +1983 -0
- package/src/content/docs/ar/rules.mdx +180 -0
- package/src/content/docs/ar/sdk.mdx +463 -0
- package/src/content/docs/ar/server.mdx +287 -0
- package/src/content/docs/ar/share.mdx +127 -0
- package/src/content/docs/ar/skills.mdx +222 -0
- package/src/content/docs/ar/themes.mdx +369 -0
- package/src/content/docs/ar/tools.mdx +341 -0
- package/src/content/docs/ar/troubleshooting.mdx +299 -0
- package/src/content/docs/ar/tui.mdx +426 -0
- package/src/content/docs/ar/web.mdx +142 -0
- package/src/content/docs/ar/windows-wsl.mdx +113 -0
- package/src/content/docs/ar/zen.mdx +332 -0
- package/src/content/docs/bs/acp.mdx +156 -0
- package/src/content/docs/bs/agents.mdx +754 -0
- package/src/content/docs/bs/cli.mdx +614 -0
- package/src/content/docs/bs/commands.mdx +316 -0
- package/src/content/docs/bs/config.mdx +685 -0
- package/src/content/docs/bs/custom-tools.mdx +195 -0
- package/src/content/docs/bs/ecosystem.mdx +78 -0
- package/src/content/docs/bs/enterprise.mdx +165 -0
- package/src/content/docs/bs/formatters.mdx +124 -0
- package/src/content/docs/bs/github.mdx +311 -0
- package/src/content/docs/bs/gitlab.mdx +188 -0
- package/src/content/docs/bs/go.mdx +238 -0
- package/src/content/docs/bs/ide.mdx +47 -0
- package/src/content/docs/bs/index.mdx +323 -0
- package/src/content/docs/bs/keybinds.mdx +194 -0
- package/src/content/docs/bs/lsp.mdx +204 -0
- package/src/content/docs/bs/mcp-servers.mdx +482 -0
- package/src/content/docs/bs/models.mdx +201 -0
- package/src/content/docs/bs/network.mdx +51 -0
- package/src/content/docs/bs/permissions.mdx +228 -0
- package/src/content/docs/bs/plugins.mdx +371 -0
- package/src/content/docs/bs/providers.mdx +1993 -0
- package/src/content/docs/bs/rules.mdx +180 -0
- package/src/content/docs/bs/sdk.mdx +463 -0
- package/src/content/docs/bs/server.mdx +284 -0
- package/src/content/docs/bs/share.mdx +127 -0
- package/src/content/docs/bs/skills.mdx +222 -0
- package/src/content/docs/bs/themes.mdx +369 -0
- package/src/content/docs/bs/tools.mdx +341 -0
- package/src/content/docs/bs/troubleshooting.mdx +300 -0
- package/src/content/docs/bs/tui.mdx +432 -0
- package/src/content/docs/bs/web.mdx +142 -0
- package/src/content/docs/bs/windows-wsl.mdx +113 -0
- package/src/content/docs/bs/zen.mdx +350 -0
- package/src/content/docs/cli.mdx +733 -0
- package/src/content/docs/commands.mdx +323 -0
- package/src/content/docs/config.mdx +941 -0
- package/src/content/docs/custom-tools.mdx +196 -0
- package/src/content/docs/da/acp.mdx +156 -0
- package/src/content/docs/da/agents.mdx +755 -0
- package/src/content/docs/da/cli.mdx +617 -0
- package/src/content/docs/da/commands.mdx +323 -0
- package/src/content/docs/da/config.mdx +688 -0
- package/src/content/docs/da/custom-tools.mdx +196 -0
- package/src/content/docs/da/ecosystem.mdx +78 -0
- package/src/content/docs/da/enterprise.mdx +170 -0
- package/src/content/docs/da/formatters.mdx +131 -0
- package/src/content/docs/da/github.mdx +321 -0
- package/src/content/docs/da/gitlab.mdx +195 -0
- package/src/content/docs/da/go.mdx +238 -0
- package/src/content/docs/da/ide.mdx +48 -0
- package/src/content/docs/da/index.mdx +360 -0
- package/src/content/docs/da/keybinds.mdx +194 -0
- package/src/content/docs/da/lsp.mdx +208 -0
- package/src/content/docs/da/mcp-servers.mdx +511 -0
- package/src/content/docs/da/models.mdx +223 -0
- package/src/content/docs/da/network.mdx +57 -0
- package/src/content/docs/da/permissions.mdx +235 -0
- package/src/content/docs/da/plugins.mdx +389 -0
- package/src/content/docs/da/providers.mdx +1981 -0
- package/src/content/docs/da/rules.mdx +180 -0
- package/src/content/docs/da/sdk.mdx +463 -0
- package/src/content/docs/da/server.mdx +287 -0
- package/src/content/docs/da/share.mdx +128 -0
- package/src/content/docs/da/skills.mdx +222 -0
- package/src/content/docs/da/themes.mdx +369 -0
- package/src/content/docs/da/tools.mdx +341 -0
- package/src/content/docs/da/troubleshooting.mdx +300 -0
- package/src/content/docs/da/tui.mdx +426 -0
- package/src/content/docs/da/web.mdx +142 -0
- package/src/content/docs/da/windows-wsl.mdx +113 -0
- package/src/content/docs/da/zen.mdx +345 -0
- package/src/content/docs/de/acp.mdx +156 -0
- package/src/content/docs/de/agents.mdx +741 -0
- package/src/content/docs/de/cli.mdx +616 -0
- package/src/content/docs/de/commands.mdx +323 -0
- package/src/content/docs/de/config.mdx +684 -0
- package/src/content/docs/de/custom-tools.mdx +170 -0
- package/src/content/docs/de/ecosystem.mdx +78 -0
- package/src/content/docs/de/enterprise.mdx +170 -0
- package/src/content/docs/de/formatters.mdx +131 -0
- package/src/content/docs/de/github.mdx +321 -0
- package/src/content/docs/de/gitlab.mdx +195 -0
- package/src/content/docs/de/go.mdx +226 -0
- package/src/content/docs/de/ide.mdx +48 -0
- package/src/content/docs/de/index.mdx +356 -0
- package/src/content/docs/de/keybinds.mdx +194 -0
- package/src/content/docs/de/lsp.mdx +207 -0
- package/src/content/docs/de/mcp-servers.mdx +511 -0
- package/src/content/docs/de/models.mdx +223 -0
- package/src/content/docs/de/network.mdx +57 -0
- package/src/content/docs/de/permissions.mdx +235 -0
- package/src/content/docs/de/plugins.mdx +384 -0
- package/src/content/docs/de/providers.mdx +1987 -0
- package/src/content/docs/de/rules.mdx +190 -0
- package/src/content/docs/de/sdk.mdx +465 -0
- package/src/content/docs/de/server.mdx +291 -0
- package/src/content/docs/de/share.mdx +130 -0
- package/src/content/docs/de/skills.mdx +222 -0
- package/src/content/docs/de/themes.mdx +372 -0
- package/src/content/docs/de/tools.mdx +352 -0
- package/src/content/docs/de/troubleshooting.mdx +300 -0
- package/src/content/docs/de/tui.mdx +429 -0
- package/src/content/docs/de/web.mdx +142 -0
- package/src/content/docs/de/windows-wsl.mdx +115 -0
- package/src/content/docs/de/zen.mdx +327 -0
- package/src/content/docs/ecosystem.mdx +83 -0
- package/src/content/docs/enterprise.mdx +169 -0
- package/src/content/docs/es/acp.mdx +156 -0
- package/src/content/docs/es/agents.mdx +755 -0
- package/src/content/docs/es/cli.mdx +616 -0
- package/src/content/docs/es/commands.mdx +323 -0
- package/src/content/docs/es/config.mdx +685 -0
- package/src/content/docs/es/custom-tools.mdx +196 -0
- package/src/content/docs/es/ecosystem.mdx +78 -0
- package/src/content/docs/es/enterprise.mdx +170 -0
- package/src/content/docs/es/formatters.mdx +131 -0
- package/src/content/docs/es/github.mdx +321 -0
- package/src/content/docs/es/gitlab.mdx +195 -0
- package/src/content/docs/es/go.mdx +238 -0
- package/src/content/docs/es/ide.mdx +48 -0
- package/src/content/docs/es/index.mdx +345 -0
- package/src/content/docs/es/keybinds.mdx +194 -0
- package/src/content/docs/es/lsp.mdx +208 -0
- package/src/content/docs/es/mcp-servers.mdx +511 -0
- package/src/content/docs/es/models.mdx +223 -0
- package/src/content/docs/es/network.mdx +57 -0
- package/src/content/docs/es/permissions.mdx +235 -0
- package/src/content/docs/es/plugins.mdx +389 -0
- package/src/content/docs/es/providers.mdx +1989 -0
- package/src/content/docs/es/rules.mdx +180 -0
- package/src/content/docs/es/sdk.mdx +463 -0
- package/src/content/docs/es/server.mdx +287 -0
- package/src/content/docs/es/share.mdx +128 -0
- package/src/content/docs/es/skills.mdx +222 -0
- package/src/content/docs/es/themes.mdx +369 -0
- package/src/content/docs/es/tools.mdx +341 -0
- package/src/content/docs/es/troubleshooting.mdx +300 -0
- package/src/content/docs/es/tui.mdx +429 -0
- package/src/content/docs/es/web.mdx +142 -0
- package/src/content/docs/es/windows-wsl.mdx +113 -0
- package/src/content/docs/es/zen.mdx +345 -0
- package/src/content/docs/formatters.mdx +143 -0
- package/src/content/docs/fr/acp.mdx +156 -0
- package/src/content/docs/fr/agents.mdx +755 -0
- package/src/content/docs/fr/cli.mdx +617 -0
- package/src/content/docs/fr/commands.mdx +322 -0
- package/src/content/docs/fr/config.mdx +686 -0
- package/src/content/docs/fr/custom-tools.mdx +170 -0
- package/src/content/docs/fr/ecosystem.mdx +78 -0
- package/src/content/docs/fr/enterprise.mdx +165 -0
- package/src/content/docs/fr/formatters.mdx +131 -0
- package/src/content/docs/fr/github.mdx +322 -0
- package/src/content/docs/fr/gitlab.mdx +195 -0
- package/src/content/docs/fr/go.mdx +224 -0
- package/src/content/docs/fr/ide.mdx +48 -0
- package/src/content/docs/fr/index.mdx +344 -0
- package/src/content/docs/fr/keybinds.mdx +194 -0
- package/src/content/docs/fr/lsp.mdx +208 -0
- package/src/content/docs/fr/mcp-servers.mdx +511 -0
- package/src/content/docs/fr/models.mdx +222 -0
- package/src/content/docs/fr/network.mdx +57 -0
- package/src/content/docs/fr/permissions.mdx +235 -0
- package/src/content/docs/fr/plugins.mdx +384 -0
- package/src/content/docs/fr/providers.mdx +1996 -0
- package/src/content/docs/fr/rules.mdx +180 -0
- package/src/content/docs/fr/sdk.mdx +463 -0
- package/src/content/docs/fr/server.mdx +287 -0
- package/src/content/docs/fr/share.mdx +128 -0
- package/src/content/docs/fr/skills.mdx +222 -0
- package/src/content/docs/fr/themes.mdx +369 -0
- package/src/content/docs/fr/tools.mdx +341 -0
- package/src/content/docs/fr/troubleshooting.mdx +300 -0
- package/src/content/docs/fr/tui.mdx +429 -0
- package/src/content/docs/fr/web.mdx +142 -0
- package/src/content/docs/fr/windows-wsl.mdx +113 -0
- package/src/content/docs/fr/zen.mdx +327 -0
- package/src/content/docs/github.mdx +321 -0
- package/src/content/docs/gitlab.mdx +195 -0
- package/src/content/docs/go.mdx +238 -0
- package/src/content/docs/ide.mdx +48 -0
- package/src/content/docs/index.mdx +360 -0
- package/src/content/docs/it/acp.mdx +155 -0
- package/src/content/docs/it/agents.mdx +753 -0
- package/src/content/docs/it/cli.mdx +617 -0
- package/src/content/docs/it/commands.mdx +322 -0
- package/src/content/docs/it/config.mdx +685 -0
- package/src/content/docs/it/custom-tools.mdx +196 -0
- package/src/content/docs/it/ecosystem.mdx +78 -0
- package/src/content/docs/it/enterprise.mdx +165 -0
- package/src/content/docs/it/formatters.mdx +132 -0
- package/src/content/docs/it/github.mdx +321 -0
- package/src/content/docs/it/gitlab.mdx +195 -0
- package/src/content/docs/it/go.mdx +236 -0
- package/src/content/docs/it/ide.mdx +48 -0
- package/src/content/docs/it/index.mdx +344 -0
- package/src/content/docs/it/keybinds.mdx +194 -0
- package/src/content/docs/it/lsp.mdx +208 -0
- package/src/content/docs/it/mcp-servers.mdx +511 -0
- package/src/content/docs/it/models.mdx +222 -0
- package/src/content/docs/it/network.mdx +57 -0
- package/src/content/docs/it/permissions.mdx +235 -0
- package/src/content/docs/it/plugins.mdx +388 -0
- package/src/content/docs/it/providers.mdx +1964 -0
- package/src/content/docs/it/rules.mdx +180 -0
- package/src/content/docs/it/sdk.mdx +463 -0
- package/src/content/docs/it/server.mdx +284 -0
- package/src/content/docs/it/share.mdx +127 -0
- package/src/content/docs/it/skills.mdx +222 -0
- package/src/content/docs/it/themes.mdx +369 -0
- package/src/content/docs/it/tools.mdx +341 -0
- package/src/content/docs/it/troubleshooting.mdx +299 -0
- package/src/content/docs/it/tui.mdx +426 -0
- package/src/content/docs/it/web.mdx +142 -0
- package/src/content/docs/it/windows-wsl.mdx +113 -0
- package/src/content/docs/it/zen.mdx +345 -0
- package/src/content/docs/ja/acp.mdx +155 -0
- package/src/content/docs/ja/agents.mdx +751 -0
- package/src/content/docs/ja/cli.mdx +616 -0
- package/src/content/docs/ja/commands.mdx +322 -0
- package/src/content/docs/ja/config.mdx +684 -0
- package/src/content/docs/ja/custom-tools.mdx +196 -0
- package/src/content/docs/ja/ecosystem.mdx +78 -0
- package/src/content/docs/ja/enterprise.mdx +166 -0
- package/src/content/docs/ja/formatters.mdx +132 -0
- package/src/content/docs/ja/github.mdx +322 -0
- package/src/content/docs/ja/gitlab.mdx +195 -0
- package/src/content/docs/ja/go.mdx +224 -0
- package/src/content/docs/ja/ide.mdx +48 -0
- package/src/content/docs/ja/index.mdx +350 -0
- package/src/content/docs/ja/keybinds.mdx +194 -0
- package/src/content/docs/ja/lsp.mdx +208 -0
- package/src/content/docs/ja/mcp-servers.mdx +511 -0
- package/src/content/docs/ja/models.mdx +221 -0
- package/src/content/docs/ja/network.mdx +55 -0
- package/src/content/docs/ja/permissions.mdx +282 -0
- package/src/content/docs/ja/plugins.mdx +461 -0
- package/src/content/docs/ja/providers.mdx +1998 -0
- package/src/content/docs/ja/rules.mdx +179 -0
- package/src/content/docs/ja/sdk.mdx +463 -0
- package/src/content/docs/ja/server.mdx +282 -0
- package/src/content/docs/ja/share.mdx +128 -0
- package/src/content/docs/ja/skills.mdx +222 -0
- package/src/content/docs/ja/themes.mdx +667 -0
- package/src/content/docs/ja/tools.mdx +341 -0
- package/src/content/docs/ja/troubleshooting.mdx +300 -0
- package/src/content/docs/ja/tui.mdx +423 -0
- package/src/content/docs/ja/web.mdx +143 -0
- package/src/content/docs/ja/windows-wsl.mdx +116 -0
- package/src/content/docs/ja/zen.mdx +327 -0
- package/src/content/docs/keybinds.mdx +299 -0
- package/src/content/docs/ko/acp.mdx +156 -0
- package/src/content/docs/ko/agents.mdx +754 -0
- package/src/content/docs/ko/cli.mdx +616 -0
- package/src/content/docs/ko/commands.mdx +323 -0
- package/src/content/docs/ko/config.mdx +685 -0
- package/src/content/docs/ko/custom-tools.mdx +196 -0
- package/src/content/docs/ko/ecosystem.mdx +78 -0
- package/src/content/docs/ko/enterprise.mdx +165 -0
- package/src/content/docs/ko/formatters.mdx +132 -0
- package/src/content/docs/ko/github.mdx +321 -0
- package/src/content/docs/ko/gitlab.mdx +195 -0
- package/src/content/docs/ko/go.mdx +224 -0
- package/src/content/docs/ko/ide.mdx +48 -0
- package/src/content/docs/ko/index.mdx +344 -0
- package/src/content/docs/ko/keybinds.mdx +194 -0
- package/src/content/docs/ko/lsp.mdx +208 -0
- package/src/content/docs/ko/mcp-servers.mdx +511 -0
- package/src/content/docs/ko/models.mdx +223 -0
- package/src/content/docs/ko/network.mdx +57 -0
- package/src/content/docs/ko/permissions.mdx +235 -0
- package/src/content/docs/ko/plugins.mdx +388 -0
- package/src/content/docs/ko/providers.mdx +1984 -0
- package/src/content/docs/ko/rules.mdx +179 -0
- package/src/content/docs/ko/sdk.mdx +463 -0
- package/src/content/docs/ko/server.mdx +287 -0
- package/src/content/docs/ko/share.mdx +128 -0
- package/src/content/docs/ko/skills.mdx +222 -0
- package/src/content/docs/ko/themes.mdx +369 -0
- package/src/content/docs/ko/tools.mdx +341 -0
- package/src/content/docs/ko/troubleshooting.mdx +303 -0
- package/src/content/docs/ko/tui.mdx +425 -0
- package/src/content/docs/ko/web.mdx +142 -0
- package/src/content/docs/ko/windows-wsl.mdx +119 -0
- package/src/content/docs/ko/zen.mdx +327 -0
- package/src/content/docs/lsp.mdx +214 -0
- package/src/content/docs/mcp-servers.mdx +512 -0
- package/src/content/docs/models.mdx +223 -0
- package/src/content/docs/nb/acp.mdx +156 -0
- package/src/content/docs/nb/agents.mdx +754 -0
- package/src/content/docs/nb/cli.mdx +617 -0
- package/src/content/docs/nb/commands.mdx +323 -0
- package/src/content/docs/nb/config.mdx +688 -0
- package/src/content/docs/nb/custom-tools.mdx +196 -0
- package/src/content/docs/nb/ecosystem.mdx +78 -0
- package/src/content/docs/nb/enterprise.mdx +170 -0
- package/src/content/docs/nb/formatters.mdx +131 -0
- package/src/content/docs/nb/github.mdx +325 -0
- package/src/content/docs/nb/gitlab.mdx +195 -0
- package/src/content/docs/nb/go.mdx +238 -0
- package/src/content/docs/nb/ide.mdx +48 -0
- package/src/content/docs/nb/index.mdx +359 -0
- package/src/content/docs/nb/keybinds.mdx +194 -0
- package/src/content/docs/nb/lsp.mdx +208 -0
- package/src/content/docs/nb/mcp-servers.mdx +624 -0
- package/src/content/docs/nb/models.mdx +223 -0
- package/src/content/docs/nb/network.mdx +57 -0
- package/src/content/docs/nb/permissions.mdx +235 -0
- package/src/content/docs/nb/plugins.mdx +389 -0
- package/src/content/docs/nb/providers.mdx +1956 -0
- package/src/content/docs/nb/rules.mdx +180 -0
- package/src/content/docs/nb/sdk.mdx +463 -0
- package/src/content/docs/nb/server.mdx +287 -0
- package/src/content/docs/nb/share.mdx +128 -0
- package/src/content/docs/nb/skills.mdx +222 -0
- package/src/content/docs/nb/themes.mdx +369 -0
- package/src/content/docs/nb/tools.mdx +341 -0
- package/src/content/docs/nb/troubleshooting.mdx +225 -0
- package/src/content/docs/nb/tui.mdx +429 -0
- package/src/content/docs/nb/web.mdx +105 -0
- package/src/content/docs/nb/windows-wsl.mdx +113 -0
- package/src/content/docs/nb/zen.mdx +345 -0
- package/src/content/docs/network.mdx +57 -0
- package/src/content/docs/permissions.mdx +256 -0
- package/src/content/docs/pl/acp.mdx +158 -0
- package/src/content/docs/pl/agents.mdx +754 -0
- package/src/content/docs/pl/cli.mdx +617 -0
- package/src/content/docs/pl/commands.mdx +323 -0
- package/src/content/docs/pl/config.mdx +680 -0
- package/src/content/docs/pl/custom-tools.mdx +196 -0
- package/src/content/docs/pl/ecosystem.mdx +78 -0
- package/src/content/docs/pl/enterprise.mdx +170 -0
- package/src/content/docs/pl/formatters.mdx +131 -0
- package/src/content/docs/pl/github.mdx +321 -0
- package/src/content/docs/pl/gitlab.mdx +195 -0
- package/src/content/docs/pl/go.mdx +230 -0
- package/src/content/docs/pl/ide.mdx +48 -0
- package/src/content/docs/pl/index.mdx +347 -0
- package/src/content/docs/pl/keybinds.mdx +194 -0
- package/src/content/docs/pl/lsp.mdx +208 -0
- package/src/content/docs/pl/mcp-servers.mdx +511 -0
- package/src/content/docs/pl/models.mdx +223 -0
- package/src/content/docs/pl/network.mdx +57 -0
- package/src/content/docs/pl/permissions.mdx +235 -0
- package/src/content/docs/pl/plugins.mdx +385 -0
- package/src/content/docs/pl/providers.mdx +1986 -0
- package/src/content/docs/pl/rules.mdx +180 -0
- package/src/content/docs/pl/sdk.mdx +463 -0
- package/src/content/docs/pl/server.mdx +287 -0
- package/src/content/docs/pl/share.mdx +128 -0
- package/src/content/docs/pl/skills.mdx +222 -0
- package/src/content/docs/pl/themes.mdx +369 -0
- package/src/content/docs/pl/tools.mdx +341 -0
- package/src/content/docs/pl/troubleshooting.mdx +300 -0
- package/src/content/docs/pl/tui.mdx +429 -0
- package/src/content/docs/pl/web.mdx +142 -0
- package/src/content/docs/pl/windows-wsl.mdx +113 -0
- package/src/content/docs/pl/zen.mdx +344 -0
- package/src/content/docs/plugins.mdx +389 -0
- package/src/content/docs/policies.mdx +137 -0
- package/src/content/docs/providers.mdx +2501 -0
- package/src/content/docs/pt-br/acp.mdx +156 -0
- package/src/content/docs/pt-br/agents.mdx +755 -0
- package/src/content/docs/pt-br/cli.mdx +616 -0
- package/src/content/docs/pt-br/commands.mdx +322 -0
- package/src/content/docs/pt-br/config.mdx +687 -0
- package/src/content/docs/pt-br/custom-tools.mdx +196 -0
- package/src/content/docs/pt-br/ecosystem.mdx +78 -0
- package/src/content/docs/pt-br/enterprise.mdx +166 -0
- package/src/content/docs/pt-br/formatters.mdx +131 -0
- package/src/content/docs/pt-br/github.mdx +321 -0
- package/src/content/docs/pt-br/gitlab.mdx +195 -0
- package/src/content/docs/pt-br/go.mdx +238 -0
- package/src/content/docs/pt-br/ide.mdx +48 -0
- package/src/content/docs/pt-br/index.mdx +344 -0
- package/src/content/docs/pt-br/keybinds.mdx +194 -0
- package/src/content/docs/pt-br/lsp.mdx +208 -0
- package/src/content/docs/pt-br/mcp-servers.mdx +511 -0
- package/src/content/docs/pt-br/models.mdx +222 -0
- package/src/content/docs/pt-br/network.mdx +57 -0
- package/src/content/docs/pt-br/permissions.mdx +235 -0
- package/src/content/docs/pt-br/plugins.mdx +388 -0
- package/src/content/docs/pt-br/providers.mdx +1989 -0
- package/src/content/docs/pt-br/rules.mdx +180 -0
- package/src/content/docs/pt-br/sdk.mdx +463 -0
- package/src/content/docs/pt-br/server.mdx +284 -0
- package/src/content/docs/pt-br/share.mdx +127 -0
- package/src/content/docs/pt-br/skills.mdx +222 -0
- package/src/content/docs/pt-br/themes.mdx +369 -0
- package/src/content/docs/pt-br/tools.mdx +341 -0
- package/src/content/docs/pt-br/troubleshooting.mdx +299 -0
- package/src/content/docs/pt-br/tui.mdx +426 -0
- package/src/content/docs/pt-br/web.mdx +142 -0
- package/src/content/docs/pt-br/windows-wsl.mdx +113 -0
- package/src/content/docs/pt-br/zen.mdx +327 -0
- package/src/content/docs/references.mdx +157 -0
- package/src/content/docs/ru/acp.mdx +156 -0
- package/src/content/docs/ru/agents.mdx +754 -0
- package/src/content/docs/ru/cli.mdx +617 -0
- package/src/content/docs/ru/commands.mdx +323 -0
- package/src/content/docs/ru/config.mdx +685 -0
- package/src/content/docs/ru/custom-tools.mdx +170 -0
- package/src/content/docs/ru/ecosystem.mdx +78 -0
- package/src/content/docs/ru/enterprise.mdx +168 -0
- package/src/content/docs/ru/formatters.mdx +119 -0
- package/src/content/docs/ru/github.mdx +321 -0
- package/src/content/docs/ru/gitlab.mdx +195 -0
- package/src/content/docs/ru/go.mdx +238 -0
- package/src/content/docs/ru/ide.mdx +48 -0
- package/src/content/docs/ru/index.mdx +356 -0
- package/src/content/docs/ru/keybinds.mdx +194 -0
- package/src/content/docs/ru/lsp.mdx +207 -0
- package/src/content/docs/ru/mcp-servers.mdx +511 -0
- package/src/content/docs/ru/models.mdx +223 -0
- package/src/content/docs/ru/network.mdx +57 -0
- package/src/content/docs/ru/permissions.mdx +235 -0
- package/src/content/docs/ru/plugins.mdx +385 -0
- package/src/content/docs/ru/providers.mdx +1987 -0
- package/src/content/docs/ru/rules.mdx +180 -0
- package/src/content/docs/ru/sdk.mdx +463 -0
- package/src/content/docs/ru/server.mdx +287 -0
- package/src/content/docs/ru/share.mdx +128 -0
- package/src/content/docs/ru/skills.mdx +222 -0
- package/src/content/docs/ru/themes.mdx +369 -0
- package/src/content/docs/ru/tools.mdx +341 -0
- package/src/content/docs/ru/troubleshooting.mdx +300 -0
- package/src/content/docs/ru/tui.mdx +429 -0
- package/src/content/docs/ru/web.mdx +142 -0
- package/src/content/docs/ru/windows-wsl.mdx +113 -0
- package/src/content/docs/ru/zen.mdx +345 -0
- package/src/content/docs/rules.mdx +188 -0
- package/src/content/docs/sdk.mdx +463 -0
- package/src/content/docs/server.mdx +287 -0
- package/src/content/docs/share.mdx +128 -0
- package/src/content/docs/skills.mdx +222 -0
- package/src/content/docs/th/acp.mdx +156 -0
- package/src/content/docs/th/agents.mdx +744 -0
- package/src/content/docs/th/cli.mdx +618 -0
- package/src/content/docs/th/commands.mdx +320 -0
- package/src/content/docs/th/config.mdx +690 -0
- package/src/content/docs/th/custom-tools.mdx +196 -0
- package/src/content/docs/th/ecosystem.mdx +78 -0
- package/src/content/docs/th/enterprise.mdx +170 -0
- package/src/content/docs/th/formatters.mdx +131 -0
- package/src/content/docs/th/github.mdx +321 -0
- package/src/content/docs/th/gitlab.mdx +195 -0
- package/src/content/docs/th/go.mdx +224 -0
- package/src/content/docs/th/ide.mdx +48 -0
- package/src/content/docs/th/index.mdx +360 -0
- package/src/content/docs/th/keybinds.mdx +194 -0
- package/src/content/docs/th/lsp.mdx +208 -0
- package/src/content/docs/th/mcp-servers.mdx +511 -0
- package/src/content/docs/th/models.mdx +223 -0
- package/src/content/docs/th/network.mdx +57 -0
- package/src/content/docs/th/permissions.mdx +235 -0
- package/src/content/docs/th/plugins.mdx +389 -0
- package/src/content/docs/th/providers.mdx +2532 -0
- package/src/content/docs/th/rules.mdx +180 -0
- package/src/content/docs/th/sdk.mdx +463 -0
- package/src/content/docs/th/server.mdx +287 -0
- package/src/content/docs/th/share.mdx +128 -0
- package/src/content/docs/th/skills.mdx +222 -0
- package/src/content/docs/th/themes.mdx +369 -0
- package/src/content/docs/th/tools.mdx +341 -0
- package/src/content/docs/th/troubleshooting.mdx +300 -0
- package/src/content/docs/th/tui.mdx +429 -0
- package/src/content/docs/th/web.mdx +142 -0
- package/src/content/docs/th/windows-wsl.mdx +113 -0
- package/src/content/docs/th/zen.mdx +329 -0
- package/src/content/docs/themes.mdx +369 -0
- package/src/content/docs/tools.mdx +345 -0
- package/src/content/docs/tr/acp.mdx +156 -0
- package/src/content/docs/tr/agents.mdx +754 -0
- package/src/content/docs/tr/cli.mdx +617 -0
- package/src/content/docs/tr/commands.mdx +323 -0
- package/src/content/docs/tr/config.mdx +687 -0
- package/src/content/docs/tr/custom-tools.mdx +196 -0
- package/src/content/docs/tr/ecosystem.mdx +78 -0
- package/src/content/docs/tr/enterprise.mdx +170 -0
- package/src/content/docs/tr/formatters.mdx +131 -0
- package/src/content/docs/tr/github.mdx +321 -0
- package/src/content/docs/tr/gitlab.mdx +195 -0
- package/src/content/docs/tr/go.mdx +224 -0
- package/src/content/docs/tr/ide.mdx +48 -0
- package/src/content/docs/tr/index.mdx +347 -0
- package/src/content/docs/tr/keybinds.mdx +194 -0
- package/src/content/docs/tr/lsp.mdx +208 -0
- package/src/content/docs/tr/mcp-servers.mdx +511 -0
- package/src/content/docs/tr/models.mdx +223 -0
- package/src/content/docs/tr/network.mdx +57 -0
- package/src/content/docs/tr/permissions.mdx +235 -0
- package/src/content/docs/tr/plugins.mdx +388 -0
- package/src/content/docs/tr/providers.mdx +1988 -0
- package/src/content/docs/tr/rules.mdx +180 -0
- package/src/content/docs/tr/sdk.mdx +463 -0
- package/src/content/docs/tr/server.mdx +285 -0
- package/src/content/docs/tr/share.mdx +127 -0
- package/src/content/docs/tr/skills.mdx +222 -0
- package/src/content/docs/tr/themes.mdx +369 -0
- package/src/content/docs/tr/tools.mdx +341 -0
- package/src/content/docs/tr/troubleshooting.mdx +299 -0
- package/src/content/docs/tr/tui.mdx +427 -0
- package/src/content/docs/tr/web.mdx +142 -0
- package/src/content/docs/tr/windows-wsl.mdx +113 -0
- package/src/content/docs/tr/zen.mdx +327 -0
- package/src/content/docs/troubleshooting.mdx +314 -0
- package/src/content/docs/tui.mdx +427 -0
- package/src/content/docs/web.mdx +142 -0
- package/src/content/docs/windows-wsl.mdx +112 -0
- package/src/content/docs/zen.mdx +345 -0
- package/src/content/docs/zh-cn/acp.mdx +156 -0
- package/src/content/docs/zh-cn/agents.mdx +754 -0
- package/src/content/docs/zh-cn/cli.mdx +617 -0
- package/src/content/docs/zh-cn/commands.mdx +322 -0
- package/src/content/docs/zh-cn/config.mdx +683 -0
- package/src/content/docs/zh-cn/custom-tools.mdx +196 -0
- package/src/content/docs/zh-cn/ecosystem.mdx +78 -0
- package/src/content/docs/zh-cn/enterprise.mdx +165 -0
- package/src/content/docs/zh-cn/formatters.mdx +132 -0
- package/src/content/docs/zh-cn/github.mdx +321 -0
- package/src/content/docs/zh-cn/gitlab.mdx +194 -0
- package/src/content/docs/zh-cn/go.mdx +224 -0
- package/src/content/docs/zh-cn/ide.mdx +48 -0
- package/src/content/docs/zh-cn/index.mdx +343 -0
- package/src/content/docs/zh-cn/keybinds.mdx +194 -0
- package/src/content/docs/zh-cn/lsp.mdx +208 -0
- package/src/content/docs/zh-cn/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-cn/models.mdx +222 -0
- package/src/content/docs/zh-cn/network.mdx +57 -0
- package/src/content/docs/zh-cn/permissions.mdx +235 -0
- package/src/content/docs/zh-cn/plugins.mdx +388 -0
- package/src/content/docs/zh-cn/providers.mdx +1949 -0
- package/src/content/docs/zh-cn/rules.mdx +180 -0
- package/src/content/docs/zh-cn/sdk.mdx +463 -0
- package/src/content/docs/zh-cn/server.mdx +284 -0
- package/src/content/docs/zh-cn/share.mdx +127 -0
- package/src/content/docs/zh-cn/skills.mdx +222 -0
- package/src/content/docs/zh-cn/themes.mdx +369 -0
- package/src/content/docs/zh-cn/tools.mdx +341 -0
- package/src/content/docs/zh-cn/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-cn/tui.mdx +426 -0
- package/src/content/docs/zh-cn/web.mdx +142 -0
- package/src/content/docs/zh-cn/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-cn/zen.mdx +327 -0
- package/src/content/docs/zh-tw/acp.mdx +156 -0
- package/src/content/docs/zh-tw/agents.mdx +754 -0
- package/src/content/docs/zh-tw/cli.mdx +617 -0
- package/src/content/docs/zh-tw/commands.mdx +322 -0
- package/src/content/docs/zh-tw/config.mdx +687 -0
- package/src/content/docs/zh-tw/custom-tools.mdx +196 -0
- package/src/content/docs/zh-tw/ecosystem.mdx +78 -0
- package/src/content/docs/zh-tw/enterprise.mdx +165 -0
- package/src/content/docs/zh-tw/formatters.mdx +132 -0
- package/src/content/docs/zh-tw/github.mdx +321 -0
- package/src/content/docs/zh-tw/gitlab.mdx +194 -0
- package/src/content/docs/zh-tw/go.mdx +224 -0
- package/src/content/docs/zh-tw/ide.mdx +48 -0
- package/src/content/docs/zh-tw/index.mdx +343 -0
- package/src/content/docs/zh-tw/keybinds.mdx +194 -0
- package/src/content/docs/zh-tw/lsp.mdx +208 -0
- package/src/content/docs/zh-tw/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-tw/models.mdx +222 -0
- package/src/content/docs/zh-tw/network.mdx +57 -0
- package/src/content/docs/zh-tw/permissions.mdx +235 -0
- package/src/content/docs/zh-tw/plugins.mdx +388 -0
- package/src/content/docs/zh-tw/providers.mdx +1970 -0
- package/src/content/docs/zh-tw/rules.mdx +180 -0
- package/src/content/docs/zh-tw/sdk.mdx +463 -0
- package/src/content/docs/zh-tw/server.mdx +284 -0
- package/src/content/docs/zh-tw/share.mdx +127 -0
- package/src/content/docs/zh-tw/skills.mdx +222 -0
- package/src/content/docs/zh-tw/themes.mdx +369 -0
- package/src/content/docs/zh-tw/tools.mdx +341 -0
- package/src/content/docs/zh-tw/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-tw/tui.mdx +426 -0
- package/src/content/docs/zh-tw/web.mdx +142 -0
- package/src/content/docs/zh-tw/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-tw/zen.mdx +333 -0
- package/src/content/i18n/ar.json +75 -0
- package/src/content/i18n/bs.json +75 -0
- package/src/content/i18n/da.json +75 -0
- package/src/content/i18n/de.json +75 -0
- package/src/content/i18n/en.json +75 -0
- package/src/content/i18n/es.json +75 -0
- package/src/content/i18n/fr.json +75 -0
- package/src/content/i18n/it.json +75 -0
- package/src/content/i18n/ja.json +75 -0
- package/src/content/i18n/ko.json +75 -0
- package/src/content/i18n/nb.json +75 -0
- package/src/content/i18n/pl.json +75 -0
- package/src/content/i18n/pt-BR.json +75 -0
- package/src/content/i18n/ru.json +75 -0
- package/src/content/i18n/th.json +75 -0
- package/src/content/i18n/tr.json +75 -0
- package/src/content/i18n/zh-CN.json +75 -0
- package/src/content/i18n/zh-TW.json +75 -0
- package/src/content.config.ts +16 -0
- package/src/i18n/locales.ts +117 -0
- package/src/middleware.ts +94 -0
- package/src/pages/[...slug].md.ts +34 -0
- package/src/pages/s/[id].astro +164 -0
- package/src/styles/custom.css +405 -0
- package/src/types/lang-map.d.ts +27 -0
- package/src/types/starlight-virtual.d.ts +14 -0
- package/sst-env.d.ts +10 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 設定
|
|
3
|
+
description: 使用 OpenCode JSON 設定。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
您可以使用 JSON 設定檔來設定 OpenCode。
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 格式
|
|
11
|
+
|
|
12
|
+
OpenCode 支援 **JSON** 和 **JSONC**(帶註解的 JSON)格式。
|
|
13
|
+
|
|
14
|
+
```jsonc title="opencode.jsonc"
|
|
15
|
+
{
|
|
16
|
+
"$schema": "https://opencode.ai/config.json",
|
|
17
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
18
|
+
"autoupdate": true,
|
|
19
|
+
"server": {
|
|
20
|
+
"port": 4096,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 位置
|
|
28
|
+
|
|
29
|
+
您可以將設定放置在不同的位置,它們具有不同的優先順序。
|
|
30
|
+
|
|
31
|
+
:::note
|
|
32
|
+
設定檔是**合併在一起**的,而不是替換。
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
設定檔是合併在一起的,而不是被替換。來自以下設定位置的設定會被合併。後面的設定僅在鍵衝突時覆寫前面的設定。所有設定中的非衝突設定都會被保留。
|
|
36
|
+
|
|
37
|
+
例如,如果您的全域設定設定了 `autoupdate: true`,而您的專案設定設定了 `model: "anthropic/claude-sonnet-4-5"`,則最終設定將包含這兩個設定。
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 優先順序
|
|
42
|
+
|
|
43
|
+
設定來源按以下順序載入(後面的來源覆寫前面的來源):
|
|
44
|
+
|
|
45
|
+
1. **遠端設定**(來自 `.well-known/opencode`)- 組織預設值
|
|
46
|
+
2. **全域設定**(`~/.config/opencode/opencode.json`)- 使用者偏好
|
|
47
|
+
3. **自訂設定**(`OPENCODE_CONFIG` 環境變數)- 自訂覆寫
|
|
48
|
+
4. **專案設定**(專案中的 `opencode.json`)- 專案特定設定
|
|
49
|
+
5. **`.opencode` 目錄** - 代理、指令、外掛程式
|
|
50
|
+
6. **內嵌設定**(`OPENCODE_CONFIG_CONTENT` 環境變數)- 執行時覆寫
|
|
51
|
+
|
|
52
|
+
這意味著專案設定可以覆寫全域預設值,全域設定可以覆寫遠端組織預設值。
|
|
53
|
+
|
|
54
|
+
:::note
|
|
55
|
+
`.opencode` 和 `~/.config/opencode` 目錄的子目錄使用**複數名稱**:`agents/`、`commands/`、`modes/`、`plugins/`、`skills/`、`tools/` 和 `themes/`。為了向後相容,也支援單數名稱(例如 `agent/`)。
|
|
56
|
+
:::
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 遠端
|
|
61
|
+
|
|
62
|
+
組織可以透過 `.well-known/opencode` 端點提供預設設定。當您使用支援該功能的供應商進行身分驗證時,會自動擷取此設定。
|
|
63
|
+
|
|
64
|
+
遠端設定最先載入,作為基礎層。所有其他設定來源(全域、專案)都可以覆寫這些預設值。
|
|
65
|
+
|
|
66
|
+
例如,如果您的組織提供了預設停用的 MCP 伺服器:
|
|
67
|
+
|
|
68
|
+
```json title="Remote config from .well-known/opencode"
|
|
69
|
+
{
|
|
70
|
+
"mcp": {
|
|
71
|
+
"jira": {
|
|
72
|
+
"type": "remote",
|
|
73
|
+
"url": "https://jira.example.com/mcp",
|
|
74
|
+
"enabled": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
您可以在本地設定中啟用特定伺服器:
|
|
81
|
+
|
|
82
|
+
```json title="opencode.json"
|
|
83
|
+
{
|
|
84
|
+
"mcp": {
|
|
85
|
+
"jira": {
|
|
86
|
+
"type": "remote",
|
|
87
|
+
"url": "https://jira.example.com/mcp",
|
|
88
|
+
"enabled": true
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### 全域
|
|
97
|
+
|
|
98
|
+
將全域 OpenCode 設定放在 `~/.config/opencode/opencode.json` 中。使用全域設定來設定使用者層級的偏好,例如主題、供應商或快捷鍵。
|
|
99
|
+
|
|
100
|
+
全域設定覆寫遠端組織預設值。
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### 專案層級
|
|
105
|
+
|
|
106
|
+
在專案根目錄中新增 `opencode.json`。專案設定在標準設定檔中具有最高優先級——它會覆寫全域設定和遠端設定。
|
|
107
|
+
|
|
108
|
+
:::tip
|
|
109
|
+
將專案特定設定放在專案的根目錄中。
|
|
110
|
+
:::
|
|
111
|
+
|
|
112
|
+
當 OpenCode 啟動時,它會在當前目錄中尋找設定檔,或向上遍歷到最近的 Git 目錄。
|
|
113
|
+
|
|
114
|
+
該設定檔也可以安全地提交到 Git 中,並使用與全域設定相同的 Schema。
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### 自訂路徑
|
|
119
|
+
|
|
120
|
+
使用 `OPENCODE_CONFIG` 環境變數指定自訂設定檔路徑。
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
export OPENCODE_CONFIG=/path/to/my/custom-config.json
|
|
124
|
+
opencode run "Hello world"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
自訂設定在優先順序中位於全域設定和專案設定之間載入。
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### 自訂目錄
|
|
132
|
+
|
|
133
|
+
使用 `OPENCODE_CONFIG_DIR` 環境變數指定自訂設定目錄。該目錄會像標準 `.opencode` 目錄一樣被搜尋代理、指令、模式和外掛程式,並且應遵循相同的結構。
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
export OPENCODE_CONFIG_DIR=/path/to/my/config-directory
|
|
137
|
+
opencode run "Hello world"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
自訂目錄在全域設定和 `.opencode` 目錄之後載入,因此**可以覆寫**它們的設定。
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Schema
|
|
145
|
+
|
|
146
|
+
設定檔具有在 [**`opencode.ai/config.json`**](https://opencode.ai/config.json) 中定義的 Schema。
|
|
147
|
+
|
|
148
|
+
您的編輯器應該能夠基於該 Schema 進行驗證和自動補全。
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### TUI
|
|
153
|
+
|
|
154
|
+
您可以透過 `tui` 選項設定 TUI 相關設定。
|
|
155
|
+
|
|
156
|
+
```json title="opencode.json"
|
|
157
|
+
{
|
|
158
|
+
"$schema": "https://opencode.ai/config.json",
|
|
159
|
+
"tui": {
|
|
160
|
+
"scroll_speed": 3,
|
|
161
|
+
"scroll_acceleration": {
|
|
162
|
+
"enabled": true
|
|
163
|
+
},
|
|
164
|
+
"diff_style": "auto"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
可用選項:
|
|
170
|
+
|
|
171
|
+
- `scroll_acceleration.enabled` - 啟用 macOS 風格的捲動加速。**優先於 `scroll_speed`。**
|
|
172
|
+
- `scroll_speed` - 自訂捲動速度倍率(預設值:`3`,最小值:`1`)。如果 `scroll_acceleration.enabled` 為 `true`,則忽略此選項。
|
|
173
|
+
- `diff_style` - 控制差異呈現方式。`"auto"` 根據終端機寬度自適應,`"stacked"` 始終顯示單列。
|
|
174
|
+
|
|
175
|
+
使用 `OPENCODE_TUI_CONFIG` 指向自訂 TUI 設定檔。
|
|
176
|
+
|
|
177
|
+
`opencode.json` 中的舊版 `theme`、`keybinds` 和 `tui` 鍵已被棄用,並將在可能的情況下自動遷移。
|
|
178
|
+
|
|
179
|
+
[在此了解更多關於 TUI 的資訊](/docs/tui)。
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### 伺服器
|
|
184
|
+
|
|
185
|
+
您可以透過 `server` 選項為 `opencode serve` 和 `opencode web` 指令設定伺服器設定。
|
|
186
|
+
|
|
187
|
+
```json title="opencode.json"
|
|
188
|
+
{
|
|
189
|
+
"$schema": "https://opencode.ai/config.json",
|
|
190
|
+
"server": {
|
|
191
|
+
"port": 4096,
|
|
192
|
+
"hostname": "0.0.0.0",
|
|
193
|
+
"mdns": true,
|
|
194
|
+
"mdnsDomain": "myproject.local",
|
|
195
|
+
"cors": ["http://localhost:5173"]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
可用選項:
|
|
201
|
+
|
|
202
|
+
- `port` - 監聽連接埠。
|
|
203
|
+
- `hostname` - 監聽主機名稱。當 `mdns` 啟用且未設定主機名稱時,預設為 `0.0.0.0`。
|
|
204
|
+
- `mdns` - 啟用 mDNS 服務探索。這允許網路上的其他裝置發現您的 OpenCode 伺服器。
|
|
205
|
+
- `mdnsDomain` - mDNS 服務的自訂網域名稱。預設為 `opencode.local`。適用於在同一網路上執行多個實例的情境。
|
|
206
|
+
- `cors` - 從基於瀏覽器的用戶端使用 HTTP 伺服器時允許 CORS 的額外來源。值必須是完整的來源(通訊協定 + 主機 + 可選連接埠),例如 `https://app.example.com`。
|
|
207
|
+
|
|
208
|
+
[在此了解更多關於伺服器的資訊](/docs/server)。
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### 工具
|
|
213
|
+
|
|
214
|
+
您可以透過 `tools` 選項管理 LLM 可以使用的工具。
|
|
215
|
+
|
|
216
|
+
```json title="opencode.json"
|
|
217
|
+
{
|
|
218
|
+
"$schema": "https://opencode.ai/config.json",
|
|
219
|
+
"tools": {
|
|
220
|
+
"write": false,
|
|
221
|
+
"bash": false
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
[在此了解更多關於工具的資訊](/docs/tools)。
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### 模型
|
|
231
|
+
|
|
232
|
+
您可以透過 `provider`、`model` 和 `small_model` 選項在 OpenCode 設定中設定要使用的供應商和模型。
|
|
233
|
+
|
|
234
|
+
```json title="opencode.json"
|
|
235
|
+
{
|
|
236
|
+
"$schema": "https://opencode.ai/config.json",
|
|
237
|
+
"provider": {},
|
|
238
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
239
|
+
"small_model": "anthropic/claude-haiku-4-5"
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
`small_model` 選項為標題生成等輕量級任務設定單獨的模型。預設情況下,如果您的供應商有更便宜的模型可用,OpenCode 會嘗試使用該模型,否則會回退到您的主模型。
|
|
244
|
+
|
|
245
|
+
供應商選項可以包括 `timeout` 和 `setCacheKey`:
|
|
246
|
+
|
|
247
|
+
```json title="opencode.json"
|
|
248
|
+
{
|
|
249
|
+
"$schema": "https://opencode.ai/config.json",
|
|
250
|
+
"provider": {
|
|
251
|
+
"anthropic": {
|
|
252
|
+
"options": {
|
|
253
|
+
"timeout": 600000,
|
|
254
|
+
"setCacheKey": true
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
- `timeout` - 請求逾時時間,單位為毫秒(預設值:300000)。設定為 `false` 可停用逾時。
|
|
262
|
+
- `setCacheKey` - 確保始終為指定供應商設定快取金鑰。
|
|
263
|
+
|
|
264
|
+
您還可以設定[本地模型](/docs/models#local)。[了解更多](/docs/models)。
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
#### 供應商特定選項
|
|
269
|
+
|
|
270
|
+
一些供應商支援除通用 `timeout` 和 `apiKey` 設定之外的額外設定選項。
|
|
271
|
+
|
|
272
|
+
##### Amazon Bedrock
|
|
273
|
+
|
|
274
|
+
Amazon Bedrock 支援 AWS 特定設定:
|
|
275
|
+
|
|
276
|
+
```json title="opencode.json"
|
|
277
|
+
{
|
|
278
|
+
"$schema": "https://opencode.ai/config.json",
|
|
279
|
+
"provider": {
|
|
280
|
+
"amazon-bedrock": {
|
|
281
|
+
"options": {
|
|
282
|
+
"region": "us-east-1",
|
|
283
|
+
"profile": "my-aws-profile",
|
|
284
|
+
"endpoint": "https://bedrock-runtime.us-east-1.vpce-xxxxx.amazonaws.com"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
- `region` - Bedrock 的 AWS 區域(預設為 `AWS_REGION` 環境變數或 `us-east-1`)
|
|
292
|
+
- `profile` - 來自 `~/.aws/credentials` 的 AWS 命名設定檔(預設為 `AWS_PROFILE` 環境變數)
|
|
293
|
+
- `endpoint` - VPC 端點的自訂端點 URL。這是通用 `baseURL` 選項使用 AWS 特定術語的別名。如果兩者都指定,`endpoint` 優先。
|
|
294
|
+
|
|
295
|
+
:::note
|
|
296
|
+
Bearer Token(`AWS_BEARER_TOKEN_BEDROCK` 或 `/connect`)優先於基於設定檔的身分驗證。詳情請參見[認證優先級](/docs/providers#authentication-precedence)。
|
|
297
|
+
:::
|
|
298
|
+
|
|
299
|
+
[了解更多關於 Amazon Bedrock 設定的資訊](/docs/providers#amazon-bedrock)。
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
### 主題
|
|
304
|
+
|
|
305
|
+
在 `tui.json` 中設定您的 UI 主題。
|
|
306
|
+
|
|
307
|
+
```json title="tui.json"
|
|
308
|
+
{
|
|
309
|
+
"$schema": "https://opencode.ai/tui.json",
|
|
310
|
+
"theme": "tokyonight"
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
[在此了解更多](/docs/themes)。
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
### 代理
|
|
319
|
+
|
|
320
|
+
您可以透過 `agent` 選項為特定任務設定專用代理。
|
|
321
|
+
|
|
322
|
+
```jsonc title="opencode.jsonc"
|
|
323
|
+
{
|
|
324
|
+
"$schema": "https://opencode.ai/config.json",
|
|
325
|
+
"agent": {
|
|
326
|
+
"code-reviewer": {
|
|
327
|
+
"description": "Reviews code for best practices and potential issues",
|
|
328
|
+
"model": "anthropic/claude-sonnet-4-5",
|
|
329
|
+
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
|
330
|
+
"tools": {
|
|
331
|
+
// Disable file modification tools for review-only agent
|
|
332
|
+
"write": false,
|
|
333
|
+
"edit": false,
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
您還可以使用 `~/.config/opencode/agents/` 或 `.opencode/agents/` 中的 Markdown 檔案定義代理。[在此了解更多](/docs/agents)。
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
### 預設代理
|
|
345
|
+
|
|
346
|
+
您可以使用 `default_agent` 選項設定預設代理。當未明確指定代理時,將使用該預設代理。
|
|
347
|
+
|
|
348
|
+
```json title="opencode.json"
|
|
349
|
+
{
|
|
350
|
+
"$schema": "https://opencode.ai/config.json",
|
|
351
|
+
"default_agent": "plan"
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
預設代理必須是主代理(不能是子代理)。可以是內建代理(如 `"build"` 或 `"plan"`),也可以是您定義的[自訂代理](/docs/agents)。如果指定的代理不存在或是子代理,OpenCode 將回退到 `"build"` 並發出警告。
|
|
356
|
+
|
|
357
|
+
此設定適用於所有介面:TUI、CLI(`opencode run`)、桌面應用程式和 GitHub Action。
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
### 分享
|
|
362
|
+
|
|
363
|
+
您可以透過 `share` 選項設定[分享](/docs/share)功能。
|
|
364
|
+
|
|
365
|
+
```json title="opencode.json"
|
|
366
|
+
{
|
|
367
|
+
"$schema": "https://opencode.ai/config.json",
|
|
368
|
+
"share": "manual"
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
該選項接受:
|
|
373
|
+
|
|
374
|
+
- `"manual"` - 允許透過指令手動分享(預設)
|
|
375
|
+
- `"auto"` - 自動分享新工作階段
|
|
376
|
+
- `"disabled"` - 完全停用分享
|
|
377
|
+
|
|
378
|
+
預設情況下,分享設定為手動模式,您需要使用 `/share` 指令明確分享工作階段。
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
### 指令
|
|
383
|
+
|
|
384
|
+
您可以透過 `command` 選項為重複任務設定自訂指令。
|
|
385
|
+
|
|
386
|
+
```jsonc title="opencode.jsonc"
|
|
387
|
+
{
|
|
388
|
+
"$schema": "https://opencode.ai/config.json",
|
|
389
|
+
"command": {
|
|
390
|
+
"test": {
|
|
391
|
+
"template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
|
|
392
|
+
"description": "Run tests with coverage",
|
|
393
|
+
"agent": "build",
|
|
394
|
+
"model": "anthropic/claude-haiku-4-5",
|
|
395
|
+
},
|
|
396
|
+
"component": {
|
|
397
|
+
"template": "Create a new React component named $ARGUMENTS with TypeScript support.\nInclude proper typing and basic structure.",
|
|
398
|
+
"description": "Create a new component",
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
您還可以使用 `~/.config/opencode/commands/` 或 `.opencode/commands/` 中的 Markdown 檔案定義指令。[在此了解更多](/docs/commands)。
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
### 快捷鍵
|
|
409
|
+
|
|
410
|
+
在 `tui.json` 中自訂快捷鍵。
|
|
411
|
+
|
|
412
|
+
```json title="tui.json"
|
|
413
|
+
{
|
|
414
|
+
"$schema": "https://opencode.ai/tui.json",
|
|
415
|
+
"keybinds": {}
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
[在此了解更多](/docs/keybinds)。
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
### 自動更新
|
|
424
|
+
|
|
425
|
+
OpenCode 啟動時會自動下載新版本。您可以使用 `autoupdate` 選項停用此功能。
|
|
426
|
+
|
|
427
|
+
```json title="opencode.json"
|
|
428
|
+
{
|
|
429
|
+
"$schema": "https://opencode.ai/config.json",
|
|
430
|
+
"autoupdate": false
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
如果您不想自動更新但希望在新版本可用時收到通知,可將 `autoupdate` 設定為 `"notify"`。
|
|
435
|
+
請注意,此功能僅在未透過 Homebrew 等套件管理器安裝時有效。
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
### 格式化器
|
|
440
|
+
|
|
441
|
+
您可以透過 `formatter` 選項設定程式碼格式化器。
|
|
442
|
+
|
|
443
|
+
```json title="opencode.json"
|
|
444
|
+
{
|
|
445
|
+
"$schema": "https://opencode.ai/config.json",
|
|
446
|
+
"formatter": {
|
|
447
|
+
"prettier": {
|
|
448
|
+
"disabled": true
|
|
449
|
+
},
|
|
450
|
+
"custom-prettier": {
|
|
451
|
+
"command": ["npx", "prettier", "--write", "$FILE"],
|
|
452
|
+
"environment": {
|
|
453
|
+
"NODE_ENV": "development"
|
|
454
|
+
},
|
|
455
|
+
"extensions": [".js", ".ts", ".jsx", ".tsx"]
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
[在此了解更多關於格式化器的資訊](/docs/formatters)。
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
### 權限
|
|
466
|
+
|
|
467
|
+
預設情況下,OpenCode **允許所有操作**,無需明確批准。您可以使用 `permission` 選項變更此行為。
|
|
468
|
+
|
|
469
|
+
例如,要讓 `edit` 和 `bash` 工具需要使用者確認:
|
|
470
|
+
|
|
471
|
+
```json title="opencode.json"
|
|
472
|
+
{
|
|
473
|
+
"$schema": "https://opencode.ai/config.json",
|
|
474
|
+
"permission": {
|
|
475
|
+
"edit": "ask",
|
|
476
|
+
"bash": "ask"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
[在此了解更多關於權限的資訊](/docs/permissions)。
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
### 壓縮
|
|
486
|
+
|
|
487
|
+
您可以透過 `compaction` 選項控制上下文壓縮行為。
|
|
488
|
+
|
|
489
|
+
```json title="opencode.json"
|
|
490
|
+
{
|
|
491
|
+
"$schema": "https://opencode.ai/config.json",
|
|
492
|
+
"compaction": {
|
|
493
|
+
"auto": true,
|
|
494
|
+
"prune": false,
|
|
495
|
+
"reserved": 10000
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
- `auto` - 當上下文已滿時自動壓縮工作階段(預設值:`true`)。
|
|
501
|
+
- `prune` - 刪除舊的工具輸出以節省 Token(預設值:`false`)。
|
|
502
|
+
- `reserved` - 壓縮時的 Token 緩衝區。保留足夠的窗口以避免壓縮過程中溢出。
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
### 檔案監看器
|
|
507
|
+
|
|
508
|
+
您可以透過 `watcher` 選項設定檔案監看器的忽略模式。
|
|
509
|
+
|
|
510
|
+
```json title="opencode.json"
|
|
511
|
+
{
|
|
512
|
+
"$schema": "https://opencode.ai/config.json",
|
|
513
|
+
"watcher": {
|
|
514
|
+
"ignore": ["node_modules/**", "dist/**", ".git/**"]
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
模式遵循 glob 語法。使用此選項可以從檔案監看中排除頻繁變動的目錄。
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
### MCP 伺服器
|
|
524
|
+
|
|
525
|
+
您可以透過 `mcp` 選項設定要使用的 MCP 伺服器。
|
|
526
|
+
|
|
527
|
+
```json title="opencode.json"
|
|
528
|
+
{
|
|
529
|
+
"$schema": "https://opencode.ai/config.json",
|
|
530
|
+
"mcp": {}
|
|
531
|
+
}
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
[在此了解更多](/docs/mcp-servers)。
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
### 外掛程式
|
|
539
|
+
|
|
540
|
+
[外掛程式](/docs/plugins)透過自訂工具、掛鉤和整合來擴展 OpenCode。
|
|
541
|
+
|
|
542
|
+
將外掛程式檔案放置在 `.opencode/plugins/` 或 `~/.config/opencode/plugins/` 中。您還可以透過 `plugin` 選項從 npm 載入外掛程式。
|
|
543
|
+
|
|
544
|
+
```json title="opencode.json"
|
|
545
|
+
{
|
|
546
|
+
"$schema": "https://opencode.ai/config.json",
|
|
547
|
+
"plugin": ["opencode-helicone-session", "@my-org/custom-plugin"]
|
|
548
|
+
}
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
[在此了解更多](/docs/plugins)。
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
### 指示
|
|
556
|
+
|
|
557
|
+
您可以透過 `instructions` 選項為所使用的模型設定指示。
|
|
558
|
+
|
|
559
|
+
```json title="opencode.json"
|
|
560
|
+
{
|
|
561
|
+
"$schema": "https://opencode.ai/config.json",
|
|
562
|
+
"instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"]
|
|
563
|
+
}
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
該選項接受指示檔案路徑和 glob 模式的陣列。[在此了解更多關於規則的資訊](/docs/rules)。
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
### 停用供應商
|
|
571
|
+
|
|
572
|
+
您可以透過 `disabled_providers` 選項停用自動載入的供應商。當您希望阻止某些供應商被載入(即使其憑證可用)時,此選項非常有用。
|
|
573
|
+
|
|
574
|
+
```json title="opencode.json"
|
|
575
|
+
{
|
|
576
|
+
"$schema": "https://opencode.ai/config.json",
|
|
577
|
+
"disabled_providers": ["openai", "gemini"]
|
|
578
|
+
}
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
:::note
|
|
582
|
+
`disabled_providers` 優先於 `enabled_providers`。
|
|
583
|
+
:::
|
|
584
|
+
|
|
585
|
+
`disabled_providers` 選項接受供應商 ID 的陣列。當某個供應商被停用時:
|
|
586
|
+
|
|
587
|
+
- 即使設定了環境變數,也不會被載入。
|
|
588
|
+
- 即使透過 `/connect` 指令設定了 API 金鑰,也不會被載入。
|
|
589
|
+
- 該供應商的模型不會出現在模型選擇列表中。
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
### 啟用供應商
|
|
594
|
+
|
|
595
|
+
您可以透過 `enabled_providers` 選項指定允許使用的供應商白名單。設定後,僅啟用指定的供應商,所有其他供應商將被忽略。
|
|
596
|
+
|
|
597
|
+
```json title="opencode.json"
|
|
598
|
+
{
|
|
599
|
+
"$schema": "https://opencode.ai/config.json",
|
|
600
|
+
"enabled_providers": ["anthropic", "openai"]
|
|
601
|
+
}
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
當您希望限制 OpenCode 僅使用特定供應商,而不是逐一停用其他供應商時,此選項非常有用。
|
|
605
|
+
|
|
606
|
+
:::note
|
|
607
|
+
`disabled_providers` 優先於 `enabled_providers`。
|
|
608
|
+
:::
|
|
609
|
+
|
|
610
|
+
如果某個供應商同時出現在 `enabled_providers` 和 `disabled_providers` 中,為了向後相容,`disabled_providers` 優先。
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
### 實驗性功能
|
|
615
|
+
|
|
616
|
+
`experimental` 鍵包含正在積極開發中的選項。
|
|
617
|
+
|
|
618
|
+
```json title="opencode.json"
|
|
619
|
+
{
|
|
620
|
+
"$schema": "https://opencode.ai/config.json",
|
|
621
|
+
"experimental": {}
|
|
622
|
+
}
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
:::caution
|
|
626
|
+
實驗性選項不穩定。它們可能會在不另行通知的情況下被變更或移除。
|
|
627
|
+
:::
|
|
628
|
+
|
|
629
|
+
---
|
|
630
|
+
|
|
631
|
+
## 變數
|
|
632
|
+
|
|
633
|
+
您可以在設定檔中使用變數替換來參照環境變數和檔案內容。
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
### 環境變數
|
|
638
|
+
|
|
639
|
+
使用 `{env:VARIABLE_NAME}` 來替換環境變數:
|
|
640
|
+
|
|
641
|
+
```json title="opencode.json"
|
|
642
|
+
{
|
|
643
|
+
"$schema": "https://opencode.ai/config.json",
|
|
644
|
+
"model": "{env:OPENCODE_MODEL}",
|
|
645
|
+
"provider": {
|
|
646
|
+
"anthropic": {
|
|
647
|
+
"models": {},
|
|
648
|
+
"options": {
|
|
649
|
+
"apiKey": "{env:ANTHROPIC_API_KEY}"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
如果環境變數未設定,它將被替換為空字串。
|
|
657
|
+
|
|
658
|
+
---
|
|
659
|
+
|
|
660
|
+
### 檔案
|
|
661
|
+
|
|
662
|
+
使用 `{file:path/to/file}` 來替換檔案內容:
|
|
663
|
+
|
|
664
|
+
```json title="opencode.json"
|
|
665
|
+
{
|
|
666
|
+
"$schema": "https://opencode.ai/config.json",
|
|
667
|
+
"instructions": ["./custom-instructions.md"],
|
|
668
|
+
"provider": {
|
|
669
|
+
"openai": {
|
|
670
|
+
"options": {
|
|
671
|
+
"apiKey": "{file:~/.secrets/openai-key}"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
檔案路徑可以是:
|
|
679
|
+
|
|
680
|
+
- 相對於設定檔所在目錄的路徑
|
|
681
|
+
- 以 `/` 或 `~` 開頭的絕對路徑
|
|
682
|
+
|
|
683
|
+
這些功能適用於:
|
|
684
|
+
|
|
685
|
+
- 將 API 金鑰等敏感資料保存在單獨的檔案中。
|
|
686
|
+
- 引入大型指示檔案而不會使設定變得雜亂。
|
|
687
|
+
- 在多個設定檔之間共享通用設定片段。
|