@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,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Custom Tools
|
|
3
|
+
description: Create tools the LLM can call in OpenCode.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
custom tool은 대화 중 LLM이 호출할 수 있도록 사용자가 직접 만든 함수입니다. `read`, `write`, `bash` 같은 OpenCode의 [built-in tools](/docs/tools)와 함께 동작합니다.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 도구 만들기
|
|
11
|
+
|
|
12
|
+
tool은 **TypeScript** 또는 **JavaScript** 파일로 정의합니다. 다만 tool 정의에서 호출하는 스크립트는 **어떤 언어든** 사용할 수 있습니다. 즉, TypeScript/JavaScript는 tool 정의 자체에만 필요합니다.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### 위치
|
|
17
|
+
|
|
18
|
+
tool은 다음 위치에 둘 수 있습니다.
|
|
19
|
+
|
|
20
|
+
- 프로젝트의 `.opencode/tools/` 디렉토리(로컬)
|
|
21
|
+
- `~/.config/opencode/tools/` 디렉토리(전역)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### 구조
|
|
26
|
+
|
|
27
|
+
tool을 가장 쉽게 만드는 방법은 타입 안정성과 validation을 제공하는 `tool()` helper를 사용하는 것입니다.
|
|
28
|
+
|
|
29
|
+
```ts title=".opencode/tools/database.ts" {1}
|
|
30
|
+
import { tool } from "@opencode-ai/plugin"
|
|
31
|
+
|
|
32
|
+
export default tool({
|
|
33
|
+
description: "Query the project database",
|
|
34
|
+
args: {
|
|
35
|
+
query: tool.schema.string().describe("SQL query to execute"),
|
|
36
|
+
},
|
|
37
|
+
async execute(args) {
|
|
38
|
+
// Your database logic here
|
|
39
|
+
return `Executed query: ${args.query}`
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**파일 이름**이 **tool 이름**이 됩니다. 위 예시는 `database` tool을 생성합니다.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
#### 파일 하나에 여러 tool 정의
|
|
49
|
+
|
|
50
|
+
하나의 파일에서 여러 tool을 export할 수도 있습니다. 각 export는 **별도의 tool**이 되며 이름은 **`<filename>_<exportname>`** 형식을 사용합니다.
|
|
51
|
+
|
|
52
|
+
```ts title=".opencode/tools/math.ts"
|
|
53
|
+
import { tool } from "@opencode-ai/plugin"
|
|
54
|
+
|
|
55
|
+
export const add = tool({
|
|
56
|
+
description: "Add two numbers",
|
|
57
|
+
args: {
|
|
58
|
+
a: tool.schema.number().describe("First number"),
|
|
59
|
+
b: tool.schema.number().describe("Second number"),
|
|
60
|
+
},
|
|
61
|
+
async execute(args) {
|
|
62
|
+
return args.a + args.b
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const multiply = tool({
|
|
67
|
+
description: "Multiply two numbers",
|
|
68
|
+
args: {
|
|
69
|
+
a: tool.schema.number().describe("First number"),
|
|
70
|
+
b: tool.schema.number().describe("Second number"),
|
|
71
|
+
},
|
|
72
|
+
async execute(args) {
|
|
73
|
+
return args.a * args.b
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
이 경우 `math_add`, `math_multiply` 두 tool이 생성됩니다.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
#### 기본 도구와 이름 충돌
|
|
83
|
+
|
|
84
|
+
커스텀 도구는 도구 이름으로 식별됩니다. 커스텀 도구가 기본 도구와 같은 이름을 사용하면 커스텀 도구가 우선순위를 갖습니다.
|
|
85
|
+
|
|
86
|
+
예를 들어, 이 파일은 기본 `bash` 도구를 대체합니다:
|
|
87
|
+
|
|
88
|
+
```ts title=".opencode/tools/bash.ts"
|
|
89
|
+
import { tool } from "@opencode-ai/plugin"
|
|
90
|
+
|
|
91
|
+
export default tool({
|
|
92
|
+
description: "Restricted bash wrapper",
|
|
93
|
+
args: {
|
|
94
|
+
command: tool.schema.string(),
|
|
95
|
+
},
|
|
96
|
+
async execute(args) {
|
|
97
|
+
return `blocked: ${args.command}`
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
:::note
|
|
103
|
+
의도적으로 기본 도구를 대체하려는 경우가 아니라면 고유한 이름을 사용하는 것이 좋습니다. 도구를 오버라이드하지 않고 비활성화만 하려면 [permissions](/docs/permissions)를 사용하세요.
|
|
104
|
+
:::
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### 인자
|
|
109
|
+
|
|
110
|
+
인자 타입은 `tool.schema`로 정의할 수 있습니다. `tool.schema`는 [Zod](https://zod.dev) 기반입니다.
|
|
111
|
+
|
|
112
|
+
```ts "tool.schema"
|
|
113
|
+
args: {
|
|
114
|
+
query: tool.schema.string().describe("SQL query to execute")
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
[Zod](https://zod.dev)를 직접 import해서 일반 객체를 반환하는 방식도 사용할 수 있습니다.
|
|
119
|
+
|
|
120
|
+
```ts {6}
|
|
121
|
+
import { z } from "zod"
|
|
122
|
+
|
|
123
|
+
export default {
|
|
124
|
+
description: "Tool description",
|
|
125
|
+
args: {
|
|
126
|
+
param: z.string().describe("Parameter description"),
|
|
127
|
+
},
|
|
128
|
+
async execute(args, context) {
|
|
129
|
+
// Tool implementation
|
|
130
|
+
return "result"
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### Context
|
|
138
|
+
|
|
139
|
+
tool은 현재 세션의 context 정보를 전달받습니다.
|
|
140
|
+
|
|
141
|
+
```ts title=".opencode/tools/project.ts" {8}
|
|
142
|
+
import { tool } from "@opencode-ai/plugin"
|
|
143
|
+
|
|
144
|
+
export default tool({
|
|
145
|
+
description: "Get project information",
|
|
146
|
+
args: {},
|
|
147
|
+
async execute(args, context) {
|
|
148
|
+
// Access context information
|
|
149
|
+
const { agent, sessionID, messageID, directory, worktree } = context
|
|
150
|
+
return `Agent: ${agent}, Session: ${sessionID}, Message: ${messageID}, Directory: ${directory}, Worktree: ${worktree}`
|
|
151
|
+
},
|
|
152
|
+
})
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
세션 작업 디렉토리는 `context.directory`를 사용하세요.
|
|
156
|
+
git worktree 루트는 `context.worktree`를 사용하세요.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 예시
|
|
161
|
+
|
|
162
|
+
### Python으로 tool 작성
|
|
163
|
+
|
|
164
|
+
tool은 원하는 언어로 작성할 수 있습니다. 아래는 Python으로 두 숫자를 더하는 예시입니다.
|
|
165
|
+
|
|
166
|
+
먼저 Python 스크립트로 tool을 만듭니다.
|
|
167
|
+
|
|
168
|
+
```python title=".opencode/tools/add.py"
|
|
169
|
+
import sys
|
|
170
|
+
|
|
171
|
+
a = int(sys.argv[1])
|
|
172
|
+
b = int(sys.argv[2])
|
|
173
|
+
print(a + b)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
그다음 이 스크립트를 호출하는 tool 정의를 만듭니다.
|
|
177
|
+
|
|
178
|
+
```ts title=".opencode/tools/python-add.ts" {10}
|
|
179
|
+
import { tool } from "@opencode-ai/plugin"
|
|
180
|
+
import path from "path"
|
|
181
|
+
|
|
182
|
+
export default tool({
|
|
183
|
+
description: "Add two numbers using Python",
|
|
184
|
+
args: {
|
|
185
|
+
a: tool.schema.number().describe("First number"),
|
|
186
|
+
b: tool.schema.number().describe("Second number"),
|
|
187
|
+
},
|
|
188
|
+
async execute(args, context) {
|
|
189
|
+
const script = path.join(context.worktree, ".opencode/tools/add.py")
|
|
190
|
+
const result = await Bun.$`python3 ${script} ${args.a} ${args.b}`.text()
|
|
191
|
+
return result.trim()
|
|
192
|
+
},
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
여기서는 Python 스크립트를 실행하기 위해 [`Bun.$`](https://bun.com/docs/runtime/shell) 유틸리티를 사용합니다.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 생태계
|
|
3
|
+
description: OpenCode로 구축된 프로젝트와 통합.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
OpenCode를 기반으로 만들어진 커뮤니티 프로젝트 모음입니다.
|
|
7
|
+
|
|
8
|
+
:::note
|
|
9
|
+
이 목록에 OpenCode 관련 프로젝트를 추가하고 싶다면 PR을 제출하세요.
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
[awesome-opencode](https://github.com/awesome-opencode/awesome-opencode)와 [opencode.cafe](https://opencode.cafe)도 함께 확인해 보세요. ecosystem과 community 정보를 한곳에 모아볼 수 있습니다.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 플러그인
|
|
17
|
+
|
|
18
|
+
| 이름 | 설명 |
|
|
19
|
+
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
20
|
+
| [opencode-daytona](https://github.com/daytonaio/daytona/tree/main/libs/opencode-plugin) | git sync와 live preview를 지원하는 격리된 Daytona sandbox에서 OpenCode 세션을 자동 실행합니다. |
|
|
21
|
+
| [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) | 요청을 그룹화할 수 있도록 Helicone session header를 자동으로 주입합니다. |
|
|
22
|
+
| [opencode-type-inject](https://github.com/nick-vi/opencode-type-inject) | 조회 tool과 함께 TypeScript/Svelte 타입 정보를 파일 읽기에 자동 주입합니다. |
|
|
23
|
+
| [opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) | API 크레딧 대신 ChatGPT Plus/Pro 구독을 사용할 수 있습니다. |
|
|
24
|
+
| [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) | API 과금 대신 기존 Gemini 플랜을 사용할 수 있습니다. |
|
|
25
|
+
| [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) | API 과금 대신 Antigravity의 무료 model을 사용할 수 있습니다. |
|
|
26
|
+
| [opencode-devcontainers](https://github.com/athal7/opencode-devcontainers) | shallow clone과 자동 포트 할당을 기반으로 multi-branch devcontainer 격리를 제공합니다. |
|
|
27
|
+
| [opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) | Google Search 지원과 견고한 API 처리를 제공하는 Google Antigravity OAuth Plugin입니다. |
|
|
28
|
+
| [opencode-dynamic-context-pruning](https://github.com/Tarquinen/opencode-dynamic-context-pruning) | 오래된 tool output을 정리해 token 사용량을 최적화합니다. |
|
|
29
|
+
| [opencode-vibeguard](https://github.com/inkdust2021/opencode-vibeguard) | LLM 호출 전에 secrets/PII를 VibeGuard 스타일 placeholder로 가리고, 로컬에서 복원합니다. |
|
|
30
|
+
| [opencode-websearch-cited](https://github.com/ghoulr/opencode-websearch-cited.git) | 지원 provider에서 Google grounded 스타일의 네이티브 websearch를 추가합니다. |
|
|
31
|
+
| [opencode-pty](https://github.com/shekohex/opencode-pty.git) | AI agent가 PTY에서 백그라운드 프로세스를 실행하고 대화형 입력을 보낼 수 있게 합니다. |
|
|
32
|
+
| [opencode-shell-strategy](https://github.com/JRedeker/opencode-shell-strategy) | 비대화형 shell 명령 실행 지침을 제공해 TTY 의존 작업으로 인한 멈춤을 방지합니다. |
|
|
33
|
+
| [opencode-wakatime](https://github.com/angristan/opencode-wakatime) | Wakatime으로 OpenCode 사용량을 추적합니다. |
|
|
34
|
+
| [opencode-md-table-formatter](https://github.com/franlol/opencode-md-table-formatter/tree/main) | LLM이 생성한 markdown 표를 정리합니다. |
|
|
35
|
+
| [opencode-morph-plugin](https://github.com/morphllm/opencode-morph-plugin) | Morph를 통한 Fast Apply 편집, WarpGrep 코드베이스 검색 및 컨텍스트 압축 |
|
|
36
|
+
| [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) | background agent, 사전 구성된 LSP/AST/MCP tool, curated agent, Claude Code 호환성을 제공합니다. |
|
|
37
|
+
| [opencode-notificator](https://github.com/panta82/opencode-notificator) | OpenCode 세션에 데스크톱 알림과 사운드 알림을 제공합니다. |
|
|
38
|
+
| [opencode-notifier](https://github.com/mohak34/opencode-notifier) | permission, 완료, 오류 이벤트에 대한 데스크톱 알림과 사운드 알림을 제공합니다. |
|
|
39
|
+
| [opencode-zellij-namer](https://github.com/24601/opencode-zellij-namer) | OpenCode 맥락을 기반으로 Zellij session 이름을 AI로 자동 지정합니다. |
|
|
40
|
+
| [opencode-skillful](https://github.com/zenobi-us/opencode-skillful) | skill 탐색과 주입을 통해 OpenCode agent가 필요 시 prompt를 lazy load하도록 합니다. |
|
|
41
|
+
| [opencode-supermemory](https://github.com/supermemoryai/opencode-supermemory) | Supermemory를 사용해 세션 간 persistent memory를 제공합니다. |
|
|
42
|
+
| [@plannotator/opencode](https://github.com/backnotprop/plannotator/tree/main/apps/opencode-plugin) | 시각 주석과 private/offline 공유를 포함한 인터랙티브 계획 리뷰를 제공합니다. |
|
|
43
|
+
| [@openspoon/subtask2](https://github.com/spoons-and-mirrors/subtask2) | 세밀한 flow control로 opencode /commands를 강력한 orchestration 시스템으로 확장합니다. |
|
|
44
|
+
| [opencode-scheduler](https://github.com/different-ai/opencode-scheduler) | cron 문법을 사용해 launchd(Mac) 또는 systemd(Linux) 기반 반복 작업을 예약합니다. |
|
|
45
|
+
| [micode](https://github.com/vtemian/micode) | Structured Brainstorm → Plan → Implement 워크플로를 session continuity와 함께 제공합니다. |
|
|
46
|
+
| [octto](https://github.com/vtemian/octto) | 다중 질문 폼 기반의 AI 브레인스토밍용 인터랙티브 브라우저 UI를 제공합니다. |
|
|
47
|
+
| [opencode-background-agents](https://github.com/kdcokenny/opencode-background-agents) | Claude Code 스타일의 background agent를 async delegation과 context persistence로 제공합니다. |
|
|
48
|
+
| [opencode-notify](https://github.com/kdcokenny/opencode-notify) | OpenCode 작업 완료 시점을 native OS 알림으로 알려줍니다. |
|
|
49
|
+
| [opencode-workspace](https://github.com/kdcokenny/opencode-workspace) | 16개 구성요소를 한 번에 설치하는 bundled multi-agent orchestration harness를 제공합니다. |
|
|
50
|
+
| [opencode-worktree](https://github.com/kdcokenny/opencode-worktree) | OpenCode용 git worktree를 손쉽게 사용할 수 있도록 돕습니다. |
|
|
51
|
+
| [opencode-sentry-monitor](https://github.com/stolinski/opencode-sentry-monitor) | Sentry AI 모니터링으로 AI 에이전트를 추적하고 디버그합니다. |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 프로젝트
|
|
56
|
+
|
|
57
|
+
| 이름 | 설명 |
|
|
58
|
+
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
|
|
59
|
+
| [kimaki](https://github.com/remorses/kimaki) | SDK 기반으로 OpenCode 세션을 제어하는 Discord bot입니다. |
|
|
60
|
+
| [opencode.nvim](https://github.com/NickvanDyke/opencode.nvim) | API 기반 editor-aware prompt를 제공하는 Neovim plugin입니다. |
|
|
61
|
+
| [portal](https://github.com/hosenur/portal) | Tailscale/VPN 환경에서 OpenCode를 쓰기 위한 mobile-first 웹 UI입니다. |
|
|
62
|
+
| [opencode plugin template](https://github.com/zenobi-us/opencode-plugin-template/) | OpenCode plugin 개발을 위한 템플릿입니다. |
|
|
63
|
+
| [opencode.nvim](https://github.com/sudo-tee/opencode.nvim) | terminal 기반 AI 코딩 agent인 opencode용 Neovim frontend입니다. |
|
|
64
|
+
| [ai-sdk-provider-opencode-sdk](https://github.com/ben-vargas/ai-sdk-provider-opencode-sdk) | `@opencode-ai/sdk`로 OpenCode를 사용하는 Vercel AI SDK provider입니다. |
|
|
65
|
+
| [OpenChamber](https://github.com/btriapitsyn/openchamber) | OpenCode용 Web/Desktop App 및 VS Code Extension입니다. |
|
|
66
|
+
| [OpenCode-Obsidian](https://github.com/mtymek/opencode-obsidian) | Obsidian UI에 OpenCode를 내장하는 Obsidian plugin입니다. |
|
|
67
|
+
| [OpenWork](https://github.com/different-ai/openwork) | OpenCode 기반의 Claude Cowork 대체 오픈소스 프로젝트입니다. |
|
|
68
|
+
| [ocx](https://github.com/kdcokenny/ocx) | 휴대형 격리 프로필을 지원하는 OpenCode extension manager입니다. |
|
|
69
|
+
| [CodeNomad](https://github.com/NeuralNomadsAI/CodeNomad) | OpenCode용 Desktop/Web/Mobile/Remote client app입니다. |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 에이전트
|
|
74
|
+
|
|
75
|
+
| 이름 | 설명 |
|
|
76
|
+
| ----------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
77
|
+
| [Agentic](https://github.com/Cluster444/agentic) | 구조화된 개발을 위한 모듈형 AI agent와 command를 제공합니다. |
|
|
78
|
+
| [opencode-agents](https://github.com/darrenhinde/opencode-agents) | 향상된 워크플로를 위한 config, prompt, agent, plugin 모음입니다. |
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 엔터프라이즈
|
|
3
|
+
description: 조직에서 OpenCode를 안전하게 사용하는 방법입니다.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import config from "../../../../config.mjs"
|
|
7
|
+
export const email = `mailto:${config.email}`
|
|
8
|
+
|
|
9
|
+
OpenCode Enterprise는 코드와 데이터가 조직의 인프라 밖으로 나가지 않도록 보장하려는 조직을 위한 기능입니다. SSO 및 내부 AI gateway와 연동되는 중앙 config를 사용해 이를 구현할 수 있습니다.
|
|
10
|
+
|
|
11
|
+
:::note
|
|
12
|
+
OpenCode는 코드나 context 데이터를 저장하지 않습니다.
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
OpenCode Enterprise를 시작하려면 다음 단계를 진행하세요.
|
|
16
|
+
|
|
17
|
+
1. 팀 내부에서 trial을 먼저 진행하세요.
|
|
18
|
+
2. 가격 및 도입 옵션을 논의하려면 **<a href={email}>문의해 주세요</a>**.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Trial
|
|
23
|
+
|
|
24
|
+
OpenCode는 오픈소스이며 코드나 context 데이터를 저장하지 않으므로, 개발자는 바로 [시작하기](/docs/)를 참고해 trial을 진행할 수 있습니다.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### Data handling
|
|
29
|
+
|
|
30
|
+
**OpenCode는 코드나 context 데이터를 저장하지 않습니다.** 모든 처리는 로컬 환경 또는 AI provider로의 직접 API 호출로 이루어집니다.
|
|
31
|
+
|
|
32
|
+
따라서 신뢰할 수 있는 provider 또는 내부 AI gateway를 사용한다면 OpenCode를 안전하게 사용할 수 있습니다.
|
|
33
|
+
|
|
34
|
+
주의할 점은 선택 기능인 `/share`입니다.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
#### Sharing conversations
|
|
39
|
+
|
|
40
|
+
사용자가 `/share` 기능을 활성화하면, 대화와 관련 데이터가 opencode.ai의 share 페이지 호스팅 서비스로 전송됩니다.
|
|
41
|
+
|
|
42
|
+
현재 이 데이터는 CDN edge network를 통해 제공되며, 사용자와 가까운 edge에 캐시됩니다.
|
|
43
|
+
|
|
44
|
+
trial 단계에서는 이 기능을 비활성화할 것을 권장합니다.
|
|
45
|
+
|
|
46
|
+
```json title="opencode.json"
|
|
47
|
+
{
|
|
48
|
+
"$schema": "https://opencode.ai/config.json",
|
|
49
|
+
"share": "disabled"
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
[sharing에 대해 더 알아보기](/docs/share).
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Code ownership
|
|
58
|
+
|
|
59
|
+
**OpenCode가 생성한 코드는 모두 사용자에게 소유권이 있습니다.** 라이선스 제한이나 소유권 주장도 없습니다.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Pricing
|
|
64
|
+
|
|
65
|
+
OpenCode Enterprise는 seat당 과금 모델을 사용합니다. 자체 LLM gateway를 사용하는 경우에는 사용 token에 대해 별도 과금하지 않습니다. 가격 및 도입 옵션의 자세한 내용은 **<a href={email}>문의해 주세요</a>**.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Deployment
|
|
70
|
+
|
|
71
|
+
trial을 마치고 조직에서 OpenCode를 본격적으로 사용하려면, 가격 및 도입 옵션 논의를 위해 **<a href={email}>문의해 주세요</a>**.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Central Config
|
|
76
|
+
|
|
77
|
+
조직 전체에서 단일 중앙 config를 사용하도록 OpenCode를 설정할 수 있습니다.
|
|
78
|
+
|
|
79
|
+
이 중앙 config는 SSO provider와 연동할 수 있으며, 모든 사용자가 내부 AI gateway만 사용하도록 보장합니다.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### SSO integration
|
|
84
|
+
|
|
85
|
+
중앙 config를 통해 OpenCode는 조직의 SSO provider와 인증 연동을 구성할 수 있습니다.
|
|
86
|
+
|
|
87
|
+
이를 통해 기존 ID 관리 시스템으로 내부 AI gateway credential을 안전하게 획득할 수 있습니다.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Internal AI gateway
|
|
92
|
+
|
|
93
|
+
중앙 config를 사용하면 OpenCode를 내부 AI gateway만 사용하도록 설정할 수 있습니다.
|
|
94
|
+
|
|
95
|
+
또한 다른 AI provider를 모두 비활성화해, 모든 요청이 조직에서 승인한 인프라만 통과하도록 구성할 수 있습니다.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Self-hosting
|
|
100
|
+
|
|
101
|
+
데이터가 조직 외부로 나가지 않도록 share 페이지 비활성화를 권장하지만, 원하시면 해당 페이지를 조직 인프라에 self-hosting하는 방식도 지원할 수 있습니다.
|
|
102
|
+
|
|
103
|
+
이 기능은 현재 로드맵에 있으며, 관심이 있다면 **<a href={email}>문의해 주세요</a>**.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## FAQ
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary>OpenCode Enterprise란 무엇인가요?</summary>
|
|
111
|
+
|
|
112
|
+
OpenCode Enterprise는 코드와 데이터가 조직 인프라 밖으로 나가지 않도록 보장하려는 조직을 위한 기능입니다. SSO 및 내부 AI gateway와 연동되는 중앙 config를 사용해 이를 구현할 수 있습니다.
|
|
113
|
+
|
|
114
|
+
</details>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary>OpenCode Enterprise는 어떻게 시작하나요?</summary>
|
|
118
|
+
|
|
119
|
+
먼저 팀 내부 trial부터 시작하세요. OpenCode는 기본적으로 코드나 context 데이터를 저장하지 않으므로 도입을 빠르게 시작할 수 있습니다.
|
|
120
|
+
|
|
121
|
+
그다음 가격 및 도입 옵션 논의를 위해 **<a href={email}>문의해 주세요</a>**.
|
|
122
|
+
|
|
123
|
+
</details>
|
|
124
|
+
|
|
125
|
+
<details>
|
|
126
|
+
<summary>엔터프라이즈 가격 정책은 어떻게 되나요?</summary>
|
|
127
|
+
|
|
128
|
+
seat당 과금 방식의 엔터프라이즈 요금제를 제공합니다. 자체 LLM gateway를 사용하면 token 사용량에 대한 별도 과금은 없습니다. 자세한 내용은 **<a href={email}>문의해 주세요</a>**. 조직 상황에 맞는 맞춤 견적을 안내해 드립니다.
|
|
129
|
+
|
|
130
|
+
</details>
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>OpenCode Enterprise에서 데이터는 안전한가요?</summary>
|
|
134
|
+
|
|
135
|
+
네. OpenCode는 코드나 context 데이터를 저장하지 않습니다. 모든 처리는 로컬 또는 AI provider로의 직접 API 호출로 이루어집니다. 중앙 config와 SSO integration을 함께 사용하면 데이터는 조직 인프라 내부에서 안전하게 유지됩니다.
|
|
136
|
+
|
|
137
|
+
</details>
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary>사내 private NPM registry를 사용할 수 있나요?</summary>
|
|
141
|
+
|
|
142
|
+
OpenCode는 Bun의 기본 `.npmrc` 지원을 통해 private npm registry를 사용할 수 있습니다. 조직에서 JFrog Artifactory, Nexus 등 private registry를 사용한다면 OpenCode 실행 전에 개발자 인증을 완료하세요.
|
|
143
|
+
|
|
144
|
+
private registry 인증 예시는 다음과 같습니다.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm login --registry=https://your-company.jfrog.io/api/npm/npm-virtual/
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
이 명령은 인증 정보가 포함된 `~/.npmrc`를 생성하며, OpenCode는 이를 자동으로 인식합니다.
|
|
151
|
+
|
|
152
|
+
:::caution
|
|
153
|
+
OpenCode 실행 전에 private registry 로그인 상태여야 합니다.
|
|
154
|
+
:::
|
|
155
|
+
|
|
156
|
+
또는 `.npmrc` 파일을 수동으로 구성할 수 있습니다.
|
|
157
|
+
|
|
158
|
+
```bash title="~/.npmrc"
|
|
159
|
+
registry=https://your-company.jfrog.io/api/npm/npm-virtual/
|
|
160
|
+
//your-company.jfrog.io/api/npm/npm-virtual/:_authToken=${NPM_AUTH_TOKEN}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
엔터프라이즈 registry에서 패키지를 정상 설치하려면, 개발자는 OpenCode 실행 전에 private registry 인증을 완료해야 합니다.
|
|
164
|
+
|
|
165
|
+
</details>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 포매터
|
|
3
|
+
description: OpenCode는 언어별 포매터를 사용합니다.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
OpenCode는 파일을 write하거나 edit한 뒤, 언어별 포매터를 사용해 자동으로 포맷합니다. 이를 통해 생성된 코드가 프로젝트의 코드 스타일을 따르도록 보장합니다.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 내장
|
|
11
|
+
|
|
12
|
+
OpenCode는 주요 언어와 프레임워크를 위한 여러 내장 포매터를 제공합니다. 아래는 포매터 목록, 지원 확장자, 필요한 명령 또는 config 옵션입니다.
|
|
13
|
+
|
|
14
|
+
| 포매터 | 확장자 | 요구 사항 |
|
|
15
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| air | .R | `air` 명령 사용 가능 |
|
|
17
|
+
| biome | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, [기타](https://biomejs.dev/) | `biome.json(c)` config 파일 |
|
|
18
|
+
| cargofmt | .rs | `cargo fmt` 명령 사용 가능 |
|
|
19
|
+
| clang-format | .c, .cpp, .h, .hpp, .ino, [기타](https://clang.llvm.org/docs/ClangFormat.html) | `.clang-format` config 파일 |
|
|
20
|
+
| cljfmt | .clj, .cljs, .cljc, .edn | `cljfmt` 명령 사용 가능 |
|
|
21
|
+
| dart | .dart | `dart` 명령 사용 가능 |
|
|
22
|
+
| dfmt | .d | `dfmt` 명령 사용 가능 |
|
|
23
|
+
| gleam | .gleam | `gleam` 명령 사용 가능 |
|
|
24
|
+
| gofmt | .go | `gofmt` 명령 사용 가능 |
|
|
25
|
+
| htmlbeautifier | .erb, .html.erb | `htmlbeautifier` 명령 사용 가능 |
|
|
26
|
+
| ktlint | .kt, .kts | `ktlint` 명령 사용 가능 |
|
|
27
|
+
| mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | `mix` 명령 사용 가능 |
|
|
28
|
+
| nixfmt | .nix | `nixfmt` 명령 사용 가능 |
|
|
29
|
+
| ocamlformat | .ml, .mli | `ocamlformat` 명령 사용 가능 및 `.ocamlformat` config 파일 필요 |
|
|
30
|
+
| ormolu | .hs | `ormolu` 명령 사용 가능 |
|
|
31
|
+
| oxfmt (Experimental) | .js, .jsx, .ts, .tsx | `package.json`에 `oxfmt` dependency 필요 및 [experimental env variable flag](/docs/cli/#experimental) |
|
|
32
|
+
| pint | .php | `composer.json`에 `laravel/pint` dependency 필요 |
|
|
33
|
+
| prettier | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml, [기타](https://prettier.io/docs/en/index.html) | `package.json`에 `prettier` dependency 필요 |
|
|
34
|
+
| rubocop | .rb, .rake, .gemspec, .ru | `rubocop` 명령 사용 가능 |
|
|
35
|
+
| ruff | .py, .pyi | `ruff` 명령 사용 가능 및 관련 config 필요 |
|
|
36
|
+
| rustfmt | .rs | `rustfmt` 명령 사용 가능 |
|
|
37
|
+
| shfmt | .sh, .bash | `shfmt` 명령 사용 가능 |
|
|
38
|
+
| standardrb | .rb, .rake, .gemspec, .ru | `standardrb` 명령 사용 가능 |
|
|
39
|
+
| terraform | .tf, .tfvars | `terraform` 명령 사용 가능 |
|
|
40
|
+
| uv | .py, .pyi | `uv` 명령 사용 가능 |
|
|
41
|
+
| zig | .zig, .zon | `zig` 명령 사용 가능 |
|
|
42
|
+
|
|
43
|
+
예를 들어 프로젝트 `package.json`에 `prettier`가 있으면 OpenCode가 자동으로 해당 포매터를 사용합니다.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 작동 방식
|
|
48
|
+
|
|
49
|
+
OpenCode가 파일을 write하거나 edit할 때 다음 순서로 동작합니다.
|
|
50
|
+
|
|
51
|
+
1. 활성화된 모든 포매터와 파일 확장자를 대조합니다.
|
|
52
|
+
2. 파일에 맞는 포매터 명령을 실행합니다.
|
|
53
|
+
3. 포맷 변경 사항을 자동으로 적용합니다.
|
|
54
|
+
|
|
55
|
+
이 과정은 background에서 실행되며, 수동 작업 없이 코드 스타일이 유지됩니다.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 구성
|
|
60
|
+
|
|
61
|
+
OpenCode config의 `formatter` 섹션에서 포매터를 커스터마이즈할 수 있습니다.
|
|
62
|
+
|
|
63
|
+
```json title="opencode.json"
|
|
64
|
+
{
|
|
65
|
+
"$schema": "https://opencode.ai/config.json",
|
|
66
|
+
"formatter": {}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
각 formatter 설정에서 지원하는 항목은 다음과 같습니다.
|
|
71
|
+
|
|
72
|
+
| 속성 | 타입 | 설명 |
|
|
73
|
+
| ------------- | -------- | ---------------------------------------------- |
|
|
74
|
+
| `disabled` | boolean | `true`로 설정하면 해당 포매터를 비활성화합니다 |
|
|
75
|
+
| `command` | string[] | 포맷 실행 명령입니다 |
|
|
76
|
+
| `environment` | object | 포매터 실행 시 설정할 환경 변수입니다 |
|
|
77
|
+
| `extensions` | string[] | 해당 포매터가 처리할 파일 확장자입니다 |
|
|
78
|
+
|
|
79
|
+
아래 예시를 참고하세요.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### 포매터 비활성화
|
|
84
|
+
|
|
85
|
+
전체 포매터를 전역에서 비활성화하려면 `formatter`를 `false`로 설정하세요.
|
|
86
|
+
|
|
87
|
+
```json title="opencode.json" {3}
|
|
88
|
+
{
|
|
89
|
+
"$schema": "https://opencode.ai/config.json",
|
|
90
|
+
"formatter": false
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
특정 포매터만 비활성화하려면 `disabled`를 `true`로 설정하세요.
|
|
95
|
+
|
|
96
|
+
```json title="opencode.json" {5}
|
|
97
|
+
{
|
|
98
|
+
"$schema": "https://opencode.ai/config.json",
|
|
99
|
+
"formatter": {
|
|
100
|
+
"prettier": {
|
|
101
|
+
"disabled": true
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### 사용자 정의 포매터
|
|
110
|
+
|
|
111
|
+
명령, 환경 변수, 파일 확장자를 지정해 내장 포매터를 override하거나 새 포매터를 추가할 수 있습니다.
|
|
112
|
+
|
|
113
|
+
```json title="opencode.json" {4-14}
|
|
114
|
+
{
|
|
115
|
+
"$schema": "https://opencode.ai/config.json",
|
|
116
|
+
"formatter": {
|
|
117
|
+
"prettier": {
|
|
118
|
+
"command": ["npx", "prettier", "--write", "$FILE"],
|
|
119
|
+
"environment": {
|
|
120
|
+
"NODE_ENV": "development"
|
|
121
|
+
},
|
|
122
|
+
"extensions": [".js", ".ts", ".jsx", ".tsx"]
|
|
123
|
+
},
|
|
124
|
+
"custom-markdown-formatter": {
|
|
125
|
+
"command": ["deno", "fmt", "$FILE"],
|
|
126
|
+
"extensions": [".md"]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
명령의 **`$FILE` placeholder**는 포맷 대상 파일 경로로 치환됩니다.
|