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

ccsession

v0.0.2

Published

Export Claude Code sessions to HTML

Readme

ccsession

Export Claude Code sessions to HTML or Markdown files, useful to share with peers and understand which tools are called by CC.

Usage

# Export each session to separate HTML files
npx ccsession@latest

# Merge all sessions into one chronological HTML file
npx ccsession@latest --merge

# Export as Markdown files
npx ccsession@latest --markdown

# Use a specific template
npx ccsession@latest --template light

# Export from a specific project
npx ccsession@latest --project my-app

# Custom output path for merged sessions
npx ccsession@latest --merge --output ./reports/session.html

# Combine options
npx ccsession@latest --merge --markdown --project my-app --output ~/my-session.md

# Show help
npx ccsession@latest --help

Options

  • --merge: Merge all sessions into a single file, sorted chronologically from oldest to newest
  • --template <name>: Use template templates/<name>.html (default: default, ignored with --markdown)
  • --project <name>: Export sessions from specific project instead of current directory
  • --output <path>: Custom output file path (only works with --merge)
  • --markdown: Output as Markdown instead of HTML
  • --help, -h: Show help message

Templates

Available HTML templates:

  • default: Dark theme with collapsible tool outputs
  • light: Light theme variant
  • compact: Compact monospace theme

Output

Individual mode (default):

  • HTML: Each session exported to /tmp/claude-sessions/{session-id}.html
  • Markdown: Each session exported to /tmp/claude-sessions/{session-id}.md
  • Progress indicator shows current session being processed

Merge mode (--merge):

  • HTML: All sessions merged into /tmp/claude-sessions/{project-name}.html
  • Markdown: All sessions merged into /tmp/claude-sessions/{project-name}.md
  • Sessions sorted chronologically (oldest first)
  • Single comprehensive file with all conversations

Markdown mode (--markdown):

  • Images are extracted from base64 and saved as separate files
  • Image files are linked relatively in the markdown (e.g., ![Image](./uuid.png))
  • Supports proper formatting for tool outputs and code blocks

Features

  • Smart Discovery: Automatically finds sessions for current directory or specified project
  • Merge Mode: Combine all sessions chronologically
  • Template System: Multiple HTML themes available
  • Markdown Export: Full markdown support with image extraction
  • Project Selection: Export from any project in .claude/projects
  • Image Handling: Automatic base64 image extraction and file linking in markdown mode

How it works

The script looks for Claude Code session files in ~/.claude/projects/ and converts them from JSONL format to styled HTML or Markdown files. By default, it uses the current directory name to find the matching project, but you can specify any project with the --project flag.

Developing

Publishing to NPM Registry

First bump the version at package.json, then:

npm login
git add package.json ; git commit -m "Bump version"
git tag <version>
git push origin main --tags
npm publish --access public