# code-insights
**Repository Path**: mefaso/code-insights
## Basic Information
- **Project Name**: code-insights
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-03-31
- **Last Updated**: 2026-03-31
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## 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.**
---
> **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
```
### 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 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.