Quick start
Type your way through this page and you will end up with an HTML file you can double-click open, offline.
You do not have to install anything.
1. Write a source file
Make a folder and put plan.md in it:
2. Compile
npx ships with npm and means "download this package, run it once, don't leave it on my machine". The first run spends a dozen seconds downloading (measured: 86 packages, 15 seconds); after that npx has its own cache.
You will see:
3. Open it
Double-click plan.html.
Now do three things to prove it really is self-contained:
:::steps
- Click the "After" tab. The content switches — that is the small runtime the output carries, and it talks to nothing.
- Disconnect from the network and reload. The page is identical. There is no
<link>, no<script src>, no CDN reference anywhere in it. - Send the file to someone. Email, chat, USB stick — they double-click and see exactly the same thing. :::
4. Add a diagram
Append this to plan.md:
Compile again:
The first attempt fails, with this diagnostic (compiler messages are Chinese-only for now):
Drawing needs a real browser to measure text, so install it:
About 150MB, about a minute, once. Why a browser is unavoidable: Mermaid.
Compile again and the diagram is in there — as static SVG, with no diagram library running on the reader's side.
5. See where the bytes went
The segments do not overlap and add up to the whole file. Pamphlet sets no size limit; it just itemises the bill — whether a diagram is worth 16KB is your call.
Next
- If you use it often, install it so the command becomes
pamphletinstead ofnpx @nekoleapuki/pamphlet-cli - The nine directives — callouts, tabs, collapsibles, steps
- What the output is — what it promises and what it does not