agentleFS
ojspaceojspace/md-anything/CLAUDE.md

md-anything

CLAUDE.md49 starsChanged 2 months agoMITView on GitHub

Local runbook for md-anything. Both forms are intentionally supported: If you run bun run src/cli.ts convert with no input: The CLI is expected to steer users toward the right command: Coverage lives in tests/integration/cli-ux.test.ts. Current ingest behavior is simple: It does not currently support source manifests, --graph, or --index. src/mcp.ts + src/mcp-support.ts enforce stricter rules than the CLI: Note: test:all is not defined in package.json. doctor is the source of truth for optional capability reporting. Also supported: Verify current machine…

  • Reads credentials
  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No shipped HTTP API surface

    line 9
  2. Very specific:

    If you run bun run src/cli.ts convert with no input:

    line 63
  3. Very specific:

    only http / https URLs are allowed

    line 94
  4. Distinctive:

    Verify current machine state with:

    line 152
  5. Very specific:

    If output says Unsupported input type: unknown and Input: convert, you likely passed convert as the input.

    line 166
  6. Very specific:

    If EPUB extraction is weak, check unzip first.

    line 167
  7. Very specific:

    If media transcription is weak, run mda doctor and verify both transcription tooling and ffmpeg.

    line 168

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Local runbook for md-anything.

What is actually shipped right now

  • CLI: mda
  • MCP server: md-anything-mcp
  • No shipped HTTP API surface

Quick start

git pull origin main
bun install
bun run lint
bun run build
bun run test:required
bun run src/cli.ts doctor

Core commands

# Help and examples
mda --help
mda examples

# Convert one input
mda tests/fixtures/sample.txt
mda convert tests/fixtures/sample.txt
mda convert "https://example.com/article"

# JSON output for agents/scripts
mda convert tests/fixtures/sample.txt --json

# Batch conversion
mda ingest tests/fixtures
mda ingest tests/fixtures -o ./output
mda ingest tests/fixtures -r -o ./output

# Capability report
mda doctor

# MCP setup
mda mcp install claude
mda mcp install cursor
mda mcp install windsurf

# Direct MCP server
md-anything-mcp

Important behavior notes

CLI shape

Both forms are intentionally supported:

  • bun run src/cli.ts convert <input>
  • bun run src/cli.ts <input>

If you run bun run src/cli.ts convert with no input:

  • stderr includes Missing input for convert command.
  • exit code is 1

Guided CLI errors

The CLI is expected to steer users toward the right command:

  • directory input points to mda ingest <path>
  • unknown input suggests mda --help or mda examples
  • weak extraction suggests mda doctor

Coverage lives in tests/integration/cli-ux.test.ts.

Ingest reality

Current ingest behavior is simple:

  • walks a folder
  • converts supported files
  • returns converted, skipped, failed, and per-doc metadata
  • supports -r and -o

It does not currently support source manifests, --graph, or --index.

MCP safety model

src/mcp.ts + src/mcp-support.ts enforce stricter rules than the CLI:

  • local paths must stay inside the current workspace root
  • only http / https URLs are allowed
  • private and localhost URLs are blocked by default
  • set MDA_MCP_ALLOW_PRIVATE_URLS=1 only when intentionally overriding that policy

Validation commands

# Main suite
bun test

# Script alias
bun run test

# Contributor-safe subset
bun run test:required

# Regenerate binary fixtures
bun run test:fixtures

# Type-check / lint
bun run lint

# Build distributable entrypoints
bun run build

Note: test:all is not defined in package.json.

Useful smoke checks

bun run src/cli.ts --help
bun run src/cli.ts examples
bun run src/cli.ts doctor
bun run src/cli.ts convert tests/fixtures/sample.png
bun run src/cli.ts convert "https://www.youtube.com/watch?v=EqhKw0Oro_k"
bun run src/cli.ts convert "https://example.com/article"

Optional tools

doctor is the source of truth for optional capability reporting.

brew install poppler         # pdftotext for stronger PDF extraction
brew install tesseract       # OCR for images
brew install --cask calibre  # ebook-convert for MOBI/AZW
brew install ffmpeg          # media extraction
brew install whisper-cpp     # local transcription (preferred)
whisper-cpp --download-model base.en

Also supported:

  • unzip for EPUB extraction
  • whisper via pip install openai-whisper
  • OPENROUTER_API_KEY for opt-in remote image/audio/video fallbacks

Verify current machine state with:

command -v pdftotext
command -v tesseract
command -v ebook-convert
command -v unzip
command -v ffmpeg
command -v whisper-cpp
command -v whisper

Troubleshooting

  • If output says Unsupported input type: unknown and Input: convert, you likely passed convert as the input. Use convert <input> or just <input>.
  • If EPUB extraction is weak, check unzip first.
  • If media transcription is weak, run mda doctor and verify both transcription tooling and ffmpeg.
  • URL and YouTube results vary with network access and source-side restrictions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.