Skip to main content
DevOps2026

Ratchet

Lightweight Rust CLI for PDF, XLSX, PPTX, and DOCX document processing

clidocument-processingdocxpdfrustxlsx
Ratchet screenshot

A single 2.7 MB Rust binary that handles PDF, XLSX, PPTX, and DOCX operations — replacing a sprawl of Python and Node.js dependencies (pypdf, openpyxl, reportlab, docx-js, pptxgenjs, pandas, pandoc) with one fast, portable tool. Built as a set of drop-in Claude Code skills for AI-assisted document processing.

Screenshots

Ratchet CLI showing PDF, XLSX, PPTX, and DOCX subcommands in a terminal

How it works

Ratchet compiles to a single static binary with four top-level subcommands: pdf, xlsx, pptx, and docx. Each subcommand exposes the operations an AI coding assistant typically needs — merging, splitting, extracting text, reading metadata, converting formats, and unpacking Office XML archives for direct editing.

The PDF module uses lopdf for structural manipulation (merge, split, rotate, watermark, encrypt) and printpdf for creating new documents. XLSX reading is handled by calamine with rust_xlsxwriter for creation. PPTX and DOCX files are ZIP archives containing XML, so those modules use zip and quick-xml to unpack, pretty-print, repack, and validate the underlying XML directly.

Each document type ships with a SKILL.md file that serves as a drop-in replacement for the corresponding Anthropic skill. These skill files teach Claude Code how to use ratchet instead of Python/JS tooling, with identical trigger conditions and capability coverage.

All ZIP extraction operations include zip-slip path traversal protection. The codebase contains zero unsafe blocks.

Stack

  • Rust (2021 edition)
  • lopdf + printpdf (PDF)
  • calamine + rust_xlsxwriter (XLSX)
  • zip + quick-xml (PPTX/DOCX)
  • clap (CLI framework)
  • serde + serde_json (data serialization)

Status

Active