Skip to main content

Module claude_code

Module claude_code 

Source
Expand description

Adapter for Claude Code sessions (~/.claude/projects//*.jsonl). WARNING: internal Claude Code format, not a public API — may change. Parsing is therefore tolerant: a bad line is skipped, never aborts (spec risk 1).

Structs§

ClaudeCode

Functions§

encode_project_path
Claude Code encodes the project path by replacing ‘/’ and ‘.’ with ‘-’. e.g. /home/g/repo/x -> -home-g-repo-x
extract_text
Extracts text from a session jsonl line. None for non-message, corrupted, or empty lines (tolerant parsing).