@asifkibria/claude-code-toolkit 1.2.0 → 1.3.0
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.
- package/README.md +126 -113
- package/dist/cli.js +365 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.js +120 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/alerts.d.ts +38 -0
- package/dist/lib/alerts.d.ts.map +1 -0
- package/dist/lib/alerts.js +296 -0
- package/dist/lib/alerts.js.map +1 -0
- package/dist/lib/dashboard-ui.d.ts.map +1 -1
- package/dist/lib/dashboard-ui.js +215 -23
- package/dist/lib/dashboard-ui.js.map +1 -1
- package/dist/lib/dashboard.d.ts +2 -1
- package/dist/lib/dashboard.d.ts.map +1 -1
- package/dist/lib/dashboard.js +159 -10
- package/dist/lib/dashboard.js.map +1 -1
- package/dist/lib/git.d.ts +29 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js +124 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/mcp-validator.d.ts +23 -0
- package/dist/lib/mcp-validator.d.ts.map +1 -1
- package/dist/lib/mcp-validator.js +138 -0
- package/dist/lib/mcp-validator.js.map +1 -1
- package/dist/lib/scanner.d.ts.map +1 -1
- package/dist/lib/scanner.js +103 -5
- package/dist/lib/scanner.js.map +1 -1
- package/dist/lib/search.d.ts +56 -0
- package/dist/lib/search.d.ts.map +1 -0
- package/dist/lib/search.js +284 -0
- package/dist/lib/search.js.map +1 -0
- package/dist/lib/security.d.ts +39 -0
- package/dist/lib/security.d.ts.map +1 -1
- package/dist/lib/security.js +379 -7
- package/dist/lib/security.js.map +1 -1
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +5 -2
- package/dist/lib/storage.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Claude Code Toolkit
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@asifkibria/claude-code-toolkit)
|
|
4
|
+
[](https://www.npmjs.com/package/@asifkibria/claude-code-toolkit)
|
|
4
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://github.com/nicholasgriffintn/claude-code-toolkit)
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
**The ultimate maintenance toolkit for Claude Code.** Fix broken sessions, search conversations, detect secrets & PII, manage storage, and monitor everything through a beautiful web dashboard.
|
|
9
|
+
|
|
10
|
+
> **Love this tool?** Give us a star on GitHub! It helps others discover this project and motivates continued development.
|
|
11
|
+
>
|
|
12
|
+
> [](https://github.com/nicholasgriffintn/claude-code-toolkit)
|
|
13
|
+
|
|
14
|
+
---
|
|
7
15
|
|
|
8
16
|
## Quick Fix
|
|
9
17
|
|
|
@@ -37,6 +45,21 @@ Then ask Claude: "Check your health" or "Fix any issues"
|
|
|
37
45
|
|
|
38
46
|
---
|
|
39
47
|
|
|
48
|
+
## Features Overview
|
|
49
|
+
|
|
50
|
+
| Category | Features |
|
|
51
|
+
|----------|----------|
|
|
52
|
+
| **Session Recovery** | Fix broken sessions, repair corrupted files, extract content |
|
|
53
|
+
| **Search** | Full-text search across all conversations |
|
|
54
|
+
| **Security** | Secret detection, PII scanning, session auditing |
|
|
55
|
+
| **Storage** | Analytics, cleanup, archiving, snapshots |
|
|
56
|
+
| **Monitoring** | Web dashboard, alerts, quotas, real-time updates |
|
|
57
|
+
| **MCP** | Server validation, performance tracking |
|
|
58
|
+
| **Git** | Link sessions to branches/commits |
|
|
59
|
+
| **Cost** | Token usage and API cost estimation |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
40
63
|
## Core Features
|
|
41
64
|
|
|
42
65
|
### 1. Fix Broken Sessions
|
|
@@ -48,145 +71,121 @@ cct scan # See what's wrong
|
|
|
48
71
|
cct fix # Fix it (creates backup automatically)
|
|
49
72
|
```
|
|
50
73
|
|
|
51
|
-
### 2.
|
|
74
|
+
### 2. Search All Conversations
|
|
52
75
|
|
|
53
|
-
|
|
76
|
+
Find anything across all your Claude Code conversations - code snippets, discussions, errors, anything.
|
|
54
77
|
|
|
55
78
|
```bash
|
|
56
|
-
cct
|
|
79
|
+
cct search "API key" # Search all conversations
|
|
80
|
+
cct search "authentication" --role user # Only user messages
|
|
81
|
+
cct search "error" --limit 100 # More results
|
|
57
82
|
```
|
|
58
83
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### 3. Security Scanning
|
|
84
|
+
**Dashboard**: The Search tab provides a visual search interface with filters and highlighted results.
|
|
62
85
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
cct security-scan # Scan all conversations
|
|
67
|
-
cct audit abc123 # Full audit trail of session
|
|
68
|
-
```
|
|
86
|
+
### 3. Web Dashboard
|
|
69
87
|
|
|
70
|
-
|
|
88
|
+
Visual management of your entire Claude Code installation with **15 tabs**:
|
|
71
89
|
|
|
72
90
|
```bash
|
|
73
|
-
cct
|
|
74
|
-
cct archive --days 60 # Archive old conversations
|
|
75
|
-
cct trace clean # Selective trace cleanup
|
|
91
|
+
cct dashboard
|
|
76
92
|
```
|
|
77
93
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
- **Overview** - Quick health metrics
|
|
95
|
+
- **Search** - Full-text search with filters
|
|
96
|
+
- **Storage** - Usage analytics
|
|
97
|
+
- **Sessions** - All sessions with health status
|
|
98
|
+
- **Security** - Secret & PII scanning
|
|
99
|
+
- **Traces** - Data inventory
|
|
100
|
+
- **MCP** - Server status & tools
|
|
101
|
+
- **Logs** - Debug log viewer
|
|
102
|
+
- **Config** - Settings editor
|
|
103
|
+
- **Analytics** - Usage trends
|
|
104
|
+
- **Backups** - Backup management
|
|
105
|
+
- **Context** - Token estimation
|
|
106
|
+
- **Maintenance** - Automated cleanup
|
|
107
|
+
- **Snapshots** - Storage tracking
|
|
108
|
+
- **About** - Version info
|
|
109
|
+
|
|
110
|
+
### 4. Security Scanning
|
|
111
|
+
|
|
112
|
+
Find leaked secrets AND personal data (PII) in your conversations.
|
|
85
113
|
|
|
86
114
|
```bash
|
|
87
|
-
cct scan
|
|
88
|
-
cct
|
|
89
|
-
|
|
115
|
+
cct security-scan # Scan for secrets (API keys, tokens, passwords)
|
|
116
|
+
cct pii-scan # Scan for PII (emails, phones, SSN, credit cards)
|
|
117
|
+
cct pii-scan --details # Show full unmasked values
|
|
118
|
+
cct audit abc123 # Full audit trail of session
|
|
90
119
|
```
|
|
91
120
|
|
|
92
|
-
|
|
121
|
+
**Dashboard**: Security tab shows secrets and PII with one-click redaction.
|
|
93
122
|
|
|
94
|
-
|
|
123
|
+
### 5. Storage Management
|
|
95
124
|
|
|
96
125
|
```bash
|
|
97
|
-
cct
|
|
98
|
-
cct
|
|
126
|
+
cct clean # Remove debug logs, old snapshots
|
|
127
|
+
cct archive --days 60 # Archive old conversations
|
|
128
|
+
cct trace clean # Selective trace cleanup
|
|
99
129
|
```
|
|
100
130
|
|
|
101
|
-
###
|
|
131
|
+
### 6. Git Integration
|
|
102
132
|
|
|
103
|
-
|
|
133
|
+
Link your Claude sessions to git branches and commits.
|
|
104
134
|
|
|
105
135
|
```bash
|
|
106
|
-
cct
|
|
107
|
-
cct recover abc123 # Diagnose the session
|
|
108
|
-
cct recover abc123 --repair # Fix corrupted lines
|
|
109
|
-
cct recover abc123 --extract # Extract salvageable content
|
|
136
|
+
cct git # Show sessions linked to git repos
|
|
110
137
|
```
|
|
111
138
|
|
|
112
|
-
###
|
|
139
|
+
### 7. Cost Estimation
|
|
113
140
|
|
|
114
|
-
|
|
141
|
+
Estimate API costs based on token usage.
|
|
115
142
|
|
|
116
143
|
```bash
|
|
117
|
-
cct
|
|
118
|
-
cct clean --dry-run # Preview cleanup
|
|
119
|
-
cct clean # Remove debug logs, old snapshots
|
|
120
|
-
cct archive --days 30 # Archive old conversations
|
|
144
|
+
cct cost # Show estimated API costs
|
|
121
145
|
```
|
|
122
146
|
|
|
123
|
-
###
|
|
147
|
+
### 8. Alerts & Quotas
|
|
124
148
|
|
|
125
|
-
|
|
149
|
+
Proactive issue detection and usage monitoring.
|
|
126
150
|
|
|
127
151
|
```bash
|
|
128
|
-
cct
|
|
129
|
-
cct
|
|
130
|
-
cct trace wipe --confirm # Secure wipe everything
|
|
131
|
-
cct trace guard --mode paranoid # Auto-delete going forward
|
|
152
|
+
cct alerts # Check for issues and notifications
|
|
153
|
+
cct quotas # Show usage quotas with visual bars
|
|
132
154
|
```
|
|
133
155
|
|
|
134
|
-
|
|
156
|
+
---
|
|
135
157
|
|
|
136
|
-
|
|
158
|
+
## Common Problems & Solutions
|
|
137
159
|
|
|
160
|
+
### Your session is broken
|
|
138
161
|
```bash
|
|
139
|
-
cct
|
|
140
|
-
cct restore /path/to/backup # Restore original
|
|
141
|
-
cct cleanup --days 30 # Delete old backups
|
|
162
|
+
cct scan && cct fix
|
|
142
163
|
```
|
|
143
164
|
|
|
144
|
-
###
|
|
145
|
-
|
|
146
|
-
Track how Claude's storage grows over time. Compare snapshots to see what changed.
|
|
147
|
-
|
|
165
|
+
### Find something you discussed
|
|
148
166
|
```bash
|
|
149
|
-
cct
|
|
150
|
-
# Or via MCP: snapshot, compare, delete-snapshot actions
|
|
167
|
+
cct search "your query"
|
|
151
168
|
```
|
|
152
169
|
|
|
153
|
-
###
|
|
154
|
-
|
|
155
|
-
Something went wrong but you don't know what? Search and filter debug logs by level, component, or text.
|
|
156
|
-
|
|
170
|
+
### Leaked secrets or PII
|
|
157
171
|
```bash
|
|
158
|
-
cct
|
|
159
|
-
|
|
160
|
-
# Search by component or message text
|
|
172
|
+
cct security-scan
|
|
173
|
+
cct pii-scan --details
|
|
161
174
|
```
|
|
162
175
|
|
|
163
|
-
###
|
|
164
|
-
|
|
165
|
-
MCP servers aren't working? Validate configs and test connectivity.
|
|
166
|
-
|
|
176
|
+
### Disk space issues
|
|
167
177
|
```bash
|
|
168
|
-
cct
|
|
169
|
-
cct mcp-validate --test # Test actual connectivity
|
|
170
|
-
cct dashboard # MCP tab shows tools/resources per server
|
|
178
|
+
cct stats && cct clean
|
|
171
179
|
```
|
|
172
180
|
|
|
173
|
-
###
|
|
174
|
-
|
|
175
|
-
Want a visual overview of everything? 14 tabs for complete management.
|
|
176
|
-
|
|
181
|
+
### Session crashed
|
|
177
182
|
```bash
|
|
178
|
-
cct
|
|
179
|
-
cct dashboard --port 9000 # Custom port
|
|
180
|
-
cct dashboard --daemon # Run in background
|
|
183
|
+
cct recover abc123 --repair
|
|
181
184
|
```
|
|
182
185
|
|
|
183
|
-
###
|
|
184
|
-
|
|
185
|
-
Need to export a conversation for backup or sharing?
|
|
186
|
-
|
|
186
|
+
### MCP not working
|
|
187
187
|
```bash
|
|
188
|
-
cct
|
|
189
|
-
cct export -f conversation.jsonl --format json
|
|
188
|
+
cct mcp-validate --test
|
|
190
189
|
```
|
|
191
190
|
|
|
192
191
|
---
|
|
@@ -199,53 +198,56 @@ cct export -f conversation.jsonl --format json
|
|
|
199
198
|
| `cct scan` | Find issues without fixing |
|
|
200
199
|
| `cct fix` | Fix issues (with backup) |
|
|
201
200
|
| `cct dashboard` | Launch web dashboard |
|
|
201
|
+
| `cct search` | **Search all conversations** |
|
|
202
202
|
| `cct stats` | Conversation statistics |
|
|
203
203
|
| `cct context` | Token/context usage |
|
|
204
|
+
| `cct cost` | **API cost estimation** |
|
|
204
205
|
| `cct analytics` | Usage trends and patterns |
|
|
205
206
|
| `cct duplicates` | Find duplicate content |
|
|
206
207
|
| `cct clean` | Clean .claude directory |
|
|
207
208
|
| `cct archive` | Archive old conversations |
|
|
208
209
|
| `cct maintenance` | Automated maintenance |
|
|
209
210
|
| `cct sessions` | List all sessions |
|
|
211
|
+
| `cct diff` | **Compare two sessions** |
|
|
210
212
|
| `cct recover` | Repair crashed sessions |
|
|
211
213
|
| `cct security-scan` | Find leaked secrets |
|
|
214
|
+
| `cct pii-scan` | **Find personal data (PII)** |
|
|
212
215
|
| `cct audit` | Session audit trail |
|
|
213
216
|
| `cct retention` | Apply data retention |
|
|
217
|
+
| `cct git` | **Link sessions to git** |
|
|
218
|
+
| `cct alerts` | **Check for issues** |
|
|
219
|
+
| `cct quotas` | **Show usage quotas** |
|
|
220
|
+
| `cct mcp-validate` | Validate MCP configs |
|
|
221
|
+
| `cct mcp-perf` | **MCP performance stats** |
|
|
214
222
|
| `cct trace` | Trace inventory |
|
|
215
223
|
| `cct trace clean` | Selective cleanup |
|
|
216
224
|
| `cct trace wipe` | Secure wipe |
|
|
217
|
-
| `cct mcp-validate` | Validate MCP configs |
|
|
218
225
|
| `cct backups` | List backups |
|
|
219
226
|
| `cct restore` | Restore from backup |
|
|
220
227
|
| `cct cleanup` | Delete old backups |
|
|
221
228
|
| `cct export` | Export conversation |
|
|
222
229
|
|
|
223
|
-
## Common Options
|
|
224
|
-
|
|
225
|
-
| Option | Used with | Description |
|
|
226
|
-
|--------|-----------|-------------|
|
|
227
|
-
| `--dry-run` | Most commands | Preview without changes |
|
|
228
|
-
| `--days N` | clean, archive, retention | Age threshold |
|
|
229
|
-
| `-f, --file` | scan, fix, export | Target specific file |
|
|
230
|
-
| `--port N` | dashboard | Custom port (default: 1405) |
|
|
231
|
-
| `--test` | mcp-validate | Test connectivity |
|
|
232
|
-
| `--repair` | recover | Attempt repair |
|
|
233
|
-
| `--extract` | recover | Extract content |
|
|
234
|
-
| `--confirm` | trace wipe | Required for wipe |
|
|
235
|
-
|
|
236
230
|
---
|
|
237
231
|
|
|
238
232
|
## MCP Server Tools
|
|
239
233
|
|
|
240
234
|
When installed as MCP server, Claude can use these tools directly:
|
|
241
235
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
236
|
+
| Tool | Description |
|
|
237
|
+
|------|-------------|
|
|
238
|
+
| `health_check` | System health |
|
|
239
|
+
| `scan_image_issues` / `fix_image_issues` | Content fixes |
|
|
240
|
+
| `security_scan` / `scan_pii` | Security scanning |
|
|
241
|
+
| `search_conversations` | Full-text search |
|
|
242
|
+
| `estimate_cost` | Cost estimation |
|
|
243
|
+
| `git_integration` | Git linking |
|
|
244
|
+
| `check_alerts` / `check_quotas` | Monitoring |
|
|
245
|
+
| `mcp_performance` | MCP stats |
|
|
246
|
+
| `audit_session` | Session auditing |
|
|
247
|
+
| `clean_claude_directory` / `clean_traces` | Cleanup |
|
|
248
|
+
| `list_sessions` / `recover_session` | Session management |
|
|
249
|
+
| `validate_mcp_config` | MCP validation |
|
|
250
|
+
| `start_dashboard` | Launch dashboard |
|
|
249
251
|
|
|
250
252
|
---
|
|
251
253
|
|
|
@@ -253,17 +255,28 @@ When installed as MCP server, Claude can use these tools directly:
|
|
|
253
255
|
|
|
254
256
|
1. Locates Claude Code data in `~/.claude/projects/`
|
|
255
257
|
2. Scans `.jsonl` conversation files
|
|
256
|
-
3. Detects oversized content
|
|
257
|
-
4.
|
|
258
|
-
5.
|
|
258
|
+
3. Detects oversized content, secrets, PII, and issues
|
|
259
|
+
4. Provides fixes with automatic backups
|
|
260
|
+
5. Offers visual dashboard for complete management
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Support This Project
|
|
265
|
+
|
|
266
|
+
If Claude Code Toolkit has helped you:
|
|
267
|
+
|
|
268
|
+
- **Star the repo** - It really helps! [](https://github.com/nicholasgriffintn/claude-code-toolkit)
|
|
269
|
+
- **Share with colleagues** - Help others discover this tool
|
|
270
|
+
- **Report bugs** - Open issues on GitHub
|
|
271
|
+
- **Contribute** - PRs welcome!
|
|
259
272
|
|
|
260
273
|
---
|
|
261
274
|
|
|
262
275
|
## Links
|
|
263
276
|
|
|
264
277
|
- [npm](https://www.npmjs.com/package/@asifkibria/claude-code-toolkit)
|
|
265
|
-
- [GitHub](https://github.com/
|
|
266
|
-
- [
|
|
278
|
+
- [GitHub](https://github.com/nicholasgriffintn/claude-code-toolkit)
|
|
279
|
+
- [Issues](https://github.com/nicholasgriffintn/claude-code-toolkit/issues)
|
|
267
280
|
|
|
268
281
|
## License
|
|
269
282
|
|