{"id":49610909,"url":"https://github.com/shami-ah/rasad","last_synced_at":"2026-05-04T17:02:02.164Z","repository":{"id":352462372,"uuid":"1215239237","full_name":"shami-ah/rasad","owner":"shami-ah","description":"AI Observatory for Developers — monitor what your AI coding assistant is actually doing","archived":false,"fork":false,"pushed_at":"2026-05-03T21:13:54.000Z","size":821,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-03T22:27:10.190Z","etag":null,"topics":["ai","ai-safety","claude","cli","dashboard","developer-tools","llm","observability","token-usage","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/shami-ah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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-04-19T16:59:21.000Z","updated_at":"2026-05-03T21:13:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shami-ah/rasad","commit_stats":null,"previous_names":["shami-ah/rasad"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shami-ah/rasad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shami-ah%2Frasad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shami-ah%2Frasad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shami-ah%2Frasad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shami-ah%2Frasad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shami-ah","download_url":"https://codeload.github.com/shami-ah/rasad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shami-ah%2Frasad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32616270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"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":["ai","ai-safety","claude","cli","dashboard","developer-tools","llm","observability","token-usage","typescript"],"created_at":"2026-05-04T17:01:24.829Z","updated_at":"2026-05-04T17:02:02.148Z","avatar_url":"https://github.com/shami-ah.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rasad (رصد) — AI Observatory for Developers\n\n[![npm version](https://img.shields.io/npm/v/rasad-ai.svg)](https://www.npmjs.com/package/rasad-ai)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)\n\n\u003e Monitor what your AI coding assistant is actually doing. Costs, context, tool calls, drift, and more.\n\n**Your data never leaves your machine.** Zero outbound network requests. Local SQLite. No telemetry.\n\n\n## The Problem\n\nAI coding assistants (Claude Code, Gogaa, Cursor, Copilot) run dozens of tool calls per session, burn through tokens, and make decisions you never see. There is no way to know:\n\n- Where your money is going\n- Whether the AI forgot your requirements mid-conversation\n- What files it actually changed and why\n- If it's contradicting patterns from earlier sessions\n\n**Rasad answers all of these.** It's the first open-source AI session observatory on npm.\n\n## Quick Start\n\n```bash\nnpx rasad-ai\n```\n\nThat's it. Rasad auto-detects your Claude Code sessions at `~/.claude/projects/` and syncs immediately.\n\n```bash\n# Or install globally\nnpm install -g rasad-ai\nrasad dashboard    # Web dashboard on localhost:9847\nrasad watch        # Live TUI in your terminal\n```\n\n## What You Get\n\n### Web Dashboard (15 pages)\n\n| Feature | What It Answers |\n|---|---|\n| **Token Karma** | Where is my money going? Which model costs the most? |\n| **Ghost Context** | Did the AI forget my requirements mid-conversation? |\n| **Trajectory** | Step-by-step execution tree. Every tool call visualized. |\n| **Session Passport** | Quick summary: files changed, decisions made, key moments |\n| **Drift Detector** | Is the AI contradicting patterns from earlier sessions? |\n| **Vibe Diff** | Reviewable artifact of what the AI changed |\n| **Model Compare** | Which model gives the best value? Head-to-head. |\n| **Search** | Find any past conversation across all sessions |\n\n\n### Terminal TUI (`rasad watch`)\n\nFull-screen interactive terminal UI with:\n- Live session feed as your AI works\n- Phase detection (planning / exploring / executing / verifying / refining)\n- Real-time cost tracking per session\n- Tool call breakdown with outcomes\n- Smart coaching tips based on session patterns\n\n### X-Ray Mode\n\nReal-time action viewer showing exactly what your AI is doing right now:\n- Every tool call with arguments and outcomes\n- File diffs as they happen\n- Context window utilization\n- Available across TUI, dashboard, and API\n\n### CLI Commands\n\nEvery feature is available in both the web dashboard and the CLI:\n\n```bash\nrasad                    # Quick summary of your AI activity\nrasad dashboard          # Open the web dashboard (localhost:9847)\nrasad watch              # Live TUI — full-screen terminal dashboard\nrasad sync               # Re-sync latest sessions\nrasad karma              # Cost breakdown in your terminal\nrasad timeline           # List recent sessions\nrasad trajectory \u003cid\u003e    # Step-by-step execution tree\nrasad context \u003cid\u003e       # Ghost Context — what the AI forgot\nrasad passport \u003cid\u003e      # Session summary (--md to export Markdown)\nrasad vibe-diff \u003cid\u003e     # What the AI changed (--md to export)\nrasad drift              # Find pattern inconsistencies\nrasad compare            # Head-to-head model comparison\nrasad search \u003cquery\u003e     # Full-text search across all conversations\n```\n\n#### Examples\n\n```bash\n# How much am I spending?\n$ rasad karma\n  Total cost:     $25,460\n  Avg/session:    $13.54\n  Cache hit rate: 98.0%\n\n# What happened in this session?\n$ rasad passport 6ebac107\n  Project:    shami\n  Duration:   2h 4m\n  Cost:       $39.32\n  Tool calls: 108\n  Files:      28\n\n# Export a session as Markdown\n$ rasad passport 6ebac107 --md\n  Exported to passport-6ebac107.md\n```\n\n## Data Sources\n\n| Source | Path | Status |\n|---|---|---|\n| **Claude Code** | `~/.claude/projects/**/*.jsonl` | Supported |\n| **Gogaa CLI** | `~/.gogaa/sessions/*.json` | Supported |\n| **Aider** | `~/.aider/sessions/*.jsonl` | Supported |\n| Cursor | SQLite DB | Planned |\n| Copilot | — | Planned |\n\n## How It Works\n\n1. **Sync** — Reads AI session files (JSONL/JSON) and parses every message, tool call, and token count\n2. **Store** — Local SQLite database at `~/.rasad/rasad.db` with full-text search (FTS5)\n3. **Analyze** — 8 analysis engines compute costs, context usage, drift patterns, and session summaries\n4. **Visualize** — Web dashboard on localhost or CLI output or full-screen TUI\n5. **Live** — File watcher auto-syncs new sessions in real-time via WebSocket\n\n### Performance\n\n- First sync: ~18 seconds for 1,900 sessions (700MB+ of data)\n- Incremental sync: \u003c1 second (only processes new/changed files)\n- Dashboard: instant — all queries hit local SQLite\n\n## Privacy and Security\n\n- **Zero outbound network requests** — the binary cannot phone home\n- **All data stays at `~/.rasad/`** — local SQLite database\n- **No telemetry, no tracking, no cloud**\n- **Server binds to 127.0.0.1 only** — no network exposure\n\n## Tech Stack\n\n- **Runtime**: TypeScript + Node.js (ESM)\n- **Database**: SQLite via better-sqlite3 (WAL mode, FTS5 full-text search)\n- **CLI**: Commander\n- **TUI**: React Ink (full-screen interactive terminal)\n- **Server**: Fastify (localhost only)\n- **Dashboard**: React + Tailwind CSS + Recharts\n- **Build**: esbuild (CLI) + Vite (dashboard)\n- **Live updates**: WebSocket (auto-refresh on new sessions)\n- **Tests**: Vitest (63 tests)\n\n## Development\n\n```bash\ngit clone https://github.com/shami-ah/rasad.git\ncd rasad\nnpm install\ncd dashboard \u0026\u0026 npm install \u0026\u0026 cd ..\n\nnpm run build            # Build everything\nnpm run dev              # Watch CLI changes\nnpm run dev:dashboard    # Vite dev server for dashboard\nnpm test                 # Run tests\nnpm run typecheck        # Type check\n```\n\n## Roadmap\n\n- [x] Claude Code adapter\n- [x] Gogaa CLI adapter\n- [x] Aider adapter\n- [x] Web dashboard (15 pages)\n- [x] Full-screen TUI (`rasad watch`)\n- [x] X-Ray mode (real-time action viewer)\n- [x] 10+ CLI commands\n- [x] Full-text search (FTS5)\n- [x] Live sync (file watcher + WebSocket)\n- [x] CAMEL-aligned phase detection\n- [x] Proactive alerts and anomaly detection\n- [x] Markdown export\n- [ ] Cursor adapter (SQLite DB parsing)\n- [ ] Copilot adapter\n- [ ] Browser extension (ChatGPT, Claude.ai)\n- [ ] AI-powered session summaries\n- [ ] Team sharing and multi-developer dashboards\n\n## License\n\nMIT\n\n## Author\n\n**Engr Ahtesham Ahmad** — [GitHub](https://github.com/shami-ah) | [Portfolio](https://ahtesham.dev.wadwarehouse.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshami-ah%2Frasad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshami-ah%2Frasad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshami-ah%2Frasad/lists"}