Bring receipts from your Claude Code sessions
# Add to your Claude Code skills
git clone https://github.com/chrishutchinson/claude-receiptsA note from the author:
This has been one of my favourite creative side projects yet (and just in time for Opus 4.6).
I picked up a second hand receipt printer and hooked it up to Claude Code's
SessionEndhook. With someccusagewrangling, a receipt is printed, showing a breakdown of that session's spend by model, along with token counts.It's dumb, the receipts are beautiful, and I love it so much.
I hope you enjoy it too.



npx claude-receipts setup
This will:
SessionEnd hook in your global ~/.claude/settings.json~/.claude-receipts.config.jsonFrom now on, every time you exit a Claude Code session, your receipt will be generated and opened in your browser.
Generate a receipt for your most recent session:
npx claude-receipts generate
generateGenerate a receipt for a Claude Code session.
# Generate for most recent session
npx claude-receipts generate
# Generate HTML (saved to ~/.claude-receipts/projects/)
npx claude-receipts generate --output html
# Print to thermal printer
npx claude-receipts generate --output printer --printer usb
# Multiple outputs (HTML + printer)
npx claude-receipts generate --output html,printer
# Specific session by UUID prefix
npx claude-receipts generate --session 9356d5e2
# Override location
npx claude-receipts generate --location "Paris, France"
No comments yet. Be the first to share your thoughts!
Options:
-s, --session <id> - Generate for a specific session ID or UUID prefix-o, --output <format> - Output format: "html", "console", or "printer" (supports multiple, comma-separated)-l, --location <text> - Override location detection-p, --printer <name> - Printer interface (e.g., "usb", "tcp://192.168.1.100")Output Formats:
html - Beautiful styled receipt saved to ~/.claude-receipts/projects/console - ASCII art display in terminalprinter - Send to thermal printer (requires Epson TM-T88V or compatible)setupConfigure automatic receipt generation.
# Run interactive setup
npx claude-receipts setup
# Uninstall the hook
npx claude-receipts setup --uninstall
This modifies ~/.claude/settings.json to add a SessionEnd hook that automatically generates receipts.
configManage your receipt configuration.
# Show current configuration
npx claude-receipts config --show
# Set a configuration value
npx claude-receipts config --set location="Kuala Lumpur, Malaysia"
npx claude-receipts config --set timezone="Asia/Kuala_Lumpur"
npx claude-receipts config --set printer=usb
# Reset to default...