cchat 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cchat-0.1.0.dist-info/METADATA +127 -0
- cchat-0.1.0.dist-info/RECORD +6 -0
- cchat-0.1.0.dist-info/WHEEL +4 -0
- cchat-0.1.0.dist-info/entry_points.txt +3 -0
- cchat-0.1.0.dist-info/licenses/LICENSE +21 -0
- cchat.py +1588 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cchat
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Browse and search Claude Code conversation history from the terminal.
|
|
5
|
+
Author: asparagusbeef
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Software Development
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Project-URL: Homepage, https://github.com/asparagusbeef/cchat
|
|
16
|
+
Project-URL: Issues, https://github.com/asparagusbeef/cchat/issues
|
|
17
|
+
|
|
18
|
+
# cchat
|
|
19
|
+
|
|
20
|
+
Browse and search Claude Code conversation history from the terminal.
|
|
21
|
+
|
|
22
|
+
`cchat` reads the JSONL conversation logs that Claude Code stores in `~/.claude/projects/` and presents them as readable conversation turns. It handles compaction stitching, branch detection, and the full UUID tree structure so you don't have to parse raw JSONL yourself.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
### pip / pipx
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install cchat
|
|
30
|
+
# or
|
|
31
|
+
pipx install cchat
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### curl (no pip needed)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
curl -fsSL https://raw.githubusercontent.com/asparagusbeef/cchat/main/cchat.py \
|
|
38
|
+
-o ~/.local/bin/cchat && chmod +x ~/.local/bin/cchat
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### wget
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
wget -qO ~/.local/bin/cchat \
|
|
45
|
+
https://raw.githubusercontent.com/asparagusbeef/cchat/main/cchat.py && chmod +x ~/.local/bin/cchat
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### PowerShell (Windows without WSL)
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/asparagusbeef/cchat/main/cchat.py" `
|
|
52
|
+
-OutFile "$env:LOCALAPPDATA\cchat\cchat.py"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> **Note:** cchat reads `~/.claude/projects/` which is a Linux/macOS path. On native Windows (not WSL), Claude Code may store data differently.
|
|
56
|
+
|
|
57
|
+
## Quick start
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# List recent sessions in the current project
|
|
61
|
+
cchat list
|
|
62
|
+
|
|
63
|
+
# View the last 5 turns of the latest session
|
|
64
|
+
cchat view
|
|
65
|
+
|
|
66
|
+
# View a specific session (by index from list)
|
|
67
|
+
cchat view 2
|
|
68
|
+
|
|
69
|
+
# Search across all sessions
|
|
70
|
+
cchat search "error handling"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Commands
|
|
74
|
+
|
|
75
|
+
| Command | Alias | Description |
|
|
76
|
+
|---------|-------|-------------|
|
|
77
|
+
| `cchat list [N]` | `ls` | List recent sessions (default: 10) |
|
|
78
|
+
| `cchat view [SESSION]` | `v` | View conversation turns |
|
|
79
|
+
| `cchat copy [SESSION]` | `cp` | Copy messages to clipboard (WSL) |
|
|
80
|
+
| `cchat search PATTERN` | `s` | Search across sessions |
|
|
81
|
+
| `cchat tree [SESSION]` | | Show conversation tree structure |
|
|
82
|
+
| `cchat export [SESSION]` | | Export full session (markdown or JSON) |
|
|
83
|
+
| `cchat projects` | | List all projects |
|
|
84
|
+
|
|
85
|
+
### View options
|
|
86
|
+
|
|
87
|
+
| Flag | Description |
|
|
88
|
+
|------|-------------|
|
|
89
|
+
| `-n N` | Show last N turns |
|
|
90
|
+
| `-r RANGE` | Show specific turns: `5`, `3-7`, `-1`, `-3--1` |
|
|
91
|
+
| `--all` | Show all turns |
|
|
92
|
+
| `--tools` | Show tool call summaries |
|
|
93
|
+
| `--raw` | Show everything (tool I/O, thinking, system) |
|
|
94
|
+
| `--json` | Output as JSON |
|
|
95
|
+
| `--no-stitch` | Don't bridge compaction boundaries |
|
|
96
|
+
| `--timestamps` | Show timestamps |
|
|
97
|
+
| `--compact-summaries` | Include compaction summary messages |
|
|
98
|
+
| `--truncate LEN` | Truncate length for raw content (default: 500) |
|
|
99
|
+
| `-p PATH` | Use a different project directory |
|
|
100
|
+
|
|
101
|
+
### Session selection
|
|
102
|
+
|
|
103
|
+
Sessions can be specified by:
|
|
104
|
+
- **Index**: `cchat view 2` (2nd most recent from `cchat list`)
|
|
105
|
+
- **UUID prefix**: `cchat view a1b2c3` (matches session ID)
|
|
106
|
+
- **Omitted**: uses the most recent session
|
|
107
|
+
|
|
108
|
+
## How it works
|
|
109
|
+
|
|
110
|
+
Claude Code stores each conversation as a JSONL file in `~/.claude/projects/<project-key>/`. Each line is a JSON entry with a type (`user`, `assistant`, `system`, etc.) and a UUID-based parent-child tree.
|
|
111
|
+
|
|
112
|
+
cchat:
|
|
113
|
+
1. **Resolves the active path** by walking the UUID tree from the last entry backward
|
|
114
|
+
2. **Stitches across compaction boundaries** using `logicalParentUuid` links (or positional fallback)
|
|
115
|
+
3. **Groups entries into turns** (one user message + full assistant response)
|
|
116
|
+
4. **Detects branch points** by filtering out mechanical fan-out (tool_use forks, progress entries)
|
|
117
|
+
|
|
118
|
+
## Requirements
|
|
119
|
+
|
|
120
|
+
- Python 3.8+
|
|
121
|
+
- No dependencies (stdlib only)
|
|
122
|
+
- Clipboard copy uses `clip.exe` (WSL) — other platforms not yet supported
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT
|
|
127
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
cchat.py,sha256=yj5GAYSAZnCe1EZGadk8i25WqurRJUynibRtQgwt00w,61770
|
|
2
|
+
cchat-0.1.0.dist-info/entry_points.txt,sha256=2WOGKhArI633SMZEFDfF9EIL5rncbw25O7ovNT9j5Q4,36
|
|
3
|
+
cchat-0.1.0.dist-info/licenses/LICENSE,sha256=hC4lHrHcHXDRGasvRcVQyDUrJiX1GC4W7VJusfXjbY4,1091
|
|
4
|
+
cchat-0.1.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
5
|
+
cchat-0.1.0.dist-info/METADATA,sha256=01N4TZZgJAFRETARR9EFU75kGUnGx3u8xjqRJjXDV84,4085
|
|
6
|
+
cchat-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 asparagusbeef
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|