clicodelog 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.
@@ -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
+ ![Gemini CLI Screenshot](screenshots/dark.png)
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
+ | ![Light Mode](screenshots/light.png) | ![Dark Mode](screenshots/dark.png) |
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,11 @@
1
+ clicodelog/__init__.py,sha256=HYMXrxX39PPodu0qTmWqbgTr09RLzUtl3QNFDQCz_r4,136
2
+ clicodelog/__main__.py,sha256=JDb49rUInCUlT5Ya0aGfusfJm8e7wGqA447mrnVqDkA,119
3
+ clicodelog/app.py,sha256=W-7mQSwcB5N69ZEYhdOkg-fs93wxR4XccPAQ2H1GKO8,37823
4
+ clicodelog/cli.py,sha256=mH_fjEVg2RovP2sPpZPOyIzejnLcvaqi0hf41Xnxnao,1297
5
+ clicodelog/templates/index.html,sha256=kUYQJivjWOLonREjinUsIHvgiGUHbhuJvlLWyjIst9Y,34392
6
+ clicodelog-0.1.0.dist-info/licenses/LICENSE,sha256=enO5ZtMm5_HoQnB9jA_d3CCajd9I6Kzg-m1FmNCsAvk,1065
7
+ clicodelog-0.1.0.dist-info/METADATA,sha256=fVvrn6ehZcS2z3CD_5E64vNVZwR6O6cSaYi1jNWkxNM,8058
8
+ clicodelog-0.1.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
9
+ clicodelog-0.1.0.dist-info/entry_points.txt,sha256=6Zodty_o0mVbDoIcNPQ31aI-P-KLZ0Xr_qsfrQkDYck,51
10
+ clicodelog-0.1.0.dist-info/top_level.txt,sha256=YvkoZJtBm4QSRL2YlLr5TeVILsiptIF7D43i29RG5oc,11
11
+ clicodelog-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ clicodelog = clicodelog.cli:main
@@ -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 @@
1
+ clicodelog