Skip to content

thekozugroup/Ratchet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages