Download packages/web/src/content/docs/ko/acp.mdx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 4.06 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content/docs/ko/acp.mdx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/web/src/content/docs/ko/acp.mdx
-
curl -L -o acp.mdx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content/docs/ko/acp.mdx
4.06 kB
| title: ACP Support | |
| description: Use OpenCode in any ACP-compatible editor. | |
| OpenCode๋ [Agent Client Protocol](https://agentclientprotocol.com)(ACP)์ ์ง์ํ๋ฏ๋ก, ACP ํธํ ํธ์ง๊ธฐ์ IDE์์ OpenCode๋ฅผ ์ง์ ์ฌ์ฉํ ์ ์์ต๋๋ค. | |
| :::tip | |
| ACP๋ฅผ ์ง์ํ๋ ํธ์ง๊ธฐ์ tool ๋ชฉ๋ก์ [ACP progress report](https://zed.dev/blog/acp-progress-report#available-now)์์ ํ์ธํ์ธ์. | |
| ::: | |
| ACP๋ ์ฝ๋ ํธ์ง๊ธฐ์ AI ์ฝ๋ฉ ์์ด์ ํธ ๊ฐ์ ํต์ ์ ํ์คํํ๋ ๊ฐ๋ฐฉํ ํ๋กํ ์ฝ์ ๋๋ค. | |
| ## ๊ตฌ์ฑ | |
| ACP๋ก OpenCode๋ฅผ ์ฌ์ฉํ๋ ค๋ฉด, ํธ์ง๊ธฐ์์ `opencode acp` ๋ช ๋ น์ ์คํํ๋๋ก config๋ฅผ ์ค์ ํ์ธ์. | |
| ์ด ๋ช ๋ น์ OpenCode๋ฅผ ACP ํธํ subprocess๋ก ์์ํ๋ฉฐ, stdio ๊ธฐ๋ฐ JSON-RPC๋ฅผ ํตํด ํธ์ง๊ธฐ์ ํต์ ํฉ๋๋ค. | |
| ์๋๋ ACP๋ฅผ ์ง์ํ๋ ์ฃผ์ ํธ์ง๊ธฐ ์์์ ๋๋ค. | |
| ### Zed | |
| ๋ช ๋ น ํ๋ ํธ์์ `zed: acp registry`๋ฅผ ์คํํ์ฌ [Zed ACP ๋ ์ง์คํธ๋ฆฌ](https://zed.dev/docs/ai/external-agents#registry)์์ OpenCode๋ฅผ ์ค์นํ์ธ์. | |
| ๋์ ์ฌ์ฉ์ ์ง์ OpenCode ์คํ ํ์ผ์ ์ฌ์ฉํ๋ ค๋ฉด [Zed](https://zed.dev) ์ค์ (`~/.config/zed/settings.json`)์ ์ถ๊ฐํ์ธ์. | |
| ```json title="~/.config/zed/settings.json" | |
| { | |
| "agent_servers": { | |
| "OpenCode": { | |
| "type": "custom", | |
| "command": "opencode", | |
| "args": ["acp"] | |
| } | |
| } | |
| } | |
| ``` | |
| ์ด๋ ค๋ฉด **Command Palette**์์ `agent: new thread` action์ ์ฌ์ฉํ์ธ์. | |
| `keymap.json`์ ์์ ํด ํค๋ณด๋ ๋จ์ถํค๋ฅผ ๋ฐ์ธ๋ฉํ ์๋ ์์ต๋๋ค. | |
| ```json title="keymap.json" | |
| [ | |
| { | |
| "bindings": { | |
| "cmd-alt-o": [ | |
| "agent::NewExternalAgentThread", | |
| { | |
| "agent": { | |
| "custom": { | |
| "name": "OpenCode", | |
| "command": { | |
| "command": "opencode", | |
| "args": ["acp"] | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| ``` | |
| ### JetBrains IDEs | |
| [JetBrains IDE](https://www.jetbrains.com/)์์๋ [documentation](https://www.jetbrains.com/help/ai-assistant/acp.html)์ ๋ฐ๋ผ `acp.json`์ ๋ค์์ ์ถ๊ฐํ์ธ์. | |
| ```json title="acp.json" | |
| { | |
| "agent_servers": { | |
| "OpenCode": { | |
| "command": "/absolute/path/bin/opencode", | |
| "args": ["acp"] | |
| } | |
| } | |
| } | |
| ``` | |
| ์ด๋ ค๋ฉด AI Chat agent selector์์ ์ `OpenCode` agent๋ฅผ ์ ํํ์ธ์. | |
| ### Avante.nvim | |
| [Avante.nvim](https://github.com/yetone/avante.nvim) config์ ๋ค์์ ์ถ๊ฐํ์ธ์. | |
| ```lua | |
| { | |
| acp_providers = { | |
| ["opencode"] = { | |
| command = "opencode", | |
| args = { "acp" } | |
| } | |
| } | |
| } | |
| ``` | |
| ํ๊ฒฝ ๋ณ์๋ฅผ ์ ๋ฌํด์ผ ํ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์ค์ ํ์ธ์. | |
| ```lua {6-8} | |
| { | |
| acp_providers = { | |
| ["opencode"] = { | |
| command = "opencode", | |
| args = { "acp" }, | |
| env = { | |
| OPENCODE_API_KEY = os.getenv("OPENCODE_API_KEY") | |
| } | |
| } | |
| } | |
| } | |
| ``` | |
| ### CodeCompanion.nvim | |
| [CodeCompanion.nvim](https://github.com/olimorris/codecompanion.nvim)์์ OpenCode๋ฅผ ACP agent๋ก ์ฌ์ฉํ๋ ค๋ฉด Neovim config์ ๋ค์์ ์ถ๊ฐํ์ธ์. | |
| ```lua | |
| require("codecompanion").setup({ | |
| interactions = { | |
| chat = { | |
| adapter = { | |
| name = "opencode", | |
| model = "claude-sonnet-4", | |
| }, | |
| }, | |
| }, | |
| }) | |
| ``` | |
| ์ด config๋ chat์์ OpenCode๋ฅผ ACP agent๋ก ์ฌ์ฉํ๋๋ก CodeCompanion์ ์ค์ ํฉ๋๋ค. | |
| ํ๊ฒฝ ๋ณ์(`OPENCODE_API_KEY` ๋ฑ)๋ฅผ ์ ๋ฌํด์ผ ํ๋ค๋ฉด CodeCompanion.nvim documentation์ [Configuring Adapters: Environment Variables](https://codecompanion.olimorris.dev/getting-started#setting-an-api-key)๋ฅผ ์ฐธ๊ณ ํ์ธ์. | |
| ## ์ง์ | |
| OpenCode๋ ACP๋ฅผ ํตํด์๋ ํฐ๋ฏธ๋๊ณผ ๋์ผํ๊ฒ ๋์ํฉ๋๋ค. ๋ค์ ๊ธฐ๋ฅ์ ๋ชจ๋ ์ง์ํฉ๋๋ค. | |
| :::note | |
| `/undo` ๋ฐ `/redo`์ ๊ฐ์ ์ผ๋ถ ๋ด์ฅ ์ฌ๋์ ๋ช ๋ น์ ํ์ฌ ์ง์๋์ง ์์ต๋๋ค. | |
| ::: | |
| - ๋ด์ฅ tool(ํ์ผ ์์ , terminal ๋ช ๋ น ๋ฑ) | |
| - ์ฌ์ฉ์ ์ ์ tool๊ณผ slash command | |
| - OpenCode config์ ์ค์ ํ MCP ์๋ฒ | |
| - `AGENTS.md`์ ํ๋ก์ ํธ๋ณ ๊ท์น | |
| - ์ฌ์ฉ์ ์ ์ formatter์ linter | |
| - agent ๋ฐ ๊ถํ ์์คํ | |