quillmark-cli

Crates.ioquillmark-cli
lib.rsquillmark-cli
version0.1.3
created_at2025-10-08 05:06:23.426181+00
updated_at2025-10-08 19:07:21.734766+00
descriptionMinimal CLI for testing Quillmark packages locally
homepagehttps://github.com/nibsbin/quillmark
repositoryhttps://github.com/nibsbin/quillmark
max_upload_size
id1873487
size96,641
Nibs (nibsbin)

documentation

https://docs.rs/quillmark-cli

README

quillmark-cli

Minimal CLI for testing Quillmark packages locally.

Overview

quillmark-cli is a simple command-line tool for rendering Markdown files to PDF using Quillmark Typst quills. It's designed for local testing and development of quill templates.

Installation

cargo install quillmark-cli

Or install from source:

git clone https://github.com/nibsbin/quillmark
cd quillmark/quillmark-cli
cargo install --path .

Usage

The CLI requires both a markdown file and a quill path:

quillmark-cli <MARKDOWN_FILE> --quill-path <QUILL_DIR>

Command-Line Options

quillmark-cli [OPTIONS] --quill-path <QUILL_PATH> <MARKDOWN>

Arguments:
  <MARKDOWN>  Path to the markdown file to render

Options:
      --quill-path <QUILL_PATH>  Path to the quill directory
  -o, --output <OUTPUT>          Output PDF file path [default: output.pdf]
  -h, --help                     Print help
  • <MARKDOWN> - Path to the markdown file to render (required)
  • --quill-path <QUILL_DIR> - Path to the quill directory (required)
  • --output <OUTPUT_PDF> - Output PDF file path (default: output.pdf)

Quill Validation

If your markdown includes a QUILL field in the frontmatter, the CLI will warn you if it doesn't match the quill loaded from --quill-path. The quill specified by --quill-path is always used as the authoritative source.

Example warning:

Warning: Markdown specifies quill 'expected_quill' but using quill 'actual_quill' from --quill-path

Examples

Example 1: Basic Usage

Create my-memo.md:

---
from: HQ AFGSC/A3TW
to: ALL MAJCOM UNITS
subject: Test Memorandum
date: 2024-01-15
---

This is the body of the memorandum.

Render it:

quillmark-cli my-memo.md --quill-path ./quillmark-fixtures/resources/usaf_memo

This creates output.pdf using the specified quill.

Example 2: With Custom Output Path

quillmark-cli my-memo.md --quill-path ./my-quill --output my-memo.pdf

Example 3: With QUILL Field (Validation)

Create document.md:

---
QUILL: usaf_memo
from: HQ AFGSC/A3TW
to: ALL MAJCOM UNITS
subject: Test
---

Document content...

Render it:

quillmark-cli document.md --quill-path ./quillmark-fixtures/resources/usaf_memo

If the loaded quill's name matches usaf_memo, no warning is shown. If it doesn't match, you'll see a warning, but the PDF will still be generated using the quill from --quill-path.

Example 4: Testing Your Own Quill

# Test your custom quill during development
quillmark-cli test.md --quill-path ./path/to/my-quill --output test.pdf

Features

  • PDF rendering using Typst backend
  • Structured error diagnostics
  • Minimal dependencies
  • Clean, focused CLI interface

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Commit count: 1841

cargo fmt