# Trees - 파일 트리 렌더링 라이브러리 오픈소스

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

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=30191](https://news.hada.io/topic?id=30191)
- GeekNews Markdown: [https://news.hada.io/topic/30191.md](https://news.hada.io/topic/30191.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2026-06-05T09:31:01+09:00
- Updated: 2026-06-05T09:31:01+09:00
- Original source: [trees.software](https://trees.software/)
- Points: 8
- Comments: 2

## Topic Body

- VSCode의 파일 창과 비슷한 **파일/디렉터리 구조**를 그려주는 라이브러리   
- **높은 커스터마이징 자유도**와 **성능과 유연성** 중심으로 설계  
- 수만 개 항목도 빠르게 렌더링하는 **자동 가상화** 내장, 화면에 보이는 행만 마운트해서 처리  
- **Git 상태 배지**, **드래그 앤 드롭**, 이름 검색·필터, 커스텀 컨텍스트 메뉴 등 개발 도구형 트리 UI에 필요한 기능을 폭넓게 지원  
- 키보드 내비게이션·포커스 관리·ARIA 등을 지원해 WCAG 2.1 기준에 맞춘 **접근성 기본 제공**  
- CSS 변수, Shiki 테마, 밀도 조절 등으로 **외형을 세밀하게 제어**  
- **에디터/코드 호스팅 도구**의 사이드바 트리 구현에 활용 가능  
- **주요 기능**들 상세  
  - `flattenEmptyDirectories`: 자식 하나뿐인 폴더 체인을 한 행으로 합쳐 **트리 평탄화** 지원   
  - `gitStatus`: 추가·수정·삭제·이름변경·미추적·무시 파일에 **Git 상태 배지** 표시, 변경된 하위 항목이 있는 폴더엔 점(dot) 인디케이터 자동 표시  
  - `dragAndDrop`: 파일·폴더를 다른 폴더나 루트로 **드래그 이동**, 드롭 대상은 hover 시 자동 펼침, `canDrag` 콜백으로 특정 경로 차단 가능  
  - 새 파일·폴더·이름변경·삭제 등 **커스텀 컨텍스트 메뉴** 구성 지원  
  - 검색창을 통해 **이름·경로 기반 빠른 필터링**, `hide-non-matches`·`collapse-non-matches`·`expand-matches` 세 가지 모드 지원  
  - `minimal`·`standard`·`complete` 세가지의 내장 아이콘 세트 제공  
  - `density` 옵션(compact·default·relaxed)으로 행 높이·간격을 한 번에 조절

## Comments



### Comment 58969

- Author: saysealing
- Created: 2026-06-05T13:27:21+09:00
- Points: 1

이렇게 alias 해서 쓰시면 편리합니다.  
  
alias t='tree -N -C -L 2 -I "node_modules|cache|dist|test_*"'  
alias tt='tree -N -C -L 3 -I "node_modules|cache|dist|test_*"'  
alias ttt='tree -N -C -L 4 -I "node_modules|cache|dist|test_*"'  
alias tttt='tree -N -C -L 5 -I "node_modules|cache|dist|test_*"'

### Comment 58964

- Author: brainer
- Created: 2026-06-05T10:58:54+09:00
- Points: 1

> tree /  
  
재미나고 유용한듯한 오픈소스네요
