{"id":51168939,"url":"https://github.com/ygncode/pi-insights","last_synced_at":"2026-06-26T22:31:07.924Z","repository":{"id":358416201,"uuid":"1241300226","full_name":"ygncode/pi-insights","owner":"ygncode","description":"Beautiful analytics reports for pi coding-agent sessions","archived":false,"fork":false,"pushed_at":"2026-05-17T08:43:33.000Z","size":28007,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T10:41:48.269Z","etag":null,"topics":["analytics","coding-agent","pi-extension","pi-package"],"latest_commit_sha":null,"homepage":null,"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/ygncode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-17T07:51:52.000Z","updated_at":"2026-05-17T08:43:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ygncode/pi-insights","commit_stats":null,"previous_names":["ygncode/pi-insights"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ygncode/pi-insights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-insights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-insights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-insights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-insights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ygncode","download_url":"https://codeload.github.com/ygncode/pi-insights/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-insights/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34835779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"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":["analytics","coding-agent","pi-extension","pi-package"],"created_at":"2026-06-26T22:31:04.572Z","updated_at":"2026-06-26T22:31:07.916Z","avatar_url":"https://github.com/ygncode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-insights\n\nBeautiful analytics reports for your [pi coding agent](https://pi.dev) sessions.\n\n`pi-insights` is a Pi extension that adds an `/insights` command. It scans your local Pi session history and generates a self-contained HTML dashboard with usage, model, project, session, and “rage” analytics.\n\n## Features\n\n- **Overview** — Activity calendar, sessions/tokens/cost per day, activity by hour, and top tools\n- **Models** — Token distribution, per-model breakdown, thinking levels, and stop reasons\n- **Projects** — Per-project sessions, messages, tokens, and cost with sortable bars\n- **Sessions** — Searchable/filterable session table by project name or date\n- **Rage 🤬** — Profanity analytics: swear rate, filthiest model, peak hour, top words, and project breakdown\n- **Portable report** — Single self-contained HTML file; no server required, works from `file://`\n\n## Preview\n\n\u003cvideo controls width=\"100%\" src=\"https://raw.githubusercontent.com/ygncode/pi-insights/main/assets/demo.mp4\"\u003e\u003c/video\u003e\n\nIf the embedded video does not render in your client, [watch the demo video](https://raw.githubusercontent.com/ygncode/pi-insights/main/assets/demo.mp4).\n\n![pi-insights overview](assets/pi-insights-01-overview.png)\n\nMore screenshots:\n\n- [Models](assets/pi-insights-02-models.png)\n- [Projects](assets/pi-insights-03-projects.png)\n- [Sessions](assets/pi-insights-04-sessions.png)\n- [Rage analytics](assets/pi-insights-05-rage.png)\n\n## Install\n\n### From npm\n\n```bash\npi install npm:@ygncode/pi-insights\n```\n\n### From GitHub\n\n```bash\npi install git:github.com/ygncode/pi-insights\n```\n\n### Try without installing\n\n```bash\npi -e npm:@ygncode/pi-insights\n# or\npi -e git:github.com/ygncode/pi-insights\n```\n\n## Usage\n\nInside Pi, run:\n\n```text\n/insights\n```\n\nThe report opens automatically and is written to:\n\n```text\n~/.pi/agent/insights-reports/pi-insights.html\n```\n\nEach run overwrites the same report file.\n\n## What gets analyzed?\n\n`pi-insights` reads local Pi session JSONL files from:\n\n```text\n~/.pi/agent/sessions/\n```\n\nNo data is uploaded by this extension. The generated report is local HTML.\n\n## Package metadata\n\nThis repo is a Pi package. `package.json` declares:\n\n```json\n{\n  \"keywords\": [\"pi-package\"],\n  \"pi\": {\n    \"extensions\": [\"./index.ts\"]\n  }\n}\n```\n\nThat allows users to install it with `pi install` from npm, GitHub, or a local path.\n\n## pi.dev package gallery\n\nThis package is prepared for the [Pi package gallery](https://pi.dev/packages):\n\n- npm package name: `@ygncode/pi-insights`\n- GitHub repo: `https://github.com/ygncode/pi-insights`\n- Pi package keyword: `pi-package`\n- Pi extension manifest: `pi.extensions = [\"./index.ts\"]`\n- Gallery image: `assets/pi-insights-01-overview.png`\n- Gallery video: `assets/demo.mp4`\n\nAfter publishing to npm, submit or list the package on \u003chttps://pi.dev/packages\u003e using the npm package URL/name.\n\n## Development\n\n```bash\nnpm install\nnpm run build        # build the React frontend into dist/\nnpm test             # run all tests\nnpm run test:watch   # watch mode\nnpm run test:coverage\n```\n\n`dist/` is intentionally included in the package so Pi can run the extension immediately after npm/git installation without requiring users to build the frontend.\n\n## Architecture\n\n```text\nindex.ts          — Extension entry point; registers the /insights command\nlib/\n  parser.ts       — Parses JSONL session files into ParsedSession objects\n  analytics.ts    — Computes aggregate stats from parsed sessions\n  rage.ts         — Profanity detection\n  types.ts        — Shared TypeScript interfaces\nsrc/\n  App.tsx         — React frontend\n  utils.ts        — Formatting helpers\n  components/\n    ContributionCalendar.tsx\ntests/\n  lib/            — Unit tests for parser, analytics, rage\n  src/            — Unit tests for frontend utils\n```\n\n## Tech stack\n\n- React 19 + TypeScript 6 + Vite 8\n- Recharts 3\n- Vitest 4\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygncode%2Fpi-insights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fygncode%2Fpi-insights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygncode%2Fpi-insights/lists"}