npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

docforge-cli

v1.1.0

Published

🔥 Forge beautiful PDFs from Markdown and HTML - perfect for LLM-generated documents, presentations, and reports

Downloads

7

Readme

🔥 DocForge

Forge beautiful PDFs from Markdown and HTML — perfect for LLM-generated documents, presentations, and reports.

npm version License: MIT

Features

  • 📝 Convert Markdown to PDF with syntax highlighting
  • 🌐 Convert HTML to PDF with full CSS support
  • 🎨 9 built-in styles: minimal, professional, presentation, invoice, dark, academic, report, resume, and mmd-brand
  • 📚 Merge multiple files into a single PDF with optional table of contents
  • ⚙️ Configurable via CLI options or config file
  • 🔄 Watch mode for live regeneration
  • 📦 Batch conversion support

Installation

npm install -g docforge-cli

Quick Start

# Convert a markdown file to PDF
docforge md document.md

# Convert with a specific style
docforge md report.md --style professional

# Convert HTML to PDF
docforge html page.html -o output.pdf

# Merge multiple files into one PDF
docforge merge chapter1.md chapter2.md chapter3.md -o book.pdf

# Merge with table of contents
docforge merge *.md -o combined.pdf --toc

Commands

docforge md <input> / docforge markdown <input>

Convert Markdown file(s) to PDF.

docforge md README.md                      # Basic conversion
docforge md doc.md -o output.pdf           # Specify output
docforge md doc.md --style dark            # Use dark theme
docforge md doc.md --format Letter         # US Letter size
docforge md doc.md --landscape             # Landscape orientation
docforge md doc.md --toc                   # Include table of contents
docforge md doc.md -w                      # Watch for changes

docforge html <input>

Convert HTML file(s) to PDF.

docforge html page.html                    # Basic conversion
docforge html page.html --style minimal    # Inject a style
docforge html page.html --wait 2000        # Wait for JS rendering
docforge html page.html --selector ".ready" # Wait for element

docforge merge <files...>

Merge multiple markdown files into a single PDF.

docforge merge ch1.md ch2.md ch3.md -o book.pdf
docforge merge *.md -o combined.pdf --toc  # With table of contents
docforge merge docs/*.md --sort            # Sort alphabetically
docforge merge *.md --style academic       # Use academic style

docforge styles

List all available built-in styles.

docforge init

Create a docforge.config.js configuration file.

docforge batch <pattern>

Convert multiple files matching a pattern.

docforge batch "*.md" -o ./pdfs
docforge batch "docs/*.html" -t html

Built-in Styles

| Style | Description | |-------|-------------| | minimal | Clean, simple styling with good typography | | professional | Business-ready documents with subtle accents | | presentation | Slide-like layout for presentations and decks | | dark | Dark mode theme for screen-friendly PDFs | | academic | Academic paper style (Times New Roman, double-spaced) | | report | Corporate report style with cover page support | | resume | Clean CV/resume layout | | invoice | Clean invoice and billing document style | | mmd-brand | Make More Digital branded documents |

Configuration

Create a docforge.config.js file in your project root:

module.exports = {
  style: 'professional',
  format: 'A4',
  landscape: false,
  markdown: {
    toc: false,
    headerFooter: true,
  },
  html: {
    wait: 0,
    selector: null,
  },
  customCss: '',
};

Programmatic Usage

const { convertMarkdown, convertHtml, mergeMarkdownFiles } = require('docforge-cli');

// Convert markdown
await convertMarkdown('input.md', { style: 'professional', output: 'output.pdf' });

// Convert HTML
await convertHtml('page.html', { format: 'Letter' });

// Merge files
await mergeMarkdownFiles(['ch1.md', 'ch2.md'], { toc: true, output: 'book.pdf' });

Requirements

  • Node.js >= 18.0.0
  • Chromium (automatically installed with Puppeteer)

License

MIT © Make More Digital

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.