Shared Sessions for Claude Code
링크로 Claude Code 세션을 공유하면 팀원이 각자 Claude Code에서 참여해 함께 작업합니다
Claude 코드 세션의 영수증을 가져옴
Bring receipts from your Claude Code sessions
플러그인TypeScript · JavaScriptGitHub @chrishutchinson직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
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 SessionEnd hook. With some ccusage wrangling, 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.
• Configure the SessionEnd hook in your global ~/.claude/settings.json
• Create a config file at ~/.claude-receipts.config.jsonREADME 전문 보기 ↗A 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"
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 defaults
npx claude-receipts config --reset
Available settings:
location - Default location (string)timezone - Timezone for dates (string, e.g., "Asia/Macau")printer - Default printer interface (string, e.g., "usb" or "tcp://192.168.1.100")Configuration is stored at ~/.claude-receipts.config.json.
Default configuration:
{
"version": "1.0.0"
}
Optional settings:
location - Custom location string (otherwise auto-detected)timezone - Custom timezone for date formattingprinter - Default printer interface for thermal printingLocation is determined in this order:
--location flag (if provided)location settingnpx claude-receipts generate --output html via stdin with the session IDccusage session --id <session-id> to get accurate session token/cost data--output html is specified, generates a styled HTML receipt with token breakdowns by model~/.claude-receipts/projects/[session-name].html and/or prints to thermal printer--output printer is specified, sends the receipt to a thermal receipt printerclaude-receipts supports printing to Epson TM-T88V thermal printers (and compatible models) via:
--printer usb (or config --set printer=usb)--printer tcp://192.168.1.100[!WARNING] Your mileage with printing may vary. I have tested with an Epson TM-T88V, printing from macOS and it works well, but other models may have different capabilities or require adjustments to the code. I am more than happy to accept PRs to improve printer compatibility.
The receipt includes:
This means you're trying to manually generate a receipt but the most recent session doesn't have a valid project path. Solutions:
setup command)ccusage couldn't find any sessions. Make sure you've used Claude Code recently and that ccusage is working:
npx ccusage session --json
Check that the hook is installed:
cat ~/.claude/settings.json
You should see a SessionEnd hook pointing to claude-receipts.
Very short sessions (e.g., just "hello world" + immediate exit) may not appear in ccusage yet. The hook will exit silently rather than printing a wrong receipt. For sessions that exist, the package now uses ccusage session --id to fetch accurate totals rather than sub-session slices.
If using --printer usb, ensure:
/dev/usb/lp*)For network printers, use --printer tcp://<ip-address> with port 9100 (default ESC/POS port).
ccusage --id)MIT