ghost-paper
v0.3.5
Published
Turn markdown into beautiful HTML reports
Downloads
1,233
Maintainers
Readme
Ghost Paper
Turn markdown into beautiful HTML reports. Write standard markdown with tables — Ghost Paper automatically converts them into interactive charts, KPI strips, and styled tables.
Zero special syntax. Any agent that can write markdown can produce a Ghost Paper report.
Install
npm install -g ghost-paperOr run directly:
npx ghost-paper build html report.mdUsage
ghost-paper build html report.md # → report.html
ghost-paper build html report.md -o output.html # custom output path
ghost-paper build pdf report.md # → report.pdf
ghost-paper build pdf report.md --landscape # landscape orientationOpen the resulting HTML file in any browser. Everything is self-contained — no server needed.
How it works
Ghost Paper parses your markdown file and uses heuristics to classify each table:
| Table shape | Rendered as | |---|---| | 2–6 rows, 2–4 cols, headers like "Metric / Value / Change" | KPI strip | | First column is time (months, quarters, years), other cols numeric | Line chart | | First column is categories, one numeric column, 3+ rows | Bar chart | | Exactly 2 columns: category + positive number, 2–8 rows | Pie chart | | Everything else | Styled table |
Charts are interactive (hover for tooltips) using ECharts.
Markdown format
Standard markdown. The only conventions:
# H1headings become tabs in the sidebar- First blockquote after an H1 becomes the tab subtitle
## H2headings become section headings within a tab- Tables are auto-classified into charts, KPIs, or styled tables
- Blockquotes (other than subtitles) become callout asides
- Frontmatter sets the report title and subtitle
Example
---
title: "Q4 2025 Product Analytics"
subtitle: "Acme Corp · Feb 2026"
---
# Executive Summary
> Revenue hit $4.2M. Users crossed 200K.
Strong quarter driven by organic growth and the Teams tier launch.
| Metric | Value | Change |
|--------|-------|--------|
| Monthly active users | 214K | +18% vs Q3 |
| Q4 revenue | $4.2M | +23% YoY |
| Net revenue retention | 118% | +6pp vs Q3 |
| Month | Revenue ($K) | Users (K) |
|-------|-------------|-----------|
| Jan | 280 | 142 |
| Feb | 295 | 148 |
| Mar | 310 | 155 |
> **Teams tier** reached 18% of revenue within 3 months of launch.
# Growth & Acquisition
> 67% of signups came organically.
| Channel | CPA ($) |
|---------|---------|
| Referral | 8.2 |
| Organic SEO | 12.5 |
| Paid Search | 30.5 |This produces a two-tab report with a KPI strip, a line chart with dual Y-axes, a callout aside, and a horizontal bar chart — all from plain markdown tables.
For AI agents
Ghost Paper is designed for AI-generated reports. Give your agent these instructions:
Write a markdown report. Use
# H1headings to separate major sections (each becomes a tab). Use standard markdown tables for data — they'll be automatically converted into charts. Put the single most important number in the first column, a label in the second, and a comparison in the third to create KPI strips. Use blockquotes for key insights.
That's it. No special syntax to learn.
Design
Reports use the Geist font family, a Tufte-inspired layout with centered content, and an acid yellow + charcoal color scheme. All styling is embedded in the output HTML.
