PaperQuire Docs Download

CLI Reference

Overview

The PaperQuire CLI lets you render Markdown to PDF, DOCX, and HTML from the terminal. It supports all the same templates, document options, and branding that the desktop app provides — ideal for automation, CI pipelines, and scripting.

When you install PaperQuire via Homebrew, the paperquire command is added to your PATH automatically. For manual installs, the binary is located inside the app bundle at PaperQuire.app/Contents/Resources/bin/paperquire.

Verify your installation:

paperquire version

Quick Start

# Simplest render — produces report.pdf in the same directory
paperquire report.md

# Specify output path and template
paperquire report.md -o dist/report.pdf -t minimal-clean

# Pipe from stdin, write to stdout
cat notes.md | paperquire - --stdout > out.pdf

# Batch render an entire directory
paperquire batch ./docs -o ./out

Render Command

The default command. Pass one or more Markdown files to render them to PDF.

paperquire [options] <file.md>

If no -o flag is given, the output file is placed next to the input with a .pdf extension (e.g. report.md becomes report.pdf). Use - as the filename to read from stdin.

Flags

FlagDescriptionDefault
-o, --output <path>Output file pathInput filename with .pdf
-f, --format <fmt>Output format: pdf, docx Pro, html Propdf
-t, --template <id>Template ID or path to .pqt fileDefault template
--title <text>Cover page titleAuto-detected from first #
--subtitle <text>Cover page subtitleAuto-detected from first ##
--author <name>Cover page author
--date <text>Cover page dateToday's date
--company <name>Cover page company name
--logo <path>Path to cover page logo imageTemplate default
--cover / --no-coverEnable or disable the cover page--cover
--toc / --no-tocEnable or disable the table of contents--toc
--h1-page-breakStart each H1 heading on a new pageOff
--page-size <size>Paper size: letter, a4letter
--margins <t,r,b,l>Page margins in inches (e.g. 1,1,1,1)1,1,1,1
--primary-color <hex>Brand primary colorTemplate default
--watermark <text>Watermark text overlaid on each page
--compliance <mode>Accessible/archival compliance: pdf-a, pdf-ua Enterprise
--allow-htmlAllow raw HTML in Markdown inputOff
--stdoutWrite output to stdout instead of a fileOff
--dry-runValidate inputs without renderingOff
-q, --quietSuppress all output except errorsOff
-v, --verboseShow detailed progress outputOff
--license-file <path>Path to license fileAuto-detected
--cloudUse PaperQuire Cloud rendering EnterpriseOff
--api-key <key>API key for cloud renderingPAPERQUIRE_API_KEY env
Tip: Use --dry-run to validate your Markdown and options before producing a PDF. This is especially helpful in CI pipelines.

Examples

# Render with cover page metadata
paperquire report.md --title "Q2 Report" --author "Jane Doe" --date "June 2026"

# A4 paper with custom margins and no TOC
paperquire spec.md --page-size a4 --margins 0.75,0.75,0.75,0.75 --no-toc

# Export to DOCX (Pro)
paperquire report.md -f docx -o report.docx

# Watermark a draft
paperquire draft.md --watermark "DRAFT" -o draft.pdf

Batch Command Pro

Pro feature — Batch rendering requires a Pro or Enterprise license. Compare plans

Render multiple Markdown files in one invocation. All render flags are also supported.

paperquire batch <directory> [options]

Batch-Specific Flags

FlagDescriptionDefault
-o, --out-dir <path>Output directory for rendered filesSame directory as each input
--glob <pattern>Glob pattern to match files (e.g. "**/*.md")"*.md"
--concurrency <n>Number of files to render in parallel4
--continue-on-errorKeep rendering remaining files if one failsOff
--dry-runList matched files without renderingOff

Examples

# Render all .md files in docs/ to an output directory
paperquire batch ./docs -o ./out

# Recursive glob with a specific template
paperquire batch ./project --glob "**/*.md" -t corporate

# Preview which files would be rendered
paperquire batch ./docs --dry-run

# Render 8 files in parallel, skip failures
paperquire batch ./docs --concurrency 8 --continue-on-error

Templates

Manage built-in and custom templates from the command line.

paperquire templates <action> [args]

List Templates

Show all available templates (built-in and user-installed):

paperquire templates list

Show Template Details

Display full metadata for a specific template:

paperquire templates show minimal-clean

Create a Custom Template

Scaffold a new template in your user templates directory:

paperquire templates init my-template

This creates a directory with a template.yml manifest, a CSS file, and a sample cover page layout. Edit these files to customize your template.

Export a Template

Export a template as a portable .pqt file (a ZIP archive containing the template manifest, styles, and assets):

paperquire templates export minimal-clean -o ./minimal-clean.pqt

Import a Template

Install a .pqt template file:

paperquire templates import ./my-template.pqt

Configuration

The CLI reads settings from YAML configuration files. Settings are resolved in this order (later sources override earlier ones):

  1. Global config~/.paperquire/config.yml
  2. Project config.paperquire.yml (searched upward from the input file's directory)
  3. CLI flags — always win

Configuration File Schema

# .paperquire.yml
template: corporate
format: pdf
page-size: letter
margins: [1, 1, 1, 1]

cover:
  title: "Project Documentation"
  author: "Engineering Team"
  company: "Acme Corp"
  logo: ./assets/logo.png

toc: true
h1-page-break: true

branding:
  primary-color: "#2563eb"

output:
  dir: ./dist
  quiet: false

Config Commands

Initialize a .paperquire.yml in the current directory with sensible defaults:

paperquire config init

Show the resolved configuration (merged from all sources):

paperquire config show

License Management

Check your license status:

paperquire license status

Activate a license from the command line:

paperquire license activate YOUR-LICENSE-KEY

You can also set the PAPERQUIRE_LICENSE environment variable instead of activating interactively:

export PAPERQUIRE_LICENSE="YOUR-LICENSE-KEY"
Tip: The free tier allows 3 renders per day. Upgrade to Pro for unlimited renders, batch export, and additional output formats.

Tier Requirements

CapabilityFreeProEnterprise
Render to PDFYes (3/day)UnlimitedUnlimited
Batch rendering--YesYes
HTML & DOCX export--YesYes
Accessible/archival compliance----Yes
Cloud rendering----Yes

Exit Codes

CodeMeaning
0Success
1Error (invalid input, render failure, license issue)