Skip to main content
Glama
MIT License
27,120
19,789
  • Linux
  • Apple
code-compress.mdโ€ข2.54 kB
# ์ฝ”๋“œ ์••์ถ• ์ฝ”๋“œ ์••์ถ•์€ ๊ตฌํ˜„ ์„ธ๋ถ€ ์‚ฌํ•ญ์„ ์ œ๊ฑฐํ•˜๋ฉด์„œ ํ•„์ˆ˜์ ์ธ ์ฝ”๋“œ ๊ตฌ์กฐ๋ฅผ ์ง€๋Šฅ์ ์œผ๋กœ ์ถ”์ถœํ•˜๋Š” ๊ฐ•๋ ฅํ•œ ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. ์ด๋Š” ์ฝ”๋“œ๋ฒ ์ด์Šค์˜ ์ค‘์š”ํ•œ ๊ตฌ์กฐ์  ์ •๋ณด๋ฅผ ์œ ์ง€ํ•˜๋ฉด์„œ ํ† ํฐ ์ˆ˜๋ฅผ ์ค„์ผ ๋•Œ ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค. > [!NOTE] > ์ด๊ฒƒ์€ ์‹คํ—˜์ ์ธ ๊ธฐ๋Šฅ์œผ๋กœ, ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ๊ณผ ์‹ค์ œ ์‚ฌ์šฉ ์‚ฌ๋ก€๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ง€์†์ ์œผ๋กœ ๊ฐœ์„ ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ## ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ• `--compress` ํ”Œ๋ž˜๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋“œ ์••์ถ•์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค: ```bash repomix --compress ``` ์›๊ฒฉ ์ €์žฅ์†Œ์—์„œ๋„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```bash repomix --remote user/repo --compress ``` ## ์ž‘๋™ ๋ฐฉ์‹ ์••์ถ• ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ Tree-sitter ํŒŒ์‹ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ”๋“œ๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ณ , ๊ตฌํ˜„ ์„ธ๋ถ€ ์‚ฌํ•ญ์„ ์ œ๊ฑฐํ•˜๋ฉด์„œ ํ•„์ˆ˜์ ์ธ ๊ตฌ์กฐ์  ์š”์†Œ๋ฅผ ์ถ”์ถœํ•˜๊ณ  ๋ณด์กดํ•ฉ๋‹ˆ๋‹ค. ์••์ถ• ์‹œ ์œ ์ง€๋˜๋Š” ์š”์†Œ: - ํ•จ์ˆ˜์™€ ๋ฉ”์„œ๋“œ ์‹œ๊ทธ๋‹ˆ์ฒ˜ - ์ธํ„ฐํŽ˜์ด์Šค์™€ ํƒ€์ž… ์ •์˜ - ํด๋ž˜์Šค ๊ตฌ์กฐ์™€ ์†์„ฑ - ์ค‘์š”ํ•œ ๊ตฌ์กฐ์  ์š”์†Œ ์ œ๊ฑฐ๋˜๋Š” ์š”์†Œ: - ํ•จ์ˆ˜์™€ ๋ฉ”์„œ๋“œ ๊ตฌํ˜„ - ๋ฐ˜๋ณต๋ฌธ๊ณผ ์กฐ๊ฑด๋ฌธ ๋กœ์ง ์„ธ๋ถ€ ์‚ฌํ•ญ - ๋‚ด๋ถ€ ๋ณ€์ˆ˜ ์„ ์–ธ - ๊ตฌํ˜„ ๊ด€๋ จ ์ฝ”๋“œ ### ์˜ˆ์‹œ ์›๋ณธ TypeScript ์ฝ”๋“œ: ```typescript import { ShoppingItem } from './shopping-item'; /** * Calculate the total price of shopping items */ const calculateTotal = ( items: ShoppingItem[] ) => { let total = 0; for (const item of items) { total += item.price * item.quantity; } return total; } // Shopping item interface interface Item { name: string; price: number; quantity: number; } ``` ์••์ถ• ํ›„: ```typescript import { ShoppingItem } from './shopping-item'; โ‹ฎ---- /** * Calculate the total price of shopping items */ const calculateTotal = ( items: ShoppingItem[] ) => { โ‹ฎ---- // Shopping item interface interface Item { name: string; price: number; quantity: number; } ``` ## ์„ค์ • ์„ค์ • ํŒŒ์ผ์—์„œ ์••์ถ•์„ ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: ```json { "output": { "compress": true } } ``` ## ์‚ฌ์šฉ ์‚ฌ๋ก€ ์ฝ”๋“œ ์••์ถ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฒฝ์šฐ์— ํŠนํžˆ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค: - ์ฝ”๋“œ ๊ตฌ์กฐ์™€ ์•„ํ‚คํ…์ฒ˜ ๋ถ„์„ - LLM ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•œ ํ† ํฐ ์ˆ˜ ๊ฐ์†Œ - ๊ณ ์ˆ˜์ค€ ๋ฌธ์„œ ์ž‘์„ฑ - ์ฝ”๋“œ ํŒจํ„ด๊ณผ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ์ดํ•ด - API์™€ ์ธํ„ฐํŽ˜์ด์Šค ์„ค๊ณ„ ๊ณต์œ  ## ๊ด€๋ จ ์˜ต์…˜ ์••์ถ•์€ ๋‹ค์Œ ์˜ต์…˜๋“ค๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค: - `--remove-comments`: ์ฝ”๋“œ ์ฃผ์„ ์ œ๊ฑฐ - `--remove-empty-lines`: ๋นˆ ์ค„ ์ œ๊ฑฐ - `--output-show-line-numbers`: ์ถœ๋ ฅ์— ์ค„ ๋ฒˆํ˜ธ ์ถ”๊ฐ€

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yamadashy/repomix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server