Download packages/web/src/content/docs/ko/web.mdx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 3.7 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content/docs/ko/web.mdx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/web/src/content/docs/ko/web.mdx
-
curl -L -o web.mdx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/web/src/content/docs/ko/web.mdx
3.7 kB
| title: Web | |
| description: ๋ธ๋ผ์ฐ์ ์์ OpenCode ์ฌ์ฉํ๊ธฐ. | |
| opencode๋ ๋ธ๋ผ์ฐ์ ์์ ์น ์์ฉ ํ๋ก๊ทธ๋จ์ ์คํํ ์ ์์ผ๋ฉฐ terminal์ ํ์๋กํ์ง ์๊ณ ๋์ผํ ๊ฐ๋ ฅํ AI ์ฝ๋ฉ ๊ฒฝํ์ ์ ๊ณตํฉ๋๋ค. | |
|  | |
| ## ์์ํ๊ธฐ | |
| ์คํํ์ฌ ์น ์ธํฐํ์ด์ค๋ฅผ ์์: | |
| ```bash | |
| opencode web | |
| ``` | |
| `127.0.0.1`์ ๋ก์ปฌ ์๋ฒ๋ฅผ ๋๋ค ์ฌ์ฉ ๊ฐ๋ฅํ ํฌํธ๋ก ์์ํ๊ณ ๊ธฐ๋ณธ ๋ธ๋ผ์ฐ์ ์์ opencode๋ฅผ ์๋์ผ๋ก ์ฝ๋๋ค. | |
| :::caution | |
| `OPENCODE_SERVER_PASSWORD`๊ฐ ์ค์ ๋์ง ์์ ๊ฒฝ์ฐ ์๋ฒ๊ฐ ์ค๋จ๋์ง ์์ต๋๋ค. ์ด๊ฒ์ ๋ก์ปฌ ์ฌ์ฉ์์ํ ๊ด์ฐฎ์ง๋ง ๋คํธ์ํฌ ์ก์ธ์ค๋ฅผ ์ค์ ํด์ผํฉ๋๋ค. | |
| ::: | |
| :::tip[Windows ์ฌ์ฉ์] | |
| ์ต๊ณ ์ ๊ฒฝํ์ ์ํด์๋ PowerShell๋ณด๋ค `opencode web`๋ฅผ ์คํํ์ญ์์ค. ์ ์ ํ ํ์ผ ์์คํ ์ก์ธ์ค ๋ฐ terminal ํตํฉ์ ๋ณด์ฅํฉ๋๋ค. | |
| ::: | |
| ## ๊ตฌ์ฑ | |
| ๋ช ๋ น์ค ํ๋๊ทธ ๋๋ [config file](/docs/config)์์ ์น ์๋ฒ๋ฅผ ๊ตฌ์ฑํ ์ ์์ต๋๋ค. | |
| ## ํฌํธ | |
| ๊ธฐ๋ณธ์ ์ผ๋ก opencode๋ ์ฌ์ฉํ ์ ์๋ ํฌํธ๋ฅผ ์ ํํฉ๋๋ค. ํฌํธ๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค: | |
| ```bash | |
| opencode web --port 4096 | |
| ``` | |
| ## ํธ์คํธ ์ด๋ฆ | |
| ๊ธฐ๋ณธ์ ์ผ๋ก ์๋ฒ๋ `127.0.0.1` (localhost only)์ ๋ฐ์ธ๋ฉํฉ๋๋ค. ๋คํธ์ํฌ์์ opencode๋ฅผ ์ฌ์ฉํ ์ ์๋๋ก: | |
| ```bash | |
| opencode web --hostname 0.0.0.0 | |
| ``` | |
| `0.0.0.0`๋ฅผ ์ฌ์ฉํ ๋, opencode๋ ๋ก์ปฌ ๋ฐ ๋คํธ์ํฌ ์ฃผ์๋ฅผ ๋ชจ๋ ํ์ํฉ๋๋ค. | |
| ``` | |
| Local access: http://localhost:4096 | |
| Network access: http://192.168.1.100:4096 | |
| ``` | |
| ### mDNS ๋ฐ๊ฒฌ | |
| ๋ก์ปฌ ๋คํธ์ํฌ์์ ์๋ฒ๋ฅผ ๋ฐ๊ฒฌํ ์ ์๋ mDNS: | |
| ```bash | |
| opencode web --mdns | |
| ``` | |
| ์ด ์๋์ผ๋ก `0.0.0.0`์ hostname์ ์ค์ ํ๊ณ `opencode.local`๋ก ์๋ฒ๋ฅผ ๊ด๊ณ ํฉ๋๋ค. | |
| ๋์ผํ ๋คํธ์ํฌ์์ ์ฌ๋ฌ ์ธ์คํด์ค๋ฅผ ์คํํ๋ ค๋ฉด mDNS ๋๋ฉ์ธ ์ด๋ฆ์ ์ง์ ํ ์ ์์ต๋๋ค. | |
| ```bash | |
| opencode web --mdns --mdns-domain myproject.local | |
| ``` | |
| ###### CORS | |
| CORS์ ๋ํ ์ถ๊ฐ ๋๋ฉ์ธ์ ํ์ฉํ๋ ค๋ฉด (์ฌ์ฉ์ ์ ์ frontends์ ์ ํฉ) : | |
| ```bash | |
| opencode web --cors https://example.com | |
| ``` | |
| ### ์ธ์ฆ | |
| ์ก์ธ์ค๋ฅผ ๋ณดํธํ๋ ค๋ฉด `OPENCODE_SERVER_PASSWORD` ํ๊ฒฝ ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ ์ํธ๋ฅผ ์ค์ ํ์ญ์์ค. | |
| ```bash | |
| OPENCODE_SERVER_PASSWORD=secret opencode web | |
| ``` | |
| `opencode`์ ๋ํ ์ฌ์ฉ์์ ๊ธฐ๋ณธ๊ฐ์ `OPENCODE_SERVER_USERNAME`๋ก ๋ณ๊ฒฝํ ์ ์์ต๋๋ค. | |
| ## ์น ์ธํฐํ์ด์ค ์ฌ์ฉ | |
| ์์๋๋ฉด ์น ์ธํฐํ์ด์ค๋ opencode ์ธ์ ์ ์ก์ธ์ค ํ ์ ์์ต๋๋ค. | |
| ## ์ธ์ | |
| ํํ์ด์ง์์ ์ธ์ ์ ๋ณด๊ณ ๊ด๋ฆฌํฉ๋๋ค. ํ์ฑ ์ธ์ ์ ๋ณผ ์ ์์ผ๋ฉฐ ์๋ก์ด ๊ฒ์ ์์ํฉ๋๋ค. | |
|  | |
| ## ์๋ฒ ์ํ | |
| "See Servers"๋ฅผ ํด๋ฆญํ์ฌ ์ฐ๊ฒฐ๋ ์๋ฒ์ ์ํ๋ฅผ ๋ณผ ์ ์์ต๋๋ค. | |
|  | |
| ## ํฐ๋ฏธ๋ ์ฐ๊ฒฐ | |
| ์คํ ์น ์๋ฒ์ terminal TUI๋ฅผ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค. | |
| ```bash | |
| # Start the web server | |
| opencode web --port 4096 | |
| # In another terminal, attach the TUI | |
| opencode attach http://localhost:4096 | |
| ``` | |
| ์น ์ธํฐํ์ด์ค์ terminal์ ๋์์ ์ฌ์ฉํ ์ ์๋๋ก, ๊ฐ์ ์ธ์ ๊ณผ ์ํ๋ฅผ ๊ณต์ ํฉ๋๋ค. | |
| ## ๊ตฌ์ฑ ํ์ผ | |
| `opencode.json` config ํ์ผ์์ ์๋ฒ ์ค์ ์ ๊ตฌ์ฑํ ์ ์์ต๋๋ค: | |
| ```json | |
| { | |
| "server": { | |
| "port": 4096, | |
| "hostname": "0.0.0.0", | |
| "mdns": true, | |
| "cors": ["https://example.com"] | |
| } | |
| } | |
| ``` | |
| Command line flags๋ config ํ์ผ ์ค์ ์ ๋ํ precedence๋ฅผ ๊ฐ์ ธ์ต๋๋ค. | |