Export Claude Code session transcripts as readable HTML or Markdown documents, with automatic secret scrubbing and smart boundary detection.
- HTML & Markdown export — Dark terminal-themed HTML or clean GFM Markdown
- Secret scrubbing — Automatically detects and redacts secrets using gitleaks rules
- Boundary detection — Identifies logical conversation segments (session restarts, time gaps, history snapshots)
- Text boundaries — Filter exports to specific message ranges via
--from-text/--to-text - Prefix ID matching — Use short session ID prefixes (e.g.,
deadbeefinstead of the full UUID) - Gist publishing — Push exports directly to GitHub gist
- MCP server — Register as a Claude Code MCP tool for conversational exports
go install github.com/sgnl-ai/cclog/cmd/cclog@latestOr download a binary from Releases.
cclog list # list all recent sessions
cclog list --project /path/to/project # filter by projectcclog export # interactive session picker
cclog export --session <id> # specific session by ID (or prefix)
cclog export --session dead # prefix match works
cclog export --all # skip boundary detection
cclog export --format md # Markdown output (default: html)
cclog export --from-text "fix the" # start at message containing text
cclog export --to-text "looks good" # end at message containing text
cclog export --gist # publish to gist
cclog export --gist --public # public gistOutput is written to ~/cclog/{slug}-{date}.html (or .md).
Register cclog as an MCP tool in Claude Code:
cclog setupThis runs claude mcp add --transport stdio --scope user cclog -- cclog serve.
Once registered, you can ask Claude:
- "Export this session as markdown"
- "List my recent sessions"
- "Export session abc123 as HTML and push to a gist"
| Tool | Description |
|---|---|
export_transcript |
Export a session transcript. Params: session_id, format, from_text, to_text, all, gist |
list_sessions |
List available sessions. Params: project, limit |
Claude Code stores session transcripts as JSONL files in ~/.claude/projects/. Each line is a JSON object representing a message, tool call, or system event. cclog:
- Discovers sessions from
sessions-index.jsonfiles and JSONL filenames - Parses JSONL into structured messages (user text, assistant text, tool calls)
- Strips internal tags (
<system-reminder>,<bash-input>, etc.) - Applies text boundary filters if specified
- Scans for secrets using gitleaks rule set and redacts them
- Renders to self-contained HTML (dark theme) or clean Markdown
make all # fmt + vet + lint + test + build
make test # run tests with race detector
make coverage # coverage report with 80% threshold
make lint # golangci-lint
make build # compile binary
make install # go install
make security # gosec + govulncheck
make clean # remove artifactscmd/cclog/ CLI (cobra commands, interactive prompts)
internal/export/ Shared business logic (pipeline, formatting)
internal/parser/ JSONL parser, tag stripping, tool descriptions
internal/renderer/ HTML and Markdown renderers
internal/scanner/ Secret redaction via gitleaks
internal/session/ Session discovery, boundary detection
internal/gist/ GitHub gist publishing
internal/mcp/ MCP server (stdio transport)
MIT
