# NPM Package (https://allmd.blode.md/api) Programmatic API for Node.js with full TypeScript support. ## Basic Usage ```typescript import { convertWeb, convertPdf, convertYoutube } from "allmd"; const result = await convertWeb("`example.com`"); console.log(result.markdown); ``` ## Available Converters | Function | Input | |----------|-------| | `convertWeb` | URL | | `convertYoutube` | YouTube URL | | `convertPdf` | PDF file path | | `convertGdoc` | Google Docs URL | | `convertVideo` | Video/audio file path | | `convertImage` | Image file path | | `convertDocx` | Word document path | | `convertEpub` | EPUB file path | | `convertCsv` | CSV/TSV file path | | `convertPptx` | PowerPoint file path | | `convertTweet` | Tweet URL | | `convertRss` | RSS/Atom feed URL | ## ConversionResult Every converter returns a `ConversionResult`: ```typescript interface ConversionResult { markdown: string; title?: string; metadata?: Record; } ``` ## Options Pass options as the second argument: ```typescript const result = await convertVideo("meeting.mp4", { frontmatter: true, verbose: false, diarize: true, speakers: ["Alice", "Bob"], }); ``` # CLI (https://allmd.blode.md/cli) Install allmd, learn the command patterns, and explore converters. `allmd` converts URLs and files into markdown from one CLI. ## Install ```bash npm install -g allmd ``` Requires Node.js 20+. ## Start Here - [Installation](https://allmd.blode.md/docs/cli/installation) - [Usage](https://allmd.blode.md/docs/cli/usage) ## Converters - [Web](https://allmd.blode.md/docs/cli/converters/web) - [YouTube](https://allmd.blode.md/docs/cli/converters/youtube) - [PDF](https://allmd.blode.md/docs/cli/converters/pdf) - [Google Docs](https://allmd.blode.md/docs/cli/converters/gdoc) - [Video and Audio](https://allmd.blode.md/docs/cli/converters/video) - [Image](https://allmd.blode.md/docs/cli/converters/image) - [Word](https://allmd.blode.md/docs/cli/converters/docx) - [EPUB](https://allmd.blode.md/docs/cli/converters/epub) - [CSV](https://allmd.blode.md/docs/cli/converters/csv) - [PowerPoint](https://allmd.blode.md/docs/cli/converters/pptx) - [Tweet](https://allmd.blode.md/docs/cli/converters/tweet) - [RSS](https://allmd.blode.md/docs/cli/converters/rss) # CSV (https://allmd.blode.md/cli/converters/csv) Convert CSV and TSV files to markdown tables. ## Usage ```bash allmd csv -o output.md ``` ## Supported Formats - `.csv` - `.tsv` ## Example ```bash # Convert a CSV to a markdown table allmd csv data.csv -o table.md # Convert a TSV file allmd csv spreadsheet.tsv -o spreadsheet.md ``` # Word Documents (https://allmd.blode.md/cli/converters/docx) Convert Microsoft Word documents to markdown. ## Usage ```bash allmd docx -o output.md ``` ## Supported Formats - `.docx` ## Example ```bash # Convert a Word document to markdown allmd docx report.docx -o report.md # Output to stdout allmd docx letter.docx --stdout ``` # EPUB (https://allmd.blode.md/cli/converters/epub) Convert EPUB ebooks to markdown. ## Usage ```bash allmd epub -o output.md ``` ## Supported Formats - `.epub` ## Example ```bash # Convert an ebook to markdown allmd epub book.epub -o book.md # Output to stdout allmd epub novel.epub --stdout ``` # Google Docs (https://allmd.blode.md/cli/converters/gdoc) Convert published Google Docs to markdown. ## Usage ```bash allmd gdoc -o output.md ``` ## Supported Formats - `docs.google.com` URLs The document must be published to the web or shared with link access. ## Example ```bash # Convert a Google Doc to markdown allmd gdoc https://docs.google.com/document/d/1a2b3c/edit -o doc.md # Output to stdout allmd gdoc https://docs.google.com/document/d/1a2b3c/edit --stdout ``` # Image (https://allmd.blode.md/cli/converters/image) Generate markdown descriptions of images using GPT vision. ## Usage ```bash allmd image -o output.md ``` ## Supported Formats - `.jpg`, `.jpeg` - `.png` - `.gif` - `.webp` ## Requirements Requires `OPENAI_API_KEY` for GPT vision image description. ## Example ```bash # Describe an image as markdown allmd image photo.jpg -o description.md # Output to stdout allmd image diagram.png --stdout ``` # PDF (https://allmd.blode.md/cli/converters/pdf) Parse PDF files and convert their text content to markdown. ## Usage ```bash allmd pdf -o output.md ``` ## Supported Formats - `.pdf` files ## Example ```bash # Convert a PDF to markdown allmd pdf document.pdf -o document.md # Output to stdout allmd pdf report.pdf --stdout ``` # PowerPoint (https://allmd.blode.md/cli/converters/pptx) Convert PowerPoint presentations to markdown. ## Usage ```bash allmd pptx -o output.md ``` ## Supported Formats - `.pptx` ## Example ```bash # Convert a presentation to markdown allmd pptx slides.pptx -o slides.md # Output to stdout allmd pptx deck.pptx --stdout ``` # RSS (https://allmd.blode.md/cli/converters/rss) Convert RSS and Atom feeds to markdown. ## Usage ```bash allmd rss -o output.md ``` ## Supported Formats - RSS feed URLs - Atom feed URLs ## Example ```bash # Convert an RSS feed to markdown allmd rss `example.com/feed.xml` -o feed.md # Convert an Atom feed allmd rss `example.com/atom.xml` -o feed.md ``` # Tweet (https://allmd.blode.md/cli/converters/tweet) Convert tweets and X posts to markdown. ## Usage ```bash allmd tweet -o output.md ``` ## Supported Formats - `x.com` URLs - `twitter.com` URLs ## Example ```bash # Convert a tweet to markdown allmd tweet https://x.com/user/status/123456789 -o tweet.md # Twitter URLs also work allmd tweet https://twitter.com/user/status/123456789 -o tweet.md ``` # Video & Audio (https://allmd.blode.md/cli/converters/video) Transcribe video and audio files with OpenAI transcription models and optional speaker diarization. ## Usage ```bash allmd video -o output.md ``` ## Supported Formats **Video:** `.mp4`, `.mkv`, `.avi`, `.mov`, `.webm`, `.flv`, `.wmv`, `.m4v` **Audio:** `.mp3`, `.wav`, `.m4a`, `.ogg`, `.flac`, `.aac`, `.wma` ## Requirements Requires `OPENAI_API_KEY`. allmd uses the bundled `ffmpeg-static` binary for extraction and transcoding. ## Options | Flag | Description | | --- | --- | | `--no-diarize` | Disable speaker diarization | | `--speakers "Alice,Bob"` | Name the speakers in order | | `--speaker-references ref.wav` | Provide reference audio for speaker identification | ## Example ```bash # Transcribe a video with speaker labels allmd video interview.mp4 -o interview.md # Transcribe audio without diarization allmd video podcast.mp3 --no-diarize -o podcast.md # Transcribe with named speakers allmd video meeting.mp4 --speakers "Alice,Bob,Charlie" -o meeting.md ``` # Web (https://allmd.blode.md/cli/converters/web) Convert any web page to markdown using Firecrawl. ## Usage ```bash allmd web -o output.md ``` ## Supported Formats - Any public web page URL ## Requirements Requires `FIRECRAWL_API_KEY` in your environment or `.env` file. No OpenAI key needed -- Firecrawl handles the markdown extraction directly. ## Example ```bash # Convert a blog post to markdown allmd web `example.com/blog/post` -o post.md # Output to stdout allmd web `example.com/about` --stdout ``` # YouTube (https://allmd.blode.md/cli/converters/youtube) Extract transcripts from YouTube videos with timestamps. ## Usage ```bash allmd youtube -o output.md ``` ## Supported Formats - `youtube.com` URLs (e.g. `https://www.youtube.com/watch?v=...`) - `youtu.be` short URLs (e.g. `https://youtu.be/...`) ## Example ```bash # Extract a transcript with timestamps allmd youtube https://www.youtube.com/watch?v=dQw4w9WgXcQ -o transcript.md # Output to stdout allmd youtube https://youtu.be/dQw4w9WgXcQ --stdout ``` # Installation (https://allmd.blode.md/cli/installation) Install allmd and configure API keys. ## Install ```bash npm install -g allmd ``` Requires Node.js 20+. ## API Keys Set the API keys for the converters you use: ```bash export OPENAI_API_KEY=your-key export FIRECRAWL_API_KEY=your-key ``` - `OPENAI_API_KEY` is required for AI-backed converters (all except web pages). - `FIRECRAWL_API_KEY` is required for web page conversion. - Web pages use Firecrawl markdown directly and do not require `OPENAI_API_KEY`. ## FFmpeg Video and audio conversion requires `ffmpeg`. It is bundled via `ffmpeg-static` and should work out of the box. ## Skills Add allmd as a skill for Claude Code, Cursor, or other AI coding assistants: ```bash npx skills add mblode/allmd ``` # Usage (https://allmd.blode.md/cli/usage) CLI commands, options, and examples. ## Auto-detection Pass any URL or file. allmd figures out the type automatically: ```bash allmd `example.com` allmd document.pdf allmd recording.mp4 ``` ## Explicit Commands Specify the converter directly: ```bash allmd web `example.com` -o article.md allmd youtube https://youtu.be/dQw4w9WgXcQ -o transcript.md allmd pdf document.pdf -o document.md allmd gdoc https://docs.google.com/document/d/... -o doc.md allmd video recording.mp4 -o transcript.md allmd image screenshot.png -o description.md allmd docx report.docx -o report.md allmd epub book.epub -o book.md allmd csv data.csv -o data.md allmd pptx slides.pptx -o slides.md allmd tweet https://x.com/user/status/123 -o tweet.md allmd rss `blog.example.com/feed` -o feed.md ``` ## Interactive Mode Run `allmd` with no arguments to pick a converter interactively. ## Options | Flag | Description | |------|-------------| | `-o, --output ` | Write output to a specific file | | `-d, --output-dir ` | Output directory for converted files | | `-v, --verbose` | Enable verbose output | | `-c, --clipboard` | Read input from clipboard | | `--copy` | Copy output to clipboard | | `--stdout` | Print output to stdout instead of writing a file | | `--parallel ` | Number of parallel conversions (default: 3) | | `--no-frontmatter` | Skip YAML frontmatter in output | | `--no-diarize` | Disable speaker diarization (video/audio) | | `--speakers ` | Speaker names, comma-separated | | `-V, --version` | Show version | | `-h, --help` | Show help | ## Batch Conversion Convert multiple files at once: ```bash allmd pdf '*.pdf' -d output/ ``` ## Pipe to Other Tools ```bash allmd pdf report.pdf --stdout | pbcopy ``` # Introduction (https://allmd.blode.md/) Turn the whole universe into markdown. allmd is a CLI tool that converts virtually any content type into clean, AI-formatted markdown. ## Supported Formats allmd ships with 12 built-in converters: - **Web pages** — fetch any URL and convert to clean markdown via Firecrawl - **YouTube videos** — extract transcripts with timestamps - **PDFs** — parse text content from PDF files - **Google Docs** — convert published Google Docs - **Video/Audio** — transcribe media files with speaker diarization - **Images** — describe images using GPT vision - **Word documents** — convert `.docx` files - **EPUB ebooks** — convert `.epub` files - **CSV/TSV** — convert tabular data to markdown tables - **PowerPoint** — convert `.pptx` presentations - **Tweets** — capture tweets/X posts - **RSS/Atom feeds** — convert feed entries ## Key Features - **Auto-detection** — pass any URL or file, allmd figures out the type - **AI formatting** — output polished with GPT for consistent, readable markdown - **Interactive mode** — run with no arguments to pick a converter - **Multiple outputs** — file, directory, clipboard, or stdout - **Parallel processing** — convert multiple files simultaneously - **YAML frontmatter** — metadata with title, source, date, and format-specific fields - **Agent skill** — works with Claude Code, Cursor, and other AI coding assistants # Skills (https://allmd.blode.md/skills) Give your AI coding agent the ability to convert anything to markdown. ## What are skills? Skills are reusable capabilities for AI agents. They provide procedural knowledge that helps agents accomplish specific tasks more effectively. Think of them as plugins or extensions that enhance what your AI agent can do. The allmd skill gives your agent the ability to convert web pages, YouTube videos, PDFs, images, and 9 more formats into clean markdown — without you having to remember the right command. ## Install To add allmd as a skill for Claude Code, Cursor, or other AI coding assistants: ```bash npx skills add mblode/allmd ``` This installs the skill definition so your agent knows how to use allmd automatically. ## How the skill works When your agent receives a conversion request, the skill dispatches to the appropriate converter based on the input type: | Input | Command | Description | |-------|---------|-------------| | Any URL or file | `allmd ` | Auto-detects the format | | Web URL | `allmd web ` | Converts a web page | | Google Docs URL | `allmd gdoc ` | Converts a Google Doc | | YouTube URL | `allmd youtube ` | Extracts transcript and metadata | | Twitter/X URL | `allmd tweet ` | Converts a tweet | | RSS/Atom feed | `allmd rss ` | Converts a feed | | PDF file | `allmd pdf ` | Extracts text from a PDF | | Image file | `allmd image ` | Describes an image | | Video/audio file | `allmd video ` | Transcribes media | | Word document | `allmd docx ` | Converts a .docx file | | EPUB ebook | `allmd epub ` | Converts an ebook | | CSV/TSV file | `allmd csv ` | Converts tabular data | | PowerPoint | `allmd pptx ` | Converts a presentation | ## Conversion workflow Most converters follow this pattern: 1. **Validate** input (URL format or file existence) 2. **Extract** content (fetch HTML, parse PDF, transcribe audio, etc.) 3. **AI format** — restructures into clean markdown via OpenAI 4. **Add frontmatter** — YAML header with title, source, date, and type-specific fields 5. **Output** — write to file, directory, clipboard, or stdout Web page conversion differs: `allmd web` uses Firecrawl markdown directly and skips the AI formatting step. ## Examples Ask your agent things like: - "Convert this PDF to markdown" (with a file path) - "Get the transcript from this YouTube video" - "Save this web article as markdown" - "Extract the text from this image" - "Convert this Google Doc to markdown" The agent will use allmd to handle the conversion automatically.