marp-lens
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemarp-lens
marp-lens
Vector-based semantic search CLI for Marp presentations.
基于向量的Marp演示文稿语义搜索CLI工具
Quick Reference
快速参考
bash
undefinedbash
undefinedSearch slides by meaning
按语义搜索幻灯片
npx marp-lens search "機械学習の基礎" --limit 5
npx marp-lens search "機械学習の基礎" --limit 5
Get specific slide content
获取指定幻灯片内容
npx marp-lens get "presentation.md #3"
npx marp-lens get "presentation.md #3"
View database stats
查看数据库统计信息
npx marp-lens stats
npx marp-lens stats
Index new/changed files
索引新增/修改的文件
npx marp-lens index -d ./slides
npx marp-lens index -d ./slides
Index with image descriptions
索引时包含图片描述
npx marp-lens index -d ./slides --with-images
undefinednpx marp-lens index -d ./slides --with-images
undefinedCommands
命令
Search
搜索
bash
npx marp-lens search "<query>" [options]| Option | Description |
|---|---|
| Max results (default: 10) |
| Min similarity (default: 0) |
| Output: |
bash
npx marp-lens search "<query>" [options]| 选项 | 描述 |
|---|---|
| 最大结果数(默认值:10) |
| 最小相似度(默认值:0) |
| 输出格式: |
Get Slide
获取幻灯片
bash
npx marp-lens get "<file> #<number>"Retrieves full content of a specific slide. Supports partial path matching.
bash
npx marp-lens get "<file> #<number>"检索指定幻灯片的完整内容。支持部分路径匹配。
Index
索引
bash
npx marp-lens index [options]| Option | Description |
|---|---|
| Directory to index |
| Single file to index |
| Clear and rebuild index |
| Include image descriptions |
bash
npx marp-lens index [options]| 选项 | 描述 |
|---|---|
| 要索引的目录 |
| 要索引的单个文件 |
| 清空并重建索引 |
| 包含图片描述 |
Stats
统计信息
bash
npx marp-lens statsShows file count, slide count, embedding count, and database size.
bash
npx marp-lens stats显示文件数量、幻灯片数量、嵌入向量数量和数据库大小。
Workflow
工作流程
- Find relevant slides:
npx marp-lens search "topic" - Get full content: for slides of interest
npx marp-lens get "file.md #N" - Re-index if needed: after adding files
npx marp-lens index -d ./slides
- 查找相关幻灯片:
npx marp-lens search "topic" - 获取完整内容:对感兴趣的幻灯片使用
npx marp-lens get "file.md #N" - 必要时重新索引:添加文件后执行
npx marp-lens index -d ./slides
Output Format
输出格式
Search results show similarity score, file path, slide number, heading, and content preview. Use for structured output.
--format json搜索结果会显示相似度得分、文件路径、幻灯片编号、标题和内容预览。使用 可获取结构化输出。
--format json