@asifkibria/claude-code-toolkit
v1.4.2
Published
MCP server and CLI toolkit for maintaining, optimizing, and troubleshooting Claude Code installations
Downloads
561
Maintainers
Readme
Claude Code Toolkit
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.
Love this tool? Give us a star on GitHub! It helps others discover this project and motivates continued development.
Quick Fix
# Your session is broken? Fix it in 10 seconds
npx @asifkibria/claude-code-toolkit fix
# Restart Claude Code - you're backInstallation
# Global install (recommended)
npm install -g @asifkibria/claude-code-toolkit
# Use the short alias everywhere
cct health
cct dashboardAdd as MCP Server
Let Claude maintain itself:
claude mcp add --scope user toolkit -- npx -y @asifkibria/claude-code-toolkit claude-code-toolkit-serverThen ask Claude: "Check your health" or "Fix any issues"
Features Overview
| Category | Features | |----------|----------| | Session Recovery | Fix broken sessions, repair corrupted files, extract content | | Search | Full-text search across all conversations | | Security | Secret detection, PII scanning, session auditing | | Storage | Analytics, cleanup, archiving, snapshots, project purge | | Monitoring | Web dashboard, alerts, quotas, real-time updates | | MCP | Server validation, performance tracking | | Git | Link sessions to branches/commits | | Cost | Token usage and API cost estimation |
Core Features
1. Fix Broken Sessions
When you upload an oversized image/PDF, your entire conversation breaks. This fixes it.
cct scan # See what's wrong
cct fix # Fix it (creates backup automatically)2. Search All Conversations
Find anything across all your Claude Code conversations - code snippets, discussions, errors, anything.
cct search "API key" # Search all conversations
cct search "authentication" --role user # Only user messages
cct search "error" --limit 100 # More resultsDashboard: The Search tab provides a visual search interface with filters and highlighted results.
3. Web Dashboard
Visual management of your entire Claude Code installation with 15 tabs:
cct dashboard- Overview - Quick health metrics
- Search - Full-text search with filters
- Storage - Usage analytics
- Sessions - All sessions with health status
- Security - Secret & PII scanning
- Traces - Data inventory
- MCP - Server status & tools
- Logs - Debug log viewer
- Config - Settings editor
- Analytics - Usage trends
- Backups - Backup management
- Context - Token estimation
- Maintenance - Automated cleanup
- Snapshots - Storage tracking
- About - Version info
4. Security Scanning
Find leaked secrets AND personal data (PII) in your conversations.
cct security-scan # Scan for secrets (API keys, tokens, passwords)
cct pii-scan # Scan for PII (emails, phones, SSN, credit cards)
cct pii-scan --details # Show full unmasked values
cct audit abc123 # Full audit trail of sessionDashboard: Security tab shows secrets and PII with one-click redaction.
5. Storage Management
cct clean # Remove debug logs, old snapshots
cct archive --days 60 # Archive old conversations
cct trace clean # Selective trace cleanup5b. Project-Level Cleanup
Delete all sessions, files, and directories for a specific project.
cct bulk-delete --project "my-app" # Delete sessions for a project
cct bulk-archive --project "my-app" # Archive sessions for a project
cct bulk-delete --project "my-app" --days 30 # Only sessions older than 30 daysDashboard: The Sessions tab has a project filter dropdown with Archive All, Delete Sessions, and Purge Project buttons. Purge removes the entire project directory from ~/.claude/projects/.
6. Git Integration
Link your Claude sessions to git branches and commits.
cct git # Show sessions linked to git repos7. Cost Estimation
Estimate API costs based on token usage.
cct cost # Show estimated API costs8. Alerts & Quotas
Proactive issue detection and usage monitoring.
cct alerts # Check for issues and notifications
cct quotas # Show usage quotas with visual barsCommon Problems & Solutions
Your session is broken
cct scan && cct fixFind something you discussed
cct search "your query"Leaked secrets or PII
cct security-scan
cct pii-scan --detailsDisk space issues
cct stats && cct cleanSession crashed
cct recover abc123 --repairMCP not working
cct mcp-validate --testAll Commands
| Command | What it does |
|---------|--------------|
| cct health | Quick system health check |
| cct scan | Find issues without fixing |
| cct fix | Fix issues (with backup) |
| cct dashboard | Launch web dashboard |
| cct search | Search all conversations |
| cct stats | Conversation statistics |
| cct context | Token/context usage |
| cct cost | API cost estimation |
| cct analytics | Usage trends and patterns |
| cct duplicates | Find duplicate content |
| cct clean | Clean .claude directory |
| cct archive | Archive old conversations |
| cct maintenance | Automated maintenance |
| cct sessions | List all sessions |
| cct diff | Compare two sessions |
| cct recover | Repair crashed sessions |
| cct security-scan | Find leaked secrets |
| cct pii-scan | Find personal data (PII) |
| cct audit | Session audit trail |
| cct retention | Apply data retention |
| cct git | Link sessions to git |
| cct alerts | Check for issues |
| cct quotas | Show usage quotas |
| cct mcp-validate | Validate MCP configs |
| cct mcp-perf | MCP performance stats |
| cct trace | Trace inventory |
| cct trace clean | Selective cleanup |
| cct trace wipe | Secure wipe |
| cct backups | List backups |
| cct restore | Restore from backup |
| cct cleanup | Delete old backups |
| cct export | Export conversation |
| cct bulk-delete | Delete sessions by project/age |
| cct bulk-archive | Archive sessions by project/age |
| cct bulk-export | Export multiple sessions |
MCP Server Tools
When installed as MCP server, Claude can use these tools directly:
| Tool | Description |
|------|-------------|
| health_check | System health |
| scan_image_issues / fix_image_issues | Content fixes |
| security_scan / scan_pii | Security scanning |
| search_conversations | Full-text search |
| estimate_cost | Cost estimation |
| git_integration | Git linking |
| check_alerts / check_quotas | Monitoring |
| mcp_performance | MCP stats |
| audit_session | Session auditing |
| clean_claude_directory / clean_traces | Cleanup |
| list_sessions / recover_session | Session management |
| validate_mcp_config | MCP validation |
| start_dashboard | Launch dashboard |
How It Works
- Locates Claude Code data in
~/.claude/projects/ - Scans
.jsonlconversation files - Detects oversized content, secrets, PII, and issues
- Provides fixes with automatic backups
- Offers visual dashboard for complete management
Support This Project
If Claude Code Toolkit has helped you:
- Star the repo - It really helps!
- Share with colleagues - Help others discover this tool
- Report bugs - Open issues on GitHub
- Contribute - PRs welcome!
Links
License
MIT
Made for the Claude Code community
