{"id":48076967,"url":"https://github.com/f/agentlytics","last_synced_at":"2026-04-04T14:50:57.423Z","repository":{"id":342750189,"uuid":"1174916535","full_name":"f/agentlytics","owner":"f","description":"Comprehensive analytics dashboard for AI coding agents — Cursor, Windsurf, Claude Code, VS Code Copilot, Zed, Antigravity, OpenCode, Command Code","archived":false,"fork":false,"pushed_at":"2026-03-25T09:04:18.000Z","size":5573,"stargazers_count":356,"open_issues_count":7,"forks_count":37,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-26T12:46:53.898Z","etag":null,"topics":["agentlytics","ai-coding-assistant","analytics","claude-code","cursor","dashboard","local-first","macos","nodejs","opencode","react","sqlite","vscode-copilot","windsurf","zed"],"latest_commit_sha":null,"homepage":"https://agentlytics.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T01:39:41.000Z","updated_at":"2026-03-26T08:32:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/f/agentlytics","commit_stats":null,"previous_names":["f/agentlytics"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/f/agentlytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fagentlytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fagentlytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fagentlytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fagentlytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f","download_url":"https://codeload.github.com/f/agentlytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fagentlytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agentlytics","ai-coding-assistant","analytics","claude-code","cursor","dashboard","local-first","macos","nodejs","opencode","react","sqlite","vscode-copilot","windsurf","zed"],"created_at":"2026-04-04T14:50:56.146Z","updated_at":"2026-04-04T14:50:57.415Z","avatar_url":"https://github.com/f.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"misc/logo.svg\" width=\"120\" alt=\"Agentlytics\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAgentlytics\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eYour Cursor, Windsurf, Claude Code sessions — analyzed, unified, tracked.\u003c/strong\u003e\u003cbr\u003e\n  \u003csub\u003eOne command to turn scattered AI conversations from \u003cb\u003e16 editors\u003c/b\u003e into a unified analytics dashboard.\u003cbr\u003eSessions, costs, models, tools — finally in one place. 100% local.\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/agentlytics\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/agentlytics?color=6366f1\u0026label=npm\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"#supported-editors\"\u003e\u003cimg src=\"https://img.shields.io/badge/editors-16-818cf8\" alt=\"editors\"\u003e\u003c/a\u003e\n  \u003ca href=\"#license\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://nodejs.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/node-%E2%89%A520.19%20%7C%20%E2%89%A522.12-brightgreen\" alt=\"node\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://deno.land\"\u003e\u003cimg src=\"https://img.shields.io/badge/deno-%E2%89%A52.0-000?logo=deno\" alt=\"deno\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"misc/screenshot.png\" alt=\"Agentlytics dashboard\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n---\n\n## The Problem\n\nYou switch between Cursor, Windsurf, Claude Code, VS Code Copilot, and more — each with its own siloed conversation history.\n\n- ✗ Sessions scattered across editors, no unified view\n- ✗ No idea how much you're spending on AI tokens\n- ✗ Can't compare which editor is more effective\n- ✗ Can't search across all your AI conversations\n- ✗ No way to share session context with your team\n- ✗ No unified view of your plans, credits, and rate limits\n\n## The Solution\n\n**One command. Full picture. All local.**\n\n```bash\nnpx agentlytics\n# or\npnpm dlx agentlytics\n# or\nyarn dlx agentlytics\n# or\nbunx agentlytics\n```\n\nOpens at **http://localhost:4637**. Requires Node.js ≥ 20.19 or ≥ 22.12, macOS. No data ever leaves your machine.\n\n### Deno (Sandboxed)\n\nRun a lightweight, zero-dependency analytics scan with Deno's permission sandbox — directly from a URL, no install needed:\n\n```bash\ndeno run --allow-read --allow-env https://raw.githubusercontent.com/f/agentlytics/master/mod.ts\n```\n\nOnly `--allow-read` and `--allow-env` are required. No network access, no file writes, no code execution — just reads your local editor data and prints a summary.\n\n```\n  (● ●) [● ●]   Agentlytics — Deno Sandboxed Edition\n  {● ●} \u003c● ●\u003e   Lightweight CLI analytics for AI coding agents\n\n  ✓ Claude Code            8 sessions\n  ✓ VS Code                23 sessions\n  ✓ VS Code Insiders       66 sessions\n  ● Cursor                 detected\n  ✓ Codex CLI              3 sessions\n  ...\n\n  Summary\n  Sessions           109\n  Messages           459\n  Projects           18\n  Editors            7 of 15 checked\n  Date range         2025-04-02 → 2026-03-09\n```\n\nAdd `--json` for machine-readable output:\n\n```bash\ndeno run --allow-read --allow-env mod.ts --json\n```\n\nIf you've cloned the repo, you can also use Deno tasks for the full dashboard:\n\n```bash\ndeno task start       # Full dashboard (all permissions)\ndeno task scan        # Lightweight CLI scan\ndeno task scan:json   # JSON output\n```\n\n### Node.js\n\n```\n$ npx agentlytics\n\n(● ●) [● ●] Agentlytics\n{● ●} \u003c● ●\u003e Unified analytics for your AI coding agents\n\nLooking for AI coding agents...\n   ✓ Cursor              498 sessions\n   ✓ Windsurf             20 sessions\n   ✓ Windsurf Next        56 sessions\n   ✓ Claude Code           6 sessions\n   ✓ VS Code              23 sessions\n   ✓ Zed                   1 session\n   ✓ Codex                 3 sessions\n   ✓ Gemini CLI            2 sessions\n   ...and 6 more\n\n(● ●) [● ●] {● ●} \u003c● ●\u003e ✓ 691 analyzed, 360 cached (27.1s)\n✓ Dashboard ready at http://localhost:4637\n```\n\nTo only build the cache without starting the server:\n\n```bash\nnpx agentlytics --collect\n# or: pnpm dlx agentlytics --collect\n```\n\n## Features\n\n- **Dashboard** — KPIs, activity heatmap, editor breakdown, coding streaks, token economy, peak hours, top models \u0026 tools\n- **Sessions** — Search, filter, and read full conversations with syntax highlighting. Open any chat in a slide-over sidebar.\n- **Costs** — Estimate your AI spend broken down by model, editor, project, and month. Spot your most expensive sessions.\n- **Projects** — Per-project analytics: sessions, messages, tokens, models, editor breakdown, and drill-down detail views\n- **Deep Analysis** — Tool frequency heatmaps, model distribution, token breakdown, and filterable drill-down analytics\n- **Compare** — Side-by-side editor comparison with efficiency ratios, token usage, and session patterns\n- **Subscriptions** — Live view of your editor plans, usage quotas, remaining credits, and rate limits across Cursor, Windsurf, Claude Code, Copilot, Codex, and more\n- **Relay** — Share AI session context across your team via MCP\n\n## Supported Editors\n\n| Editor | Msgs | Tools | Models | Tokens |\n|--------|:----:|:-----:|:------:|:------:|\n| **Cursor** | ✅ | ✅ | ✅ | ✅ |\n| **Windsurf** | ✅ | ✅ | ✅ | ✅ |\n| **Windsurf Next** | ✅ | ✅ | ✅ | ✅ |\n| **Antigravity** | ✅ | ✅ | ✅ | ✅ |\n| **Claude Code** | ✅ | ✅ | ✅ | ✅ |\n| **VS Code** | ✅ | ✅ | ✅ | ✅ |\n| **VS Code Insiders** | ✅ | ✅ | ✅ | ✅ |\n| **Zed** | ✅ | ✅ | ✅ | ❌ |\n| **OpenCode** | ✅ | ✅ | ✅ | ✅ |\n| **Codex** | ✅ | ✅ | ✅ | ✅ |\n| **Gemini CLI** | ✅ | ✅ | ✅ | ✅ |\n| **Copilot CLI** | ✅ | ✅ | ✅ | ✅ |\n| **Cursor Agent** | ✅ | ❌ | ❌ | ❌ |\n| **Command Code** | ✅ | ✅ | ❌ | ❌ |\n| **Goose** | ✅ | ✅ | ✅ | ❌ |\n| **Kiro** | ✅ | ✅ | ✅ | ❌ |\n\n\u003e Windsurf, Windsurf Next, and Antigravity must be running during scan.\n\n## Relay\n\nRelay enables multi-user context sharing across a team. One person starts a relay server, others join and share selected project sessions. An MCP server is exposed so AI clients can query across everyone's coding history.\n\n### Start a relay\n\n```bash\nnpx agentlytics --relay\n# or: pnpm dlx agentlytics --relay\n```\n\nOptionally protect with a password:\n\n```bash\nRELAY_PASSWORD=secret npx agentlytics --relay\n```\n\nThis starts a relay server on port `4638` and prints the join command and MCP endpoint:\n\n```\n  ⚡ Agentlytics Relay\n\n  Share this command with your team:\n    cd /path/to/project\n    npx agentlytics --join 192.168.1.16:4638\n\n  MCP server endpoint (add to your AI client):\n    http://192.168.1.16:4638/mcp\n```\n\n### Join a relay\n\n```bash\ncd /path/to/your-project\nnpx agentlytics --join \u003chost:port\u003e\n# or: pnpm dlx agentlytics --join \u003chost:port\u003e\n```\n\nIf the relay is password-protected:\n\n```bash\nRELAY_PASSWORD=secret npx agentlytics --join \u003chost:port\u003e\n```\n\nUsername is auto-detected from `git config user.email`. You can override it with `--username \u003cname\u003e`.\n\nYou'll be prompted to select which projects to share. The client then syncs session data to the relay every 30 seconds.\n\n### MCP Tools\n\nConnect your AI client to the relay's MCP endpoint (`http://\u003chost\u003e:4638/mcp`) to access these tools:\n\n| Tool | Description |\n|------|-------------|\n| `list_users` | List all connected users and their shared projects |\n| `search_sessions` | Full-text search across all users' chat messages |\n| `get_user_activity` | Get recent sessions for a specific user |\n| `get_session_detail` | Get full conversation messages for a session |\n\nExample query to your AI: *\"What did alice do in auth.js?\"*\n\n### Relay REST API\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /relay/health` | Health check and user count |\n| `GET /relay/users` | List connected users |\n| `GET /relay/search?q=\u003cquery\u003e` | Search messages across all users |\n| `GET /relay/activity/:username` | User's recent sessions |\n| `GET /relay/session/:chatId` | Full session detail |\n| `POST /relay/sync` | Receives data from join clients |\n\n\u003e Relay is designed for trusted local networks. Set `RELAY_PASSWORD` env on both server and clients to enable password protection.\n\n## How It Works\n\n```\nEditor files/APIs → editors/*.js → cache.js (SQLite) → server.js (REST) → React SPA\n```\n\n```\nRelay:  join clients → POST /relay/sync → relay.db (SQLite) → MCP server → AI clients\n```\n\n```\nDeno:   Editor files → mod.ts (zero deps) → stdout (CLI/JSON)\n```\n\nAll data is normalized into a local SQLite cache at `~/.agentlytics/cache.db`. The Express server exposes read-only REST endpoints consumed by the React frontend. Relay data is stored separately in `~/.agentlytics/relay.db`. The Deno sandboxed edition (`mod.ts`) bypasses SQLite entirely and reads editor files directly for a lightweight, permission-minimal CLI report.\n\n## API\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /api/overview` | Dashboard KPIs, editors, modes, trends |\n| `GET /api/daily-activity` | Daily counts for heatmap |\n| `GET /api/dashboard-stats` | Hourly, weekday, streaks, tokens, velocity |\n| `GET /api/chats` | Paginated session list |\n| `GET /api/chats/:id` | Full chat with messages |\n| `GET /api/projects` | Project-level aggregations |\n| `GET /api/deep-analytics` | Tool/model/token breakdowns |\n| `GET /api/tool-calls` | Individual tool call instances |\n| `GET /api/refetch` | SSE: wipe cache and rescan |\n\nAll endpoints accept optional `editor` filter. See **[API.md](API.md)** for full request/response documentation.\n\n## Roadmap\n\n- [ ] **Offline Windsurf/Antigravity support** — Read cascade data from local file structure instead of requiring the app to be running (see below)\n- [ ] **LLM-powered insights** — Use an LLM to analyze session patterns, generate summaries, detect coding habits, and surface actionable recommendations\n- [ ] **Linux \u0026 Windows support** — Adapt editor paths for non-macOS platforms\n- [ ] **Export \u0026 reports** — PDF/CSV export of analytics and session data\n- [x] **Cost tracking** — Estimate API costs per editor/model based on token usage\n\n## Contributions Needed\n\n**Windsurf / Windsurf Next / Antigravity offline reading** — Currently these editors require their app to be running because data is fetched via ConnectRPC from the language server process. Unlike Cursor or Claude Code, there's no known local file structure to read cascade history from. If you know where Windsurf stores trajectory data on disk, or can help reverse-engineer the storage format, contributions are very welcome.\n\n**LLM-based analytics** — We'd love to add intelligent analysis on top of the raw data — session summaries, coding pattern detection, productivity insights, and natural language queries over your agent history. If you have ideas or want to build this, open an issue or PR.\n\n## Contributing\n\nSee **[CONTRIBUTING.md](CONTRIBUTING.md)** for development setup, editor adapter details, database schema, and how to add support for new editors.\n\n## License\n\nMIT — Built by [@f](https://github.com/f)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fagentlytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff%2Fagentlytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fagentlytics/lists"}