clicodelog 0.1.0__tar.gz
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.
- clicodelog-0.1.0/LICENSE +21 -0
- clicodelog-0.1.0/PKG-INFO +305 -0
- clicodelog-0.1.0/README.md +270 -0
- clicodelog-0.1.0/clicodelog/__init__.py +6 -0
- clicodelog-0.1.0/clicodelog/__main__.py +6 -0
- clicodelog-0.1.0/clicodelog/app.py +996 -0
- clicodelog-0.1.0/clicodelog/cli.py +56 -0
- clicodelog-0.1.0/clicodelog/templates/index.html +1067 -0
- clicodelog-0.1.0/clicodelog.egg-info/PKG-INFO +305 -0
- clicodelog-0.1.0/clicodelog.egg-info/SOURCES.txt +14 -0
- clicodelog-0.1.0/clicodelog.egg-info/dependency_links.txt +1 -0
- clicodelog-0.1.0/clicodelog.egg-info/entry_points.txt +2 -0
- clicodelog-0.1.0/clicodelog.egg-info/requires.txt +7 -0
- clicodelog-0.1.0/clicodelog.egg-info/top_level.txt +1 -0
- clicodelog-0.1.0/pyproject.toml +69 -0
- clicodelog-0.1.0/setup.cfg +4 -0
clicodelog-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 monk1337
|
|
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.
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: clicodelog
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight, local-first web app to browse, inspect, and export logs from CLI-based AI coding agents
|
|
5
|
+
Author: monk1337
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/monk1337/clicodelog
|
|
8
|
+
Project-URL: Repository, https://github.com/monk1337/clicodelog
|
|
9
|
+
Project-URL: Issues, https://github.com/monk1337/clicodelog/issues
|
|
10
|
+
Keywords: claude,claude-code,openai,codex,gemini,gemini-cli,ai,log,viewer,cli
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Web Environment
|
|
13
|
+
Classifier: Framework :: Flask
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.7
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: flask>=2.0
|
|
29
|
+
Requires-Dist: flask-cors>=3.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: build; extra == "dev"
|
|
33
|
+
Requires-Dist: twine; extra == "dev"
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
<div align="center">
|
|
37
|
+
<h1>cli code log</h1>
|
|
38
|
+
<p>
|
|
39
|
+
A lightweight, local-first web app to browse, inspect, and export logs from
|
|
40
|
+
CLI-based AI coding agents — Claude Code, OpenAI Codex, and Gemini CLI.
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<a href="#features">Features</a> •
|
|
45
|
+
<a href="#supported-tools">Supported Tools</a> •
|
|
46
|
+
<a href="#installation">Installation</a> •
|
|
47
|
+
<a href="#usage">Usage</a> •
|
|
48
|
+
<a href="#screenshots">Screenshots</a>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<p>
|
|
52
|
+
<img src="https://img.shields.io/badge/Python-3.7+-blue.svg" alt="Python 3.7+" />
|
|
53
|
+
<img src="https://img.shields.io/badge/Flask-2.0+-green.svg" alt="Flask" />
|
|
54
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License MIT" />
|
|
55
|
+
<a href="http://makeapullrequest.com">
|
|
56
|
+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome" />
|
|
57
|
+
</a>
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Features
|
|
66
|
+
|
|
67
|
+
- **Multi-source support** — View logs from Claude Code, OpenAI Codex, and Gemini CLI
|
|
68
|
+
- **Three-panel layout** — Projects → Sessions → Conversation
|
|
69
|
+
- **Auto-sync** — Backs up data from source directories every hour
|
|
70
|
+
- **Export** — Download any session as a `.txt` file
|
|
71
|
+
- **Theme support** — Light (soft blue) and Dark modes
|
|
72
|
+
- **Rich display** — User/assistant messages, thinking blocks, tool usage, token stats
|
|
73
|
+
- **Search** — Quickly find projects and sessions
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Supported Tools
|
|
78
|
+
|
|
79
|
+
| Tool | Source Directory | Status |
|
|
80
|
+
|------|------------------|--------|
|
|
81
|
+
| **Claude Code** | `~/.claude/projects/` | ✅ Supported |
|
|
82
|
+
| **OpenAI Codex** | `~/.codex/sessions/` | ✅ Supported |
|
|
83
|
+
| **Gemini CLI** | `~/.gemini/tmp/` | ✅ Supported |
|
|
84
|
+
|
|
85
|
+
### Claude Code
|
|
86
|
+
|
|
87
|
+
- Sessions organized by project directory
|
|
88
|
+
- Displays summaries, messages, thinking blocks, and tool usage
|
|
89
|
+
- Shows model metadata and token usage
|
|
90
|
+
|
|
91
|
+
### OpenAI Codex
|
|
92
|
+
|
|
93
|
+
- Sessions organized by date (`YYYY/MM/DD/`)
|
|
94
|
+
- Groups sessions by working directory (cwd) as projects
|
|
95
|
+
- Displays messages, function calls, and reasoning blocks
|
|
96
|
+
- Filters out system prompts for cleaner inspection
|
|
97
|
+
|
|
98
|
+
### Gemini CLI
|
|
99
|
+
|
|
100
|
+
- Sessions stored as JSON files in `{hash}/chats/session-*.json`
|
|
101
|
+
- Groups sessions by project hash
|
|
102
|
+
- Displays messages, thoughts (thinking), and tool calls
|
|
103
|
+
- Shows token usage (input, output, cached)
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Installation
|
|
108
|
+
|
|
109
|
+
### Via pip (Recommended)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install clicodelog
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### From source
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/monk1337/clicodelog.git
|
|
119
|
+
cd clicodelog
|
|
120
|
+
pip install -e .
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Usage
|
|
126
|
+
|
|
127
|
+
If installed via pip:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
clicodelog
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Or run directly from source:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
./run.sh
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or manually:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install -r requirements.txt
|
|
143
|
+
python app.py
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Open http://localhost:5050 in your browser.
|
|
147
|
+
|
|
148
|
+
### CLI Options
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
clicodelog --help
|
|
152
|
+
clicodelog --port 8080 # Run on custom port
|
|
153
|
+
clicodelog --host 0.0.0.0 # Bind to all interfaces
|
|
154
|
+
clicodelog --no-sync # Skip initial data sync
|
|
155
|
+
clicodelog --debug # Run in debug mode
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## How It Works
|
|
161
|
+
|
|
162
|
+
- **Startup sync** — Copies logs from source directories into local `./data/`
|
|
163
|
+
- **Background sync** — Automatically refreshes every hour
|
|
164
|
+
- **Manual sync** — Trigger a sync for the active source via UI
|
|
165
|
+
- **Source switching** — Switch between Claude Code, Codex, and Gemini CLI
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Data Storage
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
data/
|
|
173
|
+
├── claude-code/ # Claude Code backup
|
|
174
|
+
│ ├── -Users-project1/
|
|
175
|
+
│ │ ├── session1.jsonl
|
|
176
|
+
│ │ └── session2.jsonl
|
|
177
|
+
│ └── -Users-project2/
|
|
178
|
+
├── codex/ # OpenAI Codex backup
|
|
179
|
+
│ └── 2026/
|
|
180
|
+
│ └── 01/
|
|
181
|
+
│ ├── 16/
|
|
182
|
+
│ │ └── rollout-xxx.jsonl
|
|
183
|
+
│ └── 17/
|
|
184
|
+
└── gemini/ # Gemini CLI backup
|
|
185
|
+
├── {project-hash-1}/
|
|
186
|
+
│ └── chats/
|
|
187
|
+
│ ├── session-2026-01-17T12-57-xxx.json
|
|
188
|
+
│ └── session-2026-01-17T13-04-xxx.json
|
|
189
|
+
└── {project-hash-2}/
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Controls
|
|
195
|
+
|
|
196
|
+
| Control | Action |
|
|
197
|
+
|---------|--------|
|
|
198
|
+
| Source dropdown | Switch between supported tools |
|
|
199
|
+
| 📥 Export | Download current session as .txt |
|
|
200
|
+
| 🔄 Sync | Manually refresh logs from source |
|
|
201
|
+
| ☀️ / 🌙 Theme | Toggle light/dark mode |
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Screenshots
|
|
206
|
+
|
|
207
|
+
| Light Mode | Dark Mode |
|
|
208
|
+
|------------|-----------|
|
|
209
|
+
|  |  |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Project Structure
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
clicodelog/
|
|
217
|
+
├── app.py # Flask backend (multi-source support)
|
|
218
|
+
├── run.sh # Run script
|
|
219
|
+
├── requirements.txt # Dependencies
|
|
220
|
+
├── data/ # Synced logs (auto-created)
|
|
221
|
+
│ ├── claude-code/
|
|
222
|
+
│ ├── codex/
|
|
223
|
+
│ └── gemini/
|
|
224
|
+
└── templates/
|
|
225
|
+
└── index.html # Frontend
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## API Endpoints
|
|
231
|
+
|
|
232
|
+
| Endpoint | Method | Description |
|
|
233
|
+
|----------|--------|-------------|
|
|
234
|
+
| `/api/sources` | GET | List available sources |
|
|
235
|
+
| `/api/sources/<id>` | POST | Set active source |
|
|
236
|
+
| `/api/projects?source=` | GET | List projects |
|
|
237
|
+
| `/api/projects/<id>/sessions?source=` | GET | List sessions |
|
|
238
|
+
| `/api/projects/<id>/sessions/<id>?source=` | GET | Fetch session |
|
|
239
|
+
| `/api/sync?source=` | POST | Trigger sync |
|
|
240
|
+
| `/api/status?source=` | GET | Sync status |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Requirements
|
|
245
|
+
|
|
246
|
+
- Python 3.7+
|
|
247
|
+
- Flask 2.0+
|
|
248
|
+
- flask-cors
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Adding New Sources
|
|
253
|
+
|
|
254
|
+
To add support for another CLI-based AI tool, update `app.py`:
|
|
255
|
+
|
|
256
|
+
```python
|
|
257
|
+
SOURCES = {
|
|
258
|
+
"claude-code": {
|
|
259
|
+
"name": "Claude Code",
|
|
260
|
+
"source_dir": Path.home() / ".claude" / "projects",
|
|
261
|
+
"data_subdir": "claude-code"
|
|
262
|
+
},
|
|
263
|
+
"codex": {
|
|
264
|
+
"name": "OpenAI Codex",
|
|
265
|
+
"source_dir": Path.home() / ".codex" / "sessions",
|
|
266
|
+
"data_subdir": "codex"
|
|
267
|
+
},
|
|
268
|
+
"gemini": {
|
|
269
|
+
"name": "Gemini CLI",
|
|
270
|
+
"source_dir": Path.home() / ".gemini" / "tmp",
|
|
271
|
+
"data_subdir": "gemini"
|
|
272
|
+
},
|
|
273
|
+
# Add new tool here
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Then implement the corresponding parser for its log format.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## License
|
|
282
|
+
|
|
283
|
+
MIT
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
<div align="center">
|
|
288
|
+
<sub>Built for inspecting what AI coding agents actually did.</sub>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
@misc{clicodelog2026,
|
|
294
|
+
title = {clicodelog: Browse, inspect CLI-based AI coding agents},
|
|
295
|
+
author = {Pal, Ankit},
|
|
296
|
+
year = {2026},
|
|
297
|
+
howpublished = {\url{https://github.com/monk1337/clicodelog}},
|
|
298
|
+
note = {A lightweight, local-first web app to browse, inspect, and export logs from CLI-based AI coding agents — Claude Code, OpenAI Codex, and Gemini CLI.}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## 💁 Contributing
|
|
304
|
+
|
|
305
|
+
Welcome any contributions to open source project, including new features, improvements to infrastructure, and more comprehensive documentation.
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>cli code log</h1>
|
|
3
|
+
<p>
|
|
4
|
+
A lightweight, local-first web app to browse, inspect, and export logs from
|
|
5
|
+
CLI-based AI coding agents — Claude Code, OpenAI Codex, and Gemini CLI.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<a href="#features">Features</a> •
|
|
10
|
+
<a href="#supported-tools">Supported Tools</a> •
|
|
11
|
+
<a href="#installation">Installation</a> •
|
|
12
|
+
<a href="#usage">Usage</a> •
|
|
13
|
+
<a href="#screenshots">Screenshots</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p>
|
|
17
|
+
<img src="https://img.shields.io/badge/Python-3.7+-blue.svg" alt="Python 3.7+" />
|
|
18
|
+
<img src="https://img.shields.io/badge/Flask-2.0+-green.svg" alt="Flask" />
|
|
19
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License MIT" />
|
|
20
|
+
<a href="http://makeapullrequest.com">
|
|
21
|
+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome" />
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
- **Multi-source support** — View logs from Claude Code, OpenAI Codex, and Gemini CLI
|
|
33
|
+
- **Three-panel layout** — Projects → Sessions → Conversation
|
|
34
|
+
- **Auto-sync** — Backs up data from source directories every hour
|
|
35
|
+
- **Export** — Download any session as a `.txt` file
|
|
36
|
+
- **Theme support** — Light (soft blue) and Dark modes
|
|
37
|
+
- **Rich display** — User/assistant messages, thinking blocks, tool usage, token stats
|
|
38
|
+
- **Search** — Quickly find projects and sessions
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Supported Tools
|
|
43
|
+
|
|
44
|
+
| Tool | Source Directory | Status |
|
|
45
|
+
|------|------------------|--------|
|
|
46
|
+
| **Claude Code** | `~/.claude/projects/` | ✅ Supported |
|
|
47
|
+
| **OpenAI Codex** | `~/.codex/sessions/` | ✅ Supported |
|
|
48
|
+
| **Gemini CLI** | `~/.gemini/tmp/` | ✅ Supported |
|
|
49
|
+
|
|
50
|
+
### Claude Code
|
|
51
|
+
|
|
52
|
+
- Sessions organized by project directory
|
|
53
|
+
- Displays summaries, messages, thinking blocks, and tool usage
|
|
54
|
+
- Shows model metadata and token usage
|
|
55
|
+
|
|
56
|
+
### OpenAI Codex
|
|
57
|
+
|
|
58
|
+
- Sessions organized by date (`YYYY/MM/DD/`)
|
|
59
|
+
- Groups sessions by working directory (cwd) as projects
|
|
60
|
+
- Displays messages, function calls, and reasoning blocks
|
|
61
|
+
- Filters out system prompts for cleaner inspection
|
|
62
|
+
|
|
63
|
+
### Gemini CLI
|
|
64
|
+
|
|
65
|
+
- Sessions stored as JSON files in `{hash}/chats/session-*.json`
|
|
66
|
+
- Groups sessions by project hash
|
|
67
|
+
- Displays messages, thoughts (thinking), and tool calls
|
|
68
|
+
- Shows token usage (input, output, cached)
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
### Via pip (Recommended)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install clicodelog
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### From source
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/monk1337/clicodelog.git
|
|
84
|
+
cd clicodelog
|
|
85
|
+
pip install -e .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Usage
|
|
91
|
+
|
|
92
|
+
If installed via pip:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
clicodelog
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or run directly from source:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
./run.sh
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Or manually:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
python app.py
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Open http://localhost:5050 in your browser.
|
|
112
|
+
|
|
113
|
+
### CLI Options
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
clicodelog --help
|
|
117
|
+
clicodelog --port 8080 # Run on custom port
|
|
118
|
+
clicodelog --host 0.0.0.0 # Bind to all interfaces
|
|
119
|
+
clicodelog --no-sync # Skip initial data sync
|
|
120
|
+
clicodelog --debug # Run in debug mode
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## How It Works
|
|
126
|
+
|
|
127
|
+
- **Startup sync** — Copies logs from source directories into local `./data/`
|
|
128
|
+
- **Background sync** — Automatically refreshes every hour
|
|
129
|
+
- **Manual sync** — Trigger a sync for the active source via UI
|
|
130
|
+
- **Source switching** — Switch between Claude Code, Codex, and Gemini CLI
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Data Storage
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
data/
|
|
138
|
+
├── claude-code/ # Claude Code backup
|
|
139
|
+
│ ├── -Users-project1/
|
|
140
|
+
│ │ ├── session1.jsonl
|
|
141
|
+
│ │ └── session2.jsonl
|
|
142
|
+
│ └── -Users-project2/
|
|
143
|
+
├── codex/ # OpenAI Codex backup
|
|
144
|
+
│ └── 2026/
|
|
145
|
+
│ └── 01/
|
|
146
|
+
│ ├── 16/
|
|
147
|
+
│ │ └── rollout-xxx.jsonl
|
|
148
|
+
│ └── 17/
|
|
149
|
+
└── gemini/ # Gemini CLI backup
|
|
150
|
+
├── {project-hash-1}/
|
|
151
|
+
│ └── chats/
|
|
152
|
+
│ ├── session-2026-01-17T12-57-xxx.json
|
|
153
|
+
│ └── session-2026-01-17T13-04-xxx.json
|
|
154
|
+
└── {project-hash-2}/
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Controls
|
|
160
|
+
|
|
161
|
+
| Control | Action |
|
|
162
|
+
|---------|--------|
|
|
163
|
+
| Source dropdown | Switch between supported tools |
|
|
164
|
+
| 📥 Export | Download current session as .txt |
|
|
165
|
+
| 🔄 Sync | Manually refresh logs from source |
|
|
166
|
+
| ☀️ / 🌙 Theme | Toggle light/dark mode |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Screenshots
|
|
171
|
+
|
|
172
|
+
| Light Mode | Dark Mode |
|
|
173
|
+
|------------|-----------|
|
|
174
|
+
|  |  |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Project Structure
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
clicodelog/
|
|
182
|
+
├── app.py # Flask backend (multi-source support)
|
|
183
|
+
├── run.sh # Run script
|
|
184
|
+
├── requirements.txt # Dependencies
|
|
185
|
+
├── data/ # Synced logs (auto-created)
|
|
186
|
+
│ ├── claude-code/
|
|
187
|
+
│ ├── codex/
|
|
188
|
+
│ └── gemini/
|
|
189
|
+
└── templates/
|
|
190
|
+
└── index.html # Frontend
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## API Endpoints
|
|
196
|
+
|
|
197
|
+
| Endpoint | Method | Description |
|
|
198
|
+
|----------|--------|-------------|
|
|
199
|
+
| `/api/sources` | GET | List available sources |
|
|
200
|
+
| `/api/sources/<id>` | POST | Set active source |
|
|
201
|
+
| `/api/projects?source=` | GET | List projects |
|
|
202
|
+
| `/api/projects/<id>/sessions?source=` | GET | List sessions |
|
|
203
|
+
| `/api/projects/<id>/sessions/<id>?source=` | GET | Fetch session |
|
|
204
|
+
| `/api/sync?source=` | POST | Trigger sync |
|
|
205
|
+
| `/api/status?source=` | GET | Sync status |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Requirements
|
|
210
|
+
|
|
211
|
+
- Python 3.7+
|
|
212
|
+
- Flask 2.0+
|
|
213
|
+
- flask-cors
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Adding New Sources
|
|
218
|
+
|
|
219
|
+
To add support for another CLI-based AI tool, update `app.py`:
|
|
220
|
+
|
|
221
|
+
```python
|
|
222
|
+
SOURCES = {
|
|
223
|
+
"claude-code": {
|
|
224
|
+
"name": "Claude Code",
|
|
225
|
+
"source_dir": Path.home() / ".claude" / "projects",
|
|
226
|
+
"data_subdir": "claude-code"
|
|
227
|
+
},
|
|
228
|
+
"codex": {
|
|
229
|
+
"name": "OpenAI Codex",
|
|
230
|
+
"source_dir": Path.home() / ".codex" / "sessions",
|
|
231
|
+
"data_subdir": "codex"
|
|
232
|
+
},
|
|
233
|
+
"gemini": {
|
|
234
|
+
"name": "Gemini CLI",
|
|
235
|
+
"source_dir": Path.home() / ".gemini" / "tmp",
|
|
236
|
+
"data_subdir": "gemini"
|
|
237
|
+
},
|
|
238
|
+
# Add new tool here
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Then implement the corresponding parser for its log format.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
MIT
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
<div align="center">
|
|
253
|
+
<sub>Built for inspecting what AI coding agents actually did.</sub>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
@misc{clicodelog2026,
|
|
259
|
+
title = {clicodelog: Browse, inspect CLI-based AI coding agents},
|
|
260
|
+
author = {Pal, Ankit},
|
|
261
|
+
year = {2026},
|
|
262
|
+
howpublished = {\url{https://github.com/monk1337/clicodelog}},
|
|
263
|
+
note = {A lightweight, local-first web app to browse, inspect, and export logs from CLI-based AI coding agents — Claude Code, OpenAI Codex, and Gemini CLI.}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## 💁 Contributing
|
|
269
|
+
|
|
270
|
+
Welcome any contributions to open source project, including new features, improvements to infrastructure, and more comprehensive documentation.
|