npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jsonl-to-pdf

v1.0.3

Published

Turn AI coding agent sessions (Claude Code today, more soon) into shareable PDFs.

Downloads

325

Readme

jsonl-to-pdf

Turn your AI coding sessions into shareable PDFs.

npm downloads release license

Every conversation you have with Claude Code lives as a .jsonl file deep inside ~/.claude/projects/. jsonl-to-pdf turns those into PDFs you can read, share, archive, attach to a PR, or hand to a teammate over Slack.

$ jsonl-to-pdf
◆ Project   C:\S\my-app
◆ Session   Refactor the billing module to use Stripe webhooks  · 2h ago · 412KB
◆ Include sub-agent conversations? › Yes

✓ Wrote refactor-the-billing-module-to-use-stripe-webhooks.pdf

That's it. Pick a session, get a PDF. Sub-agents nested inline, code blocks rendered properly, page-breaks that don't tear in the middle of a token.


Try it without installing

# npx (Node)
npx jsonl-to-pdf

# bunx (Bun)
bunx jsonl-to-pdf

# pnpm
pnpm dlx jsonl-to-pdf

That'll drop you straight into the interactive picker — no global install, no package.json. Same flags work: npx jsonl-to-pdf convert session.jsonl --dark.

Install

# npm
npm i -g jsonl-to-pdf

# bun
bun i -g jsonl-to-pdf

# or grab a standalone binary (no Node, no npm)
# macOS / Linux:
curl -fsSL https://github.com/marius-bughiu/jsonl-to-pdf/releases/latest/download/install.sh | sh
# Windows: download jsonl-to-pdf-win-x64.exe from the latest release

The binaries on GitHub Releases are built with bun build --compile — single-file executables, no runtime required.


Usage

# interactive: pick a project, then a session, then go
jsonl-to-pdf

# or aim it at a specific file
jsonl-to-pdf convert ~/.claude/projects/C--S-my-app/abc-123.jsonl

# pipe to a PDF reader, printer, or anywhere
jsonl-to-pdf convert session.jsonl -o - | lp

# list every Claude Code session on this machine
jsonl-to-pdf list

Flags

| Flag | What it does | |---|---| | -o, --output <path> | Output file (default: <title>.pdf). Use - to write to stdout. | | --no-subagents | Skip the conversations of any sub-agents the main agent spawned. | | --subagents-mode appendix | Render sub-agents as an appendix instead of inline. | | --compact | Hide thinking blocks and trim long tool I/O to ~30 lines. | | --no-thinking | Hide assistant thinking blocks only. | | --dark | Dark theme. Looks great on a screen, less great on paper. | | --redact | Strip AWS keys, GitHub tokens, OpenAI/Anthropic keys, Bearer headers, private keys. | | --agent <id> | Force the adapter (default: auto-detect). |

Run jsonl-to-pdf --help for the full list.


Why

  • Archive. Conversations get rotated and forgotten. A PDF survives.
  • Share. Drop one in a doc, attach to a PR, send a teammate the receipts.
  • Review. Read your AI work the way you read code review — at a desk, on a flight, on paper.
  • Audit. A signed, deterministic export of what was actually said and run.
  • Learn. Hand juniors a real session as study material instead of a generic tutorial.

What it captures

Out of the box, jsonl-to-pdf keeps the full fidelity of the session:

  • Every user prompt and assistant response
  • Thinking blocks (the model's internal reasoning)
  • Every tool call with its full input
  • Every tool result, including the full bash output
  • Image attachments, embedded inline
  • Sub-agents — when the main agent spawned a Task/Agent, that whole sub-conversation is rendered nested at the right place. Recursive. Sub-agents that spawn sub-agents work too.

If full fidelity is too much for the medium (say, you're sharing it externally), --compact shrinks it to the essentials and --redact strips the obvious secrets.


Recipes

Batch convert your last week.

jsonl-to-pdf list --json |
  jq -r '.[] | select(.modifiedAt > "2026-04-22") | .filePath' |
  while read f; do jsonl-to-pdf convert "$f"; done

Attach as a CI artifact.

- run: npx -y jsonl-to-pdf convert "$CLAUDE_SESSION_FILE" -o session.pdf
- uses: actions/upload-artifact@v4
  with: { name: claude-session, path: session.pdf }

Print to your default printer.

jsonl-to-pdf convert session.jsonl -o - | lp

Share without leaking secrets.

jsonl-to-pdf convert session.jsonl --redact --compact

Where Claude Code keeps things

Claude Code writes one JSONL per session at ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl. Path encoding flattens separators to - (so C:\S\my-app becomes C--S-my-app). Sub-agent conversations live as separate JSONL files in <session-id>/subagents/. jsonl-to-pdf list walks all of that for you.


Roadmap

  • Adapters for Aider, OpenAI Codex CLI, Cursor Compose, Gemini CLI
  • HTML output (for inline web sharing) and a static viewer
  • Syntax highlighting for code blocks (Shiki tokens)
  • ToC with page numbers (currently: PDF outlines / bookmarks)
  • Filtering: --turns 5..15, --only assistant, --exclude-tool Bash

Open an issue if you have an agent that writes JSONL we should support.


Contributing

git clone https://github.com/marius-bughiu/jsonl-to-pdf.git
cd jsonl-to-pdf
npm install
npm test
npm run build
node dist/cli.js list

PRs welcome. Adapter contributions especially welcome — see src/adapters/claude-code.ts for the shape.


License

MIT — see LICENSE.