mcpField
M
mdzilla

mdzilla

github.com/pi0Development11036 installsUpdated 31w ago
Repository

About mdzilla

mdzilla is a Markdown documentation browser for terminal users and agents. It fetches and renders docs from local directories, GitHub, npm, HTTP, and `llms.txt`, with search, plain-text output, and Markdown export.

Key features

  1. 01Read docs from local, GitHub, npm, and HTTP sources
  2. 02Resolve and render documentation pages
  3. 03Search titles and content
  4. 04Output plain text
  5. 05Export documentation as Markdown files

Use cases

  1. 01Browse project documentation in a terminal
  2. 02Retrieve a specific page for an agent
  3. 03Search docs by topic or keyword
  4. 04Export docs for offline processing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pi0/mdzilla --skill mdzilla

After installing, type/mdzillain Claude Code to confirm it loaded.

Details

From the project README

mdzilla

Markdown documentation browser for terminal and agents. Fetches and renders docs from local dirs, GitHub, npm, HTTP, and llms.txt.

CLI

npx mdzilla <source> [query] [options]
Sources
SourceSyntaxNotes
Local dirmdzilla ./docsScan local docs directory
Filemdzilla README.mdRender single markdown file
GitHubmdzilla gh:owner/repoLooks for docs/ in repo
npmmdzilla npm:package-nameDownloads package, reads docs
HTTPmdzilla https://example.comTries /llms.txt, then markdown negotiation, then HTML→markdown
Options
  • --export <dir> — Export docs to flat .md files
  • --plain — Plain text output; auto-enabled for AI agents or non-TTY stdout
Smart Resolve

The second positional argument is smart-resolved:

  1. If it matches a navigation path → renders that page
  2. Otherwise → searches titles and content
Agent usage
npx mdzilla gh:unjs/h3 /guide/basics        # render a specific page
npx mdzilla gh:unjs/h3 router               # search for 'router'
npx mdzilla https://h3.unjs.io /guide       # render page from URL
npx mdzilla npm:consola --plain             # list all pages (plain)

Export docs for offline processing:

npx mdzilla <source> --export ./fetched-docs

Then read the exported .md files as needed.

Programmatic API

Export Docs
import { exportSource } from "mdzilla";

await exportSource("./docs", "./dist/docs");
await exportSource("gh:unjs/h3", "./dist/h3-docs");
await exportSource("npm:h3", "./dist/h3-docs", { plainText: true });
await exportSource("https://h3.unjs.io", "./dist/h3-docs");
Collection
import { Collection, resolveSource } from "mdzilla";

const docs = new Collection(resolveSource("./docs"));
await docs.load();

console.log(docs.tree); // NavEntry[] navigation tree
console.log(docs.flat); // FlatEntry[] flat list

const content = await docs.getContent(docs.flat[0]);
const results = docs.filter("query"); // fuzzy search

Comments

Markdown supported