Skip to main content

Module path_codec

Module path_codec 

Source

Functionsยง

decode_project_path
Decode the original project path from the .claude/projects folder name. First tries walking the filesystem to find the exact directory (handles ambiguous encodings like spaces, parentheses, dots all becoming -). Falls back to naive string-based decoding.
encode_path_for_claude
Encode a path the same way Claude CLI does: replace any non-ASCII-alphanumeric character (except -) with -.
walk_fs_for_path
Walk the filesystem to find the original directory whose Claude-encoded form matches remaining_encoded (the full encoded directory name without leading -). full_target is the original complete encoded name for round-trip validation.