@breakflow/cli
v0.1.2
Published
CLI tool to analyze, lint, and render PDFs with BreakFlow intelligent pagination.
Readme
@breakflow/cli
Command-line interface to analyze, lint, and render PDFs with BreakFlow intelligent pagination.
🚀 Try the Live Interactive Demo (Angular 22 + Signals + client-side jsPDF showcase)
Overview
@breakflow/cli is the official command-line tool for BreakFlow. It lets developers inspect printable HTML documents, detect pagination defects, enforce print linting rules in CI pipelines, and render high-fidelity vector PDFs directly from the terminal.
Think ESLint for printable documents, with an automated fix engine.
Key Features
- Analyze Mode: Scans HTML documents or live URLs and outputs human-readable or JSON reports of pagination defects (orphan headings, overflowing cards, table splits).
- CI/CD Linting: Integrates into GitHub Actions or GitLab CI to fail builds when critical print defects occur.
- Headless PDF Rendering: Renders vector PDFs via Chromium with BreakFlow's intelligent pagination rules applied.
- Visual Debug Overlays: Generates PDFs with physical page boundary guides and capacity budgets overlaid for visual inspection.
Installation
npm install -g @breakflow/cliOr run directly without installing:
npx @breakflow/cli analyze report.htmlCommands & Usage
1. Analyze an HTML Document
Inspect page breaks and automatic layout fixes:
breakflow analyze invoice.htmlOutput machine-readable JSON for automated toolchains:
breakflow analyze invoice.html --json2. Lint HTML for Pagination Defects in CI
Enforce zero broken page breaks in pull requests:
breakflow lint report.html --fail-on-warning3. Render High-Fidelity PDF
Paginate and render directly to a vector PDF:
breakflow pdf invoice.html -o invoice.pdfWith visual page budget overlay enabled:
breakflow pdf invoice.html -o invoice-debug.pdf --debug4. Live Preview Server
Serve printable documents with real-time browser pagination preview:
breakflow serve ./templates --port 4000Monorepo Packages
@breakflow/core- Core algorithmic engine@breakflow/browser- DOM layout measurement & sandbox paginator@breakflow/playwright- Server-side Headless Chromium PDF adapter@breakflow/cli- Command-line analysis & PDF generation tool (this package)
Links
- Live Demo: temporary-fast-argon-5v5qgvo.vercel.app
- GitHub Repository: github.com/mehmetduran932/BreakFlow
- CLI Documentation: docs/debugging.md
License
MIT © BreakFlow Contributors
