ghost-paper 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -0
- package/dist/cli.js +1301 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Ghost Paper
|
|
2
|
+
|
|
3
|
+
Turn markdown into beautiful HTML reports. Write standard markdown with tables — Ghost Paper automatically converts them into interactive charts, KPI strips, and styled tables.
|
|
4
|
+
|
|
5
|
+
Zero special syntax. Any agent that can write markdown can produce a Ghost Paper report.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g ghost-paper
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or run directly:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx ghost-paper build report.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
ghost-paper build report.md # → report.html
|
|
23
|
+
ghost-paper build report.md -o output.html # custom output path
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Open the resulting HTML file in any browser. Everything is self-contained — no server needed.
|
|
27
|
+
|
|
28
|
+
## How it works
|
|
29
|
+
|
|
30
|
+
Ghost Paper parses your markdown file and uses heuristics to classify each table:
|
|
31
|
+
|
|
32
|
+
| Table shape | Rendered as |
|
|
33
|
+
|---|---|
|
|
34
|
+
| 2–6 rows, 2–4 cols, headers like "Metric / Value / Change" | **KPI strip** |
|
|
35
|
+
| First column is time (months, quarters, years), other cols numeric | **Line chart** |
|
|
36
|
+
| First column is categories, one numeric column, 3+ rows | **Bar chart** |
|
|
37
|
+
| Exactly 2 columns: category + positive number, 2–8 rows | **Pie chart** |
|
|
38
|
+
| Everything else | **Styled table** |
|
|
39
|
+
|
|
40
|
+
Charts are interactive (hover for tooltips) using [ECharts](https://echarts.apache.org/).
|
|
41
|
+
|
|
42
|
+
## Markdown format
|
|
43
|
+
|
|
44
|
+
Standard markdown. The only conventions:
|
|
45
|
+
|
|
46
|
+
- **`# H1` headings** become tabs in the sidebar
|
|
47
|
+
- **First blockquote after an H1** becomes the tab subtitle
|
|
48
|
+
- **`## H2` headings** become section headings within a tab
|
|
49
|
+
- **Tables** are auto-classified into charts, KPIs, or styled tables
|
|
50
|
+
- **Blockquotes** (other than subtitles) become callout asides
|
|
51
|
+
- **Frontmatter** sets the report title and subtitle
|
|
52
|
+
|
|
53
|
+
### Example
|
|
54
|
+
|
|
55
|
+
````markdown
|
|
56
|
+
---
|
|
57
|
+
title: "Q4 2025 Product Analytics"
|
|
58
|
+
subtitle: "Acme Corp · Feb 2026"
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Executive Summary
|
|
62
|
+
|
|
63
|
+
> Revenue hit $4.2M. Users crossed 200K.
|
|
64
|
+
|
|
65
|
+
Strong quarter driven by organic growth and the Teams tier launch.
|
|
66
|
+
|
|
67
|
+
| Metric | Value | Change |
|
|
68
|
+
|--------|-------|--------|
|
|
69
|
+
| Monthly active users | 214K | +18% vs Q3 |
|
|
70
|
+
| Q4 revenue | $4.2M | +23% YoY |
|
|
71
|
+
| Net revenue retention | 118% | +6pp vs Q3 |
|
|
72
|
+
|
|
73
|
+
| Month | Revenue ($K) | Users (K) |
|
|
74
|
+
|-------|-------------|-----------|
|
|
75
|
+
| Jan | 280 | 142 |
|
|
76
|
+
| Feb | 295 | 148 |
|
|
77
|
+
| Mar | 310 | 155 |
|
|
78
|
+
|
|
79
|
+
> **Teams tier** reached 18% of revenue within 3 months of launch.
|
|
80
|
+
|
|
81
|
+
# Growth & Acquisition
|
|
82
|
+
|
|
83
|
+
> 67% of signups came organically.
|
|
84
|
+
|
|
85
|
+
| Channel | CPA ($) |
|
|
86
|
+
|---------|---------|
|
|
87
|
+
| Referral | 8.2 |
|
|
88
|
+
| Organic SEO | 12.5 |
|
|
89
|
+
| Paid Search | 30.5 |
|
|
90
|
+
````
|
|
91
|
+
|
|
92
|
+
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.
|
|
93
|
+
|
|
94
|
+
## For AI agents
|
|
95
|
+
|
|
96
|
+
Ghost Paper is designed for AI-generated reports. Give your agent these instructions:
|
|
97
|
+
|
|
98
|
+
> Write a markdown report. Use `# H1` headings 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.
|
|
99
|
+
|
|
100
|
+
That's it. No special syntax to learn.
|
|
101
|
+
|
|
102
|
+
## Design
|
|
103
|
+
|
|
104
|
+
Reports use the [Geist](https://vercel.com/font) font family, a Tufte-inspired layout with centered content, and an acid yellow + charcoal color scheme. All styling is embedded in the output HTML.
|