claude-code-insights 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.
- claude_code_insights-0.1.0.dist-info/METADATA +127 -0
- claude_code_insights-0.1.0.dist-info/RECORD +8 -0
- claude_code_insights-0.1.0.dist-info/WHEEL +4 -0
- claude_code_insights-0.1.0.dist-info/entry_points.txt +2 -0
- claude_code_insights-0.1.0.dist-info/licenses/LICENSE +21 -0
- claude_insights/__init__.py +3 -0
- claude_insights/__main__.py +6 -0
- claude_insights/cli.py +1287 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: claude-code-insights
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local session-history browser, token/cost analytics, and productivity insights for Claude Code.
|
|
5
|
+
Project-URL: Homepage, https://github.com/pragnesh12/claude-code-insights
|
|
6
|
+
Project-URL: Repository, https://github.com/pragnesh12/claude-code-insights
|
|
7
|
+
Project-URL: Issues, https://github.com/pragnesh12/claude-code-insights/issues
|
|
8
|
+
Author-email: Pragnesh Rana <pragnesh.rana@nyusoft.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: analytics,claude,claude-code,cli,productivity,tokens
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Provides-Extra: tokens
|
|
25
|
+
Requires-Dist: tiktoken>=0.5; extra == 'tokens'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
<div align="center">
|
|
29
|
+
|
|
30
|
+
# ◆ claude-code-insights
|
|
31
|
+
|
|
32
|
+
**Turn your Claude Code session history into a browsable dashboard — with token, cost, and productivity analytics. 100% local.**
|
|
33
|
+
|
|
34
|
+
[](https://pypi.org/project/claude-code-insights/)
|
|
35
|
+
[](https://pypi.org/project/claude-code-insights/)
|
|
36
|
+
[](LICENSE)
|
|
37
|
+
[](#privacy)
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
`claude-code-insights` reads the `.jsonl` transcripts Claude Code already keeps under
|
|
44
|
+
`~/.claude/projects/`, builds a single self-contained `claude_insights.html` you open in any
|
|
45
|
+
browser, and prints a quick summary to your terminal. No server, no upload, no account.
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Claude Insights — 128 sessions · 14 projects
|
|
49
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
50
|
+
Est. tokens: 678K input · 388K output
|
|
51
|
+
Est. cost: ~$13.08 (Opus pricing)
|
|
52
|
+
Top tool: Bash (621 calls)
|
|
53
|
+
Busiest day: 2026-06-23 (52 prompts)
|
|
54
|
+
Longest session: Refactor auth flow (4h 12m)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
<!--
|
|
58
|
+
📸 Add a screenshot to make this shine: save a PNG of the dashboard to docs/screenshot.png,
|
|
59
|
+
then uncomment the block below.
|
|
60
|
+
|
|
61
|
+
<div align="center">
|
|
62
|
+
<img src="docs/screenshot.png" alt="claude-code-insights dashboard" width="820">
|
|
63
|
+
</div>
|
|
64
|
+
-->
|
|
65
|
+
|
|
66
|
+
## Three views
|
|
67
|
+
|
|
68
|
+
| View | What you get |
|
|
69
|
+
|------|--------------|
|
|
70
|
+
| 🗂️ **History** | Search and filter every session, read full conversations, and export one or all of them to Markdown, CSV, JSON, HTML, or plain text. |
|
|
71
|
+
| 📊 **Analytics** | Estimated token usage and cost, cost-by-project and tool-usage charts, input/output token ratio, your most expensive sessions, and automatic insights (cost spikes, tool-heavy or very long sessions, streaks). |
|
|
72
|
+
| 🔥 **Productivity** | Prompts-per-day trend, an hour-by-day activity heatmap, current/longest streaks, busiest projects, prompt-length distribution, session durations, and clustering of repeated prompt patterns. |
|
|
73
|
+
|
|
74
|
+
## Install
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pipx install claude-code-insights # recommended
|
|
78
|
+
# or
|
|
79
|
+
uvx claude-code-insights # run without installing
|
|
80
|
+
# or
|
|
81
|
+
pip install claude-code-insights # into the current environment
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For more accurate token counts (uses `tiktoken`):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pipx install "claude-code-insights[tokens]"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Usage
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
claude-insights # write claude_insights.html + print a summary
|
|
94
|
+
claude-insights --open # also open the report in your browser
|
|
95
|
+
claude-insights --cli-only # terminal summary only, skip the HTML
|
|
96
|
+
claude-insights --dir PATH # use a custom projects directory
|
|
97
|
+
claude-insights --out FILE # custom HTML output filename
|
|
98
|
+
claude-insights --version
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
You can also run it as a module: `python3 -m claude_insights --open`.
|
|
102
|
+
|
|
103
|
+
## Privacy
|
|
104
|
+
|
|
105
|
+
Everything runs on your machine — nothing is uploaded anywhere. The generated HTML embeds your
|
|
106
|
+
prompts and responses, which may contain file paths, code, and secrets. **Review the file before
|
|
107
|
+
sharing it with anyone.**
|
|
108
|
+
|
|
109
|
+
## A note on cost figures
|
|
110
|
+
|
|
111
|
+
Cost numbers are **estimates**, not real API charges. They multiply estimated token counts by
|
|
112
|
+
Claude **Opus** pricing ($5 / $25 per 1M input / output tokens) — your actual model and rates may
|
|
113
|
+
differ. Treat them as a relative signal, not a bill.
|
|
114
|
+
|
|
115
|
+
## Development
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/pragnesh12/claude-code-insights
|
|
119
|
+
cd claude-code-insights
|
|
120
|
+
pip install -e ".[tokens]"
|
|
121
|
+
claude-insights --help
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
[MIT](LICENSE) · An unofficial tool — not affiliated with or endorsed by Anthropic. "Claude" and
|
|
127
|
+
"Claude Code" are trademarks of Anthropic.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
claude_insights/__init__.py,sha256=RoRF1x6jrXO8v1OFtVqXIwvWi2hdwOnvq4o0I3t3Ni0,114
|
|
2
|
+
claude_insights/__main__.py,sha256=yTSfNIgazybVncbQHcOfwg0tLKHplX1eacSxfAAL2uc,120
|
|
3
|
+
claude_insights/cli.py,sha256=yqtfZ_YURGDVEs3eR4Y9H2aemqmM2lOmrOjRsXfVbTs,56936
|
|
4
|
+
claude_code_insights-0.1.0.dist-info/METADATA,sha256=H5c9b__IEyUrp-7IeDIiCMQ4UK8aXZg4T7OoaHIE_kE,5013
|
|
5
|
+
claude_code_insights-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
6
|
+
claude_code_insights-0.1.0.dist-info/entry_points.txt,sha256=G0I51_8o8ddcJutWh58c3U9uz8e92h0-jispqndEVZI,61
|
|
7
|
+
claude_code_insights-0.1.0.dist-info/licenses/LICENSE,sha256=5MZSEPMfBfCR-vAStEG27493zOAp-gUSwyzC_lj4kwk,1070
|
|
8
|
+
claude_code_insights-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pragnesh Rana
|
|
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.
|