{"id":45161701,"url":"https://github.com/melagiri/code-insights","last_synced_at":"2026-04-17T04:05:31.713Z","repository":{"id":333825610,"uuid":"1138806810","full_name":"melagiri/code-insights","owner":"melagiri","description":"Turn your AI coding sessions into knowledge.","archived":false,"fork":false,"pushed_at":"2026-04-12T03:20:30.000Z","size":74893,"stargazers_count":41,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-12T05:07:58.523Z","etag":null,"topics":["agent-rules","ai-coding","ai-coding-tools","developer-tools","prompt-engineering"],"latest_commit_sha":null,"homepage":"https://code-insights.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melagiri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"docs/AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-21T06:22:04.000Z","updated_at":"2026-04-12T03:20:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"2447c58c-f9c4-4a38-bf3f-49d93cda2075","html_url":"https://github.com/melagiri/code-insights","commit_stats":null,"previous_names":["melagiri/claudeinsights","melagiri/code-insights"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/melagiri/code-insights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melagiri%2Fcode-insights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melagiri%2Fcode-insights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melagiri%2Fcode-insights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melagiri%2Fcode-insights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melagiri","download_url":"https://codeload.github.com/melagiri/code-insights/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melagiri%2Fcode-insights/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-rules","ai-coding","ai-coding-tools","developer-tools","prompt-engineering"],"created_at":"2026-02-20T06:02:51.828Z","updated_at":"2026-04-17T04:05:31.697Z","avatar_url":"https://github.com/melagiri.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/logo.svg\" width=\"120\" height=\"120\" alt=\"Code Insights logo\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eCode Insights\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@code-insights/cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@code-insights/cli\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@code-insights/cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@code-insights/cli\" alt=\"npm downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/melagiri/code-insights/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@code-insights/cli\" alt=\"license\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://nodejs.org\"\u003e\u003cimg src=\"https://img.shields.io/node/v/@code-insights/cli\" alt=\"node version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://socket.dev/npm/package/@code-insights/cli\"\u003e\u003cimg src=\"https://badge.socket.dev/npm/package/@code-insights/cli\" alt=\"Socket Badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eTurn your AI coding sessions into knowledge.\u003c/strong\u003e\u003cbr/\u003e\n  Extract decisions, learnings, and prompt quality scores. Detect patterns. Get better at working with AI.\n\u003c/p\u003e\n\n```bash\nnpx @code-insights/cli\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/patterns-light.png\" alt=\"Patterns — friction points, effective patterns, prompt quality, working style\" width=\"800\" /\u003e\n\u003c/p\u003e\n\nAnalyzes 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.\n\n**No accounts. No cloud. No data leaves your machine.**\n\n---\n\n\u003e **Claude Code users: zero-config analysis, zero cost.**\n\u003e Install the hook once. Every session gets analyzed automatically using your Claude subscription.\n\u003e ```bash\n\u003e code-insights install-hook\n\u003e ```\n\n---\n\n\u003e **Works with Ollama — free, local, zero API keys.**\n\u003e 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.\n\u003e\n\u003e ```bash\n\u003e ollama pull llama3.3        # recommended\n\u003e npx @code-insights/cli      # Ollama detected automatically\n\u003e ```\n\n---\n\n## What You Get\n\n### Decisions, Learnings \u0026 Prompt Quality\n\nEach 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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/session-insight-light.png\" alt=\"Session detail — insights, prompt quality, summary, decisions\" width=\"800\" /\u003e\n\u003c/p\u003e\n\n### Cross-Session Patterns\n\nWeekly 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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/patterns-rules-light.png\" alt=\"Patterns — friction points, effective patterns, generated rules\" width=\"800\" /\u003e\n\u003c/p\u003e\n\n### AI Fluency Score\n\nAll of the above rolls up into your AI Fluency Score — a shareable snapshot of your coding fingerprint, working style, and top patterns.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/code-insights-ai-fluency-score.png\" alt=\"AI Fluency Score — your coding fingerprint\" width=\"600\" /\u003e\n\u003c/p\u003e\n\n### Analytics \u0026 Cost Tracking\n\nActivity charts, cost breakdown by project and model, session types, and multi-tool usage — all in one dashboard.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/analytics-light.png\" alt=\"Analytics — activity charts, model usage, cost breakdown, project table\" width=\"800\" /\u003e\n\u003c/p\u003e\n\n### Terminal Analytics\n\nDon't need a browser? `code-insights stats` gives you the full picture from the terminal.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/screenshots/stats.png\" alt=\"Terminal stats — sessions, cost, activity chart, top projects\" width=\"500\" /\u003e\n\u003c/p\u003e\n\n---\n\n## Supported AI Tools\n\n| Tool | Data Location |\n|------|---------------|\n| Claude Code | `~/.claude/projects/**/*.jsonl` |\n| Cursor | Workspace storage SQLite (macOS, Linux, Windows) |\n| Codex CLI | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` |\n| Copilot CLI | `~/.copilot/session-state/{id}/events.jsonl` |\n| VS Code Copilot Chat | Platform-specific Copilot Chat storage |\n\nSessions from all tools are discovered automatically during sync.\n\n---\n\n## Quick Start\n\n```bash\n# Try instantly (no install needed)\nnpx @code-insights/cli\n\n# Or install globally\nnpm install -g @code-insights/cli\ncode-insights                          # sync sessions + open dashboard\ncode-insights install-hook             # auto-sync + auto-analyze on session end\n```\n\n### Common Commands\n\n```bash\ncode-insights                          # sync + open dashboard (zero-config)\ncode-insights stats                    # terminal analytics (last 7 days)\ncode-insights stats today              # today's sessions\ncode-insights stats cost               # cost breakdown by project and model\ncode-insights dashboard                # start dashboard server\ncode-insights sync                     # sync sessions only\ncode-insights sync --source cursor     # sync from a specific tool\ncode-insights reflect                  # cross-session pattern synthesis\ncode-insights reflect --week 2026-W11  # reflect on a specific week\ncode-insights config llm               # configure LLM provider\ncode-insights install-hook             # auto-sync + auto-analyze when sessions end\n```\n\nSee [`cli/README.md`](cli/README.md) for the full CLI reference.\n\n---\n\n## Architecture\n\n```\nSession files (Claude Code, Cursor, Codex CLI, Copilot CLI, VS Code Copilot Chat)\n                          │\n                          ▼\n               ┌──────────────────┐\n               │   CLI Providers  │  discover + parse sessions\n               └──────────────────┘\n                          │\n                          ▼\n               ┌──────────────────┐\n               │  SQLite Database │  ~/.code-insights/data.db\n               └──────────────────┘\n                    │          │\n          ┌─────────┘          └──────────┐\n          ▼                               ▼\n  ┌───────────────┐            ┌──────────────────┐\n  │  stats/reflect │            │  Hono API server │\n  │  (terminal)    │            │  + React SPA     │\n  └───────────────┘            │  localhost:7890   │\n                               └──────────────────┘\n                                        │\n                                        ▼\n                               ┌──────────────────┐\n                               │  LLM Providers   │  analysis, facets,\n                               │(API key or Ollama)│  reflect, export\n                               └──────────────────┘\n```\n\nThe monorepo contains three packages:\n- **`cli/`** — Node.js CLI, session providers, SQLite writes, terminal analytics\n- **`server/`** — Hono API server, REST endpoints, LLM proxy (API keys stay server-side)\n- **`dashboard/`** — Vite + React SPA, served by the Hono server\n\n## Development\n\n```bash\ngit clone https://github.com/melagiri/code-insights.git\ncd code-insights\npnpm install\npnpm build\ncd cli \u0026\u0026 npm link\ncode-insights --version\n```\n\nSee [`cli/README.md`](cli/README.md) for the full CLI reference, and [`CONTRIBUTING.md`](CONTRIBUTING.md) for contribution guidelines.\n\n## Privacy\n\nSession 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.\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":["Agent Infrastructure","Ecosystem"],"sub_categories":["Usage Analytics \u0026 Cost Tracking","Quick Setup with cc-safe-setup"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelagiri%2Fcode-insights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelagiri%2Fcode-insights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelagiri%2Fcode-insights/lists"}