carrel
Enables local file search, packing into LLM-ready context, and inspection via an MCP server on stdio.
README
<div align="center">
<img src="assets/banner.svg" alt="carrel — a library desk for your files, and your agents" width="100%">
<br><br>
<img src="https://img.shields.io/badge/python-3.12%2B-6E9EBF?labelColor=211A11" alt="Python 3.12+"> <img src="https://img.shields.io/badge/license-MIT-B07C24?labelColor=211A11" alt="License: MIT"> <a href="https://github.com/FirstCastSolutions423/carrel/actions"><img src="https://img.shields.io/github/actions/workflow/status/FirstCastSolutions423/carrel/test.yml?branch=main&label=tests&labelColor=211A11" alt="tests"></a> <a href="https://github.com/FirstCastSolutions423/carrel/releases"><img src="https://img.shields.io/github/v/release/FirstCastSolutions423/carrel?labelColor=211A11&color=F2A93C" alt="release"></a>
<br><br>
<img src="assets/demo/desk-tour.gif" alt="carrel desk TUI tour" width="100%">
carrel desk — browse the tree, inspect a file, run an action, search the index.
<img src="assets/demo/pack.gif" alt="carrel pack token stats" width="100%">
carrel pack src --stats — the token table, before you spend a context window on it.
<img src="assets/demo/redact-proof.gif" alt="carrel redact proof" width="100%">
carrel redact — true raster redaction of a PDF, and the proof: grep exits 1.
</div>
A carrel is a private study desk in a library: your materials close at hand, organized your way. carrel is that desk for your local files — pdf, md, images, html, json, xml, csv — with 24 commands to convert, OCR, inspect, diff, index, search, pack, watch, and more. And it treats AI agents as first-class users of the desk: every data-producing command speaks --json with stable exit codes, carrel pack turns file trees into LLM-ready context, and the repo doubles as a Claude Code plugin marketplace whose plugins drive the same CLI.
What can it do
| Domain | Command | What it does |
|---|---|---|
| Convert & transform | carrel convert |
Any-to-any conversion across pdf, md, html, txt, png/jpg/ico, json, xml, csv |
carrel ocr |
Images and scanned PDFs → text, markdown, or a searchable PDF | |
carrel edit |
PDF merge/split/rotate/extract-pages, image resize/rotate/crop, text find-replace, json set/del | |
carrel extract-images |
Pull embedded images out of pdf, ico, and html | |
carrel audiobook |
Narrate txt/md/pdf into mp3/ogg, chapters from markdown headings | |
| Inspect & prove | carrel inspect |
Metadata + per-type structure summary: sha256, pages, EXIF, json shape, csv dialect… |
carrel diff |
Unified text diffs, structural json/csv diffs, pdf text diffs, image pixel diffs | |
carrel thumb |
Thumbnails for pdfs, images, and html | |
carrel proof |
Soft-proof against an ICC profile, with a ΔE summary | |
carrel color |
Dominant palette extraction, ICC conversion, contrast checks | |
| The desk index | carrel index |
SQLite FTS5 index of everything under a root (.carrel/carrel.db, portable) |
carrel search |
bm25-ranked full-text search with type and tag filters | |
carrel tag |
Tag files; find by tag | |
carrel note |
Sidecar notes on any file; real text annotations on PDFs | |
| Agents & context | carrel pack |
Bundle files/trees into one LLM-ready document — md/xml/json, include/exclude globs, .gitignore-aware, chunking, token estimates |
carrel mcp |
Serve search/pack/inspect as an MCP server on stdio | |
| Housekeeping | carrel organize |
Sort a folder by type/date/EXIF date — dry-run by default |
carrel dedupe |
Exact (BLAKE2) and near (perceptual hash) duplicate detection | |
carrel watch |
Watch a folder and run shell actions on file events | |
carrel redact |
Pattern/PII redaction for text formats; true raster redaction for PDFs | |
carrel sign |
Visible PDF stamps, sha256 manifests, gpg-backed verify | |
carrel form |
Build html/pdf forms from JSON specs; list and fill AcroForm PDFs | |
| The desk itself | carrel desk |
The flagship TUI — see below |
carrel doctor |
What your environment enables today, with install hints for the rest |
carrel wraps the masters — pandoc, poppler, qpdf, tesseract/ocrmypdf, ImageMagick, exiftool, ffmpeg… — behind one adapter layer with capability detection. Missing binary? Commands degrade with an install hint (exit 3), never a crash.
Quickstart
Requires Python ≥ 3.12 and uv. No checkout needed:
uv tool install git+https://github.com/FirstCastSolutions423/carrel # puts `carrel` on your PATH
carrel doctor # what can your desk do today? (+ apt hints for the rest)
(Contributing or hacking on it? uv tool install . from a checkout does the same thing.)
A first taste:
carrel inspect paper.pdf # pages, sha256, producer, form fields…
carrel index . && carrel search "marginal notes" # FTS5 over your whole desk
carrel pack src/ --format xml -o context.xml --stats # LLM-ready context + token table
Add --json to any of these and you get machine-readable output on stable exit codes — that's the whole agent contract.
The marketplace
This repo is also a Claude Code plugin marketplace: five plugins whose slash commands, agents, skills, and hooks all delegate to the CLI above.
claude plugin marketplace add FirstCastSolutions423/carrel
claude plugin install carrel-inspect@carrel
| Plugin | Gives Claude |
|---|---|
carrel-inspect |
/inspect, /diff, /search, /pack + a context-packing skill |
carrel-convert |
/convert, /ocr, /thumb, /audiobook + a batch doc-converter agent |
carrel-organize |
/organize, /dedupe, /tag, /note-file |
carrel-watch |
/watch-folder + a watch-automation recipe skill |
carrel-agent |
A file-librarian agent, the carrel MCP server, and a hook that re-indexes files Claude writes |
Install the CLI first (see Quickstart) so the plugins can call it. Works headless too:
claude -p "/carrel-inspect:inspect text+image.pdf" --allowedTools "Bash(carrel:*)"
The full validated flow (with real output) is in docs/TEST_REPORT.md.
The desk TUI
carrel desk
<div align="center"><img src="assets/logo.svg" alt="carrel mark" width="96"></div>
The flagship: a three-pane Textual desk. A file tree on the left, an inspector in the middle (metadata, preview, tags, notes), an action palette on the right (convert, ocr, pack, thumbnail…) — all driving the same core library as the CLI, with full-text search along the bottom. Theme: warm lamplight on dark wood, per docs/BRAND.md.
Learn more
- The docs site — everything below, browsable
- docs/HOW_THIS_WAS_BUILT.md — the autonomous single-day build, from the primary sources
- docs/VISION.md — why a library desk, and the product principles
- docs/ARCHITECTURE.md — the adapter layer, the index, the plugin design
- docs/FEATURES.md — the capability × strategy matrix
- docs/TEST_REPORT.md — everything above, executed for real (501 tests, 7 cookbook runs)
- examples/cookbook/ — nine end-to-end recipes, from scan→searchable-notes to markdown→audiobook
- docs/BRAND.md — palette, typography, logo usage, voice
License
MIT © Colton Bearden
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。