https://github.com/melagiri/code-insights
Turn your AI coding sessions into knowledge.
https://github.com/melagiri/code-insights
agent-rules ai-coding ai-coding-tools developer-tools prompt-engineering
Last synced: 10 days ago
JSON representation
Turn your AI coding sessions into knowledge.
- Host: GitHub
- URL: https://github.com/melagiri/code-insights
- Owner: melagiri
- License: mit
- Created: 2026-01-21T06:22:04.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-04-12T03:20:30.000Z (15 days ago)
- Last Synced: 2026-04-12T05:07:58.523Z (15 days ago)
- Topics: agent-rules, ai-coding, ai-coding-tools, developer-tools, prompt-engineering
- Language: TypeScript
- Homepage: https://code-insights.app
- Size: 71.4 MB
- Stars: 41
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Roadmap: docs/ROADMAP.md
- Agents: docs/AGENTS.md
Awesome Lists containing this project
- awesome-ai-devtools - Code Insights - first CLI and dashboard for analyzing AI coding sessions from Claude Code, Cursor, Codex CLI, Copilot CLI, and VS Code Copilot Chat. SQLite-backed with terminal analytics, browser dashboard, and LLM-powered insights. (Agent Infrastructure / Usage Analytics & Cost Tracking)
- awesome-claude-code-toolkit - Code Insights - first CLI and dashboard for analyzing AI coding sessions from Claude Code, Cursor, Codex CLI, Copilot CLI, and VS Code Copilot. SQLite-backed with terminal analytics, browser dashboard, and LLM-powered insights | (Ecosystem / Quick Setup with cc-safe-setup)
README
Code Insights
Turn your AI coding sessions into knowledge.
Extract decisions, learnings, and prompt quality scores. Detect patterns. Get better at working with AI.
```bash
npx @code-insights/cli
```
Analyzes your sessions from **Claude Code, Cursor, Codex CLI, Copilot CLI, and VS Code Copilot Chat** to extract structured insights — decisions with trade-offs, learnings with root causes, prompt quality with actionable feedback, and cross-session patterns that surface what's working and what's not. All stored locally in SQLite, browsable through terminal analytics and a built-in dashboard.
**No accounts. No cloud. No data leaves your machine.**
---
> **Claude Code users: zero-config analysis, zero cost.**
> Install the hook once. Every session gets analyzed automatically using your Claude subscription.
> ```bash
> code-insights install-hook
> ```
---
> **Works with Ollama — free, local, zero API keys.**
> If you have [Ollama](https://ollama.com) installed, `code-insights` will detect it automatically and use it for AI analysis. No account, no cost, no data leaves your machine.
>
> ```bash
> ollama pull llama3.3 # recommended
> npx @code-insights/cli # Ollama detected automatically
> ```
---
## What You Get
### Decisions, Learnings & Prompt Quality
Each session is analyzed to extract structured insights — decisions with trade-offs and alternatives, learnings with root causes, and prompt quality scores across 5 dimensions with actionable before/after takeaways.
### Cross-Session Patterns
Weekly synthesis detects friction points, effective patterns, and prompt quality trends across all your sessions. Navigate week-by-week to see how your habits evolve — and export generated rules for your CLAUDE.md or .cursorrules.
### AI Fluency Score
All of the above rolls up into your AI Fluency Score — a shareable snapshot of your coding fingerprint, working style, and top patterns.
### Analytics & Cost Tracking
Activity charts, cost breakdown by project and model, session types, and multi-tool usage — all in one dashboard.
### Terminal Analytics
Don't need a browser? `code-insights stats` gives you the full picture from the terminal.
---
## Supported AI Tools
| Tool | Data Location |
|------|---------------|
| Claude Code | `~/.claude/projects/**/*.jsonl` |
| Cursor | Workspace storage SQLite (macOS, Linux, Windows) |
| Codex CLI | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` |
| Copilot CLI | `~/.copilot/session-state/{id}/events.jsonl` |
| VS Code Copilot Chat | Platform-specific Copilot Chat storage |
Sessions from all tools are discovered automatically during sync.
---
## Quick Start
```bash
# Try instantly (no install needed)
npx @code-insights/cli
# Or install globally
npm install -g @code-insights/cli
code-insights # sync sessions + open dashboard
code-insights install-hook # auto-sync + auto-analyze on session end
```
### Common Commands
```bash
code-insights # sync + open dashboard (zero-config)
code-insights stats # terminal analytics (last 7 days)
code-insights stats today # today's sessions
code-insights stats cost # cost breakdown by project and model
code-insights dashboard # start dashboard server
code-insights sync # sync sessions only
code-insights sync --source cursor # sync from a specific tool
code-insights reflect # cross-session pattern synthesis
code-insights reflect --week 2026-W11 # reflect on a specific week
code-insights config llm # configure LLM provider
code-insights install-hook # auto-sync + auto-analyze when sessions end
```
See [`cli/README.md`](cli/README.md) for the full CLI reference.
---
## Architecture
```
Session files (Claude Code, Cursor, Codex CLI, Copilot CLI, VS Code Copilot Chat)
│
▼
┌──────────────────┐
│ CLI Providers │ discover + parse sessions
└──────────────────┘
│
▼
┌──────────────────┐
│ SQLite Database │ ~/.code-insights/data.db
└──────────────────┘
│ │
┌─────────┘ └──────────┐
▼ ▼
┌───────────────┐ ┌──────────────────┐
│ stats/reflect │ │ Hono API server │
│ (terminal) │ │ + React SPA │
└───────────────┘ │ localhost:7890 │
└──────────────────┘
│
▼
┌──────────────────┐
│ LLM Providers │ analysis, facets,
│(API key or Ollama)│ reflect, export
└──────────────────┘
```
The monorepo contains three packages:
- **`cli/`** — Node.js CLI, session providers, SQLite writes, terminal analytics
- **`server/`** — Hono API server, REST endpoints, LLM proxy (API keys stay server-side)
- **`dashboard/`** — Vite + React SPA, served by the Hono server
## Development
```bash
git clone https://github.com/melagiri/code-insights.git
cd code-insights
pnpm install
pnpm build
cd cli && npm link
code-insights --version
```
See [`cli/README.md`](cli/README.md) for the full CLI reference, and [`CONTRIBUTING.md`](CONTRIBUTING.md) for contribution guidelines.
## Privacy
Session data stays on your machine in `~/.code-insights/data.db`. No accounts, no cloud sync. Anonymous usage telemetry is opt-out (`code-insights telemetry disable`). LLM analysis uses your own API key (or Ollama locally) — session content goes only to the provider you configure.
## License
MIT — see [LICENSE](LICENSE) for details.