Skip to content

eamanc-lab/claude-md-explorer

Repository files navigation

CLAUDE.md Explorer

CLAUDE.md Explorer

Explore every CLAUDE.md on your machine — and see exactly which rules Claude Code loads at any directory.

English · 简体中文

License: MIT Built with Tauri Astro Made for Claude Code

Download · Why · Quick Start · Configuration


Why

If you use Claude Code, CLAUDE.md files end up scattered everywhere — global rules in ~/.claude/, project rules in repo roots, sub-rules nested deep in subfolders. You can't see the full picture. Which rules does Claude actually load when it works in ~/code/foo/bar/?

Without this tool With CLAUDE.md Explorer
find ~ -name CLAUDE.md and cat one by one One UI, recursive scan
Mentally merge global + project + nested rules Chain Mode shows exactly what Claude Code loads at a path
Copy/paste files to compare Full-text search across the merged chain
Edit, switch to terminal to verify Native desktop app reads files live

Highlights

  • 🔗 Chain Mode — Walks ~/.claude/CLAUDE.md down to the deepest nested rule, in actual load order
  • 📂 Recursive scan — Point at any folder, finds every CLAUDE.md underneath
  • Live filesystem — Native app reads files on click, never a stale snapshot
  • 🔎 Full-text search⌘F highlights matches across the entire merged view
  • 🎨 Reading map — Each chain segment color-coded; source path lives in a side rail, not in the prose
  • In-app config — Add/remove scan paths, ignore by name or by full path, no JSON editing required
  • 🔁 Auto-dedup — Nested scan paths are automatically excluded from parents
  • 📦 2 MB single-binary — Tauri + Rust, no Electron, no bundle bloat

Quick Start

Desktop app (recommended)

# Grab the latest .dmg (Apple Silicon)
open https://github.com/eamanc-lab/claude-md-explorer/releases/latest

Or build from source:

git clone https://github.com/eamanc-lab/claude-md-explorer
cd claude-md-explorer
npm install
npm run tauri:dev      # hot-reload dev shell
npm run tauri:build    # produces .dmg in src-tauri/target/release/bundle/dmg/

First launch: click the ⚙︎ at the bottom-left, add at least one scan path (file or directory), and save. The default ships with ~/.claude/CLAUDE.md only — point it at your code root next.

Web (read-only static snapshot)

For sharing or hosting a public read-only view:

npm run dev            # http://localhost:4321
npm run build          # static site in dist/
npm run deploy         # → Cloudflare Pages

The web build runs tools/scan.ts to produce a snapshot at build time. Use it when you want a public bookmarkable view; use the desktop app for daily work.

Configuration

All configuration lives in one GUI panel — open with the ⚙︎ button.

Scan paths

A single list. Files and directories are auto-detected:

  • ~/.claude/CLAUDE.md → read as a single global rule file
  • ~/code → recursively scans every CLAUDE.md underneath
  • Optional label for tree grouping (defaults to directory basename)

Ignore

A single list with two flavors, auto-detected:

  • Name (node_modules, dist) → skip every directory with that name
  • Path (~/code/legacy, ~/Documents/pe/draft) → skip only that specific path

Auto-deduplication

Add both ~/code and ~/code/foo to scan paths and foo automatically disappears from the code tree. The independent root takes priority — no manual ignore needed.

Config file

~/.claude/claudemd-hub.config.json. Edit by hand or via the GUI — both work.

How it works

Tauri shell (Rust)              Astro frontend (TS)
├─ build_index(config) ───────► state.data (entries + tree + chains)
├─ read_claude_md(path) ──────► live content on click
├─ get_config / save_config ──► ~/.claude/claudemd-hub.config.json
└─ reveal_in_finder ──────────► macOS Finder integration
  • Desktop: Rust scans the filesystem at runtime, the Astro UI renders an SPA inside Tauri's WKWebView.
  • Web: tools/scan.ts produces a JSON snapshot at build time, the same UI renders it as static markup.
  • Chain logic: identical between desktop and web — chains[entryId] lists every CLAUDE.md from the most distant ancestor to the target, in load order.

Roadmap

  • Watcher mode — re-scan on filesystem change
  • Diff view between two CLAUDE.md files
  • Lint mode — flag conflicts in the chain (e.g. global forbids X, project requires X)
  • Export merged chain to clipboard for prompt paste-back
  • Cross-platform builds (Linux / Windows)

Contributing

PRs welcome. The codebase is intentionally small (~1500 lines of TS + Rust). Good entry points:

  • tools/scan.ts — indexing format (web build)
  • src-tauri/src/lib.rs — runtime scanner (desktop build)
  • src/lib/app.client.ts — UI state machine
git clone https://github.com/eamanc-lab/claude-md-explorer
npm install
npm run typecheck
cd src-tauri && cargo test

License

MIT. © 2026 eamanc.


Built with Tauri 2 and Astro 5.