# mdream - 어떤 사이트든 깨끗한 Markdown 및 llms.txt로 변환

> Clean Markdown view of GeekNews topic #23246. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=23246](https://news.hada.io/topic?id=23246)
- GeekNews Markdown: [https://news.hada.io/topic/23246.md](https://news.hada.io/topic/23246.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2025-09-24T09:28:02+09:00
- Updated: 2025-09-24T09:28:02+09:00
- Original source: [github.com/harlan-zw](https://github.com/harlan-zw/mdream)
- Points: 41
- Comments: 1

## Summary

전통적인 HTML→Markdown 변환기 는 LLM용이 아니어서 토큰도 많이 쓰고 속도도 느린데, **mdream**은 기존 HTML 변환기 대비 약 **50% 적은 토큰**을 소모하면서도 빠르게 **Markdown**과 **llms.txt** 포맷으로 변환해 줍니다. CLI, Docker, GitHub Actions, Vite, Nuxt 등 다양한 환경에서 실행 가능하며, 플러그인 시스템으로 다양한 동작을 커스터 마이징 가능합니다.

## Topic Body

- 웹사이트를 빠르고 가볍게 **Markdown과 llms.txt** 형식으로 변환해, AI가 검색 가능한 **LLM 컨텍스트 생성**을 지원하는 도구  
- 전통적인 HTML→Markdown 변환기 는 LLM용이 아니어서 토큰도 많이 쓰고, 속도도 느림   
- **`mdream` 코어**는 **LLM에 최적화된 HTML→Markdown 변환기**로 약 **50% 적은 토큰**으로 최적화된 출력물을 생성하며, **1.4MB HTML을 약 50ms안에 초고속 변환**가능  
  - **5kB gzip** 크기의 라이브러리로 외부 의존성 없음   
- `@mdream/crawl` 패키지로 사이트 전체를 크롤링해 **llms.txt, llms-full.txt, 개별 Markdown 파일**을 생성하고, Claude Code 같은 AI 도구와 연계할 수 있음  
- CLI, Docker, GitHub Actions, Vite, Nuxt 등 다양한 환경에서 실행 가능   
- **플러그인 시스템**으로 파이프라인 후킹을 통해 콘텐츠 필터링, 노드 변환, 커스텀 동작등을 추가 가능   
  - **extractionPlugin**: CSS 셀렉터를 이용해 특정 요소를 추출, 데이터 분석에 활용  
  - **filterPlugin**: CSS 셀렉터나 태그 ID 기준으로 요소 포함/제외 가능  
  - **frontmatterPlugin**: HTML head 정보(title, meta 등)로 YAML frontmatter 생성  
  - **isolateMainPlugin**: `&lt;main&gt;` 요소나 header~footer 범위로 주요 콘텐츠만 추출  
  - **tailwindPlugin**: Tailwind CSS 클래스를 Markdown 서식(굵게, 기울임 등)으로 변환  
  - **readabilityPlugin**: 콘텐츠 가독성 점수화 및 추출 (실험적 기능)

## Comments



### Comment 44242

- Author: tensun
- Created: 2025-09-24T18:58:05+09:00
- Points: 1

싸뵜는데 오류가 나고 제대로 동작을 안하네요. 엘단 이슈에 글 올렸습니다.
