| name | ir |
| description | Local markdown search engine CLI. Use when searching notes, querying documents, managing collections, indexing, embedding, or retrieving document content. Also use when ir search, ir update, ir embed, ir collection, ir status, ir daemon, ir get. |
| allowed-tools | Bash(ir:*) |
ir - Local Markdown Search Engine
로컬 마크다운 문서를 인덱싱하고 검색하는 CLI 도구. Collection 기반 관리, BM25/Vector/Hybrid 검색 지원.
Status
!ir status 2>/dev/null || echo "ir not available"
CLI Quick Reference
Search
ir search "question"
ir search --mode bm25 "keywords"
ir search --mode vector "question"
Search Options
--mode <MODE>
-n <num>
--min-score <num>
-c, --collection <name>
--full
--files
--json
--md
--csv
--all
-v, --verbose
Document Retrieval
ir get "#abc123"
ir get notes/meeting.md:50 -l 100
Collection Management
ir collection list
ir collection add ~/notes --name notes
ir collection remove <name>
ir collection rename <old> <new>
ir collection set-path <name> <path>
Indexing & Embedding
ir update
ir update <collection>
ir update --pull
ir embed
ir embed <collection>
Daemon & MCP
ir daemon start
ir daemon stop
ir daemon status
ir mcp
ir mcp --http <PORT>
Examples
노트에서 정보 검색
User: "배포 관련 노트 찾아줘"
-> ir search "배포 방법 deploy" -n 10
-> 결과 요약 -> 필요 시 ir get "#docid"로 상세 조회
컬렉션 추가 후 인덱싱
User: "이 프로젝트 문서도 검색되게 해줘"
-> ir collection add ~/pj-foo/docs --name pj-foo
-> ir update pj-foo && ir embed pj-foo
-> ir status 로 확인
특정 컬렉션 스코프 검색
User: "회의록에서 프로젝트 타임라인 찾아줘"
-> ir search "프로젝트 일정과 마일스톤" -c meetings -n 10
Principles
- 검색 모드: 빠른 키워드 ->
--mode bm25, 최고 품질 -> 기본 hybrid
- 점수 해석: 0.8+ 매우 관련, 0.5-0.8 적당, 0.5 미만 약함
- 컬렉션 스코핑:
-c 옵션으로 범위를 좁히면 노이즈 감소
- 인덱스 갱신: 문서 추가/수정 후
ir update && ir embed 실행
- 파이프라인:
--json/--files 출력으로 후처리 연결