AgentSkillsCN

Document Converter CLI

支持多种文档格式之间的相互转换:Markdown 转 PDF、HTML、DOCX;还可利用模板批量完成转换操作。这是一款免费的文档处理工具。

SKILL.md
--- frontmatter
name: Document Converter CLI
description: Convert documents between formats. Markdown to PDF, HTML, DOCX. Batch conversion with templates. Free document processing tool.
tags: [document, convert, markdown, pdf, html, docx, cli, pandoc]

Document Converter CLI

Convert documents between any format.

Markdown → PDF, HTML, DOCX. And back.

Quick Start

bash
npm install -g @lxgicstudios/docvert
bash
# Markdown to PDF
docvert README.md -f pdf

# HTML to Markdown
docvert page.html -f md

# Batch convert
docvert ./docs/*.md -f pdf -o ./pdfs

Supported Conversions

From Markdown

  • PDF (styled)
  • HTML (with CSS)
  • DOCX (Word)
  • EPUB (ebook)
  • LaTeX

From HTML

  • Markdown
  • Plain text
  • PDF

From DOCX

  • Markdown
  • HTML
  • Plain text

Commands

bash
# With custom template
docvert doc.md -f pdf --template report

# With CSS styling
docvert doc.md -f html --css style.css

# Table of contents
docvert doc.md -f pdf --toc

# Code syntax highlighting
docvert doc.md -f html --highlight

# Merge multiple files
docvert ch1.md ch2.md ch3.md -f pdf -o book.pdf

# Watch mode (auto-convert on change)
docvert doc.md -f pdf --watch

Templates

Built-in templates:

  • default - Clean, readable
  • report - Business report style
  • resume - CV formatting
  • slides - Presentation layout

When to Use This

  • Documentation generation
  • Report creation
  • Blog post conversion
  • Ebook creation
  • Resume/CV generation

Built by LXGIC Studios

🔗 GitHub · Twitter