@dztabel/reportkit
v0.1.30
Published
Agent-facing CLI for exporting prepared content into polished Typst PDF reports.
Readme
ReportKit
ReportKit exports prepared Markdown or report.json content into polished Typst PDF reports.
It is designed for LLMs and agents at the final delivery step: the agent prepares the content, then calls report-kit to produce a stable PDF.
Install
# macOS Apple Silicon
npm install -g @dztabel/reportkit @dztabel/reportkit-darwin-arm64
# Linux x64
npm install -g @dztabel/reportkit @dztabel/reportkit-linux-x64
# Windows x64
npm install -g @dztabel/reportkit @dztabel/reportkit-win32-x64The canonical command is report-kit. reportkit is also provided as a compatibility alias.
Check the command:
report-kit --versionQuick Start
Create content.md:
---
title: Project Review Report
subtitle: Agent-prepared content
author: ReportKit
date: 2026-05-26
---
# Executive Summary
This report was prepared by an upstream agent. ReportKit is responsible for turning the prepared content into a polished PDF.
表:Delivery Checklist
| Item | Status | Notes |
| --- | --- | --- |
| Content prepared | Done | The agent has already written the report. |
| PDF export | Ready | ReportKit handles layout and rendering. |Export the report:
report-kit build content.md --out ./reportOutput files:
report/report.pdf
report/report.json
report/report.typ
report/<template-id>.typ
report/render-result.json
report/build-result.jsonInputs
ReportKit accepts:
- Markdown prepared by an LLM or agent.
- A structured
report.jsonfile.
For direct report.json input, formula fields are treated as Typst math only and must not contain Typst code escapes such as #read(...). Figure paths are resolved through an asset allowlist rooted at the input file directory, output directory, or built-in example assets; arbitrary absolute local file paths are rejected.
It is useful when the user asks for a formal PDF report, consulting-style deliverable, project review, research summary, or Chinese business report.
What ReportKit Does
- Converts prepared content into a report structure.
- Applies a stable Typst report style.
- Generates PDF output.
- Returns machine-readable build results (
errors+warnings) for agents; dangling cross-references fail the build with the actual numbering listed. - Auto-numbers tables/figures/equations per chapter and renders prose references (见表 x.x / 如图 x.x / 式 x.x) as clickable cross-references.
- Renders a final sources chapter as numbered [1] [2] reference entries with clickable superscript [n] citations in prose.
- Resolves table column widths and font size from measured content (descriptive columns widen, short columns stay compact).
- Keeps table captions, figure captions, formulas, code blocks, lists, explicitly requested callouts, and long tables in a controlled layout.
What ReportKit Does Not Do
- It does not search the web.
- It does not judge facts.
- It does not replace the upstream LLM or agent's writing process.
- It does not require users to write Typst by hand.
Agent Usage
An agent can call:
report-kit build prepared-report.md --out ./reportThen read report/build-result.json or stdout to locate the generated PDF.
Successful builds return JSON with ok: true, artifact paths, component counts, and warnings.
Platform Support
Current public beta:
- macOS Apple Silicon: supported through
@dztabel/reportkit-darwin-arm64. - Linux x64: supported through
@dztabel/reportkit-linux-x64. - Windows x64: supported through
@dztabel/reportkit-win32-x64.
More platform packages can be added without changing the main @dztabel/reportkit command.
