{"id":48473744,"url":"https://github.com/kalpeshgamit/codebase-pilot","last_synced_at":"2026-04-13T13:00:54.613Z","repository":{"id":349659829,"uuid":"1202866016","full_name":"kalpeshgamit/codebase-pilot","owner":"kalpeshgamit","description":"AI context engine for Claude Code, Cursor, Windsurf — pack, compress, and optimize any codebase. Save 60-90% tokens. Web dashboard on port 7456.","archived":false,"fork":false,"pushed_at":"2026-04-08T15:42:59.000Z","size":19469,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-10T10:03:02.992Z","etag":null,"topics":["agent-orchestration","ai-context-engine","claude-code","cli-tool","code-compression","code-context-engine","code-review","codebase-packer","cursor-ai","developer-tools","llm-tools","mcp-server","nodejs","security-scanner","sub-agents","token-optimization","typescript","vibe-coding","windsurf"],"latest_commit_sha":null,"homepage":"https://kalpeshgamit.github.io","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/kalpeshgamit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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},"funding":{"github":["kalpeshgamit"]}},"created_at":"2026-04-06T13:36:31.000Z","updated_at":"2026-04-08T15:43:03.000Z","dependencies_parsed_at":"2026-04-11T11:01:17.478Z","dependency_job_id":null,"html_url":"https://github.com/kalpeshgamit/codebase-pilot","commit_stats":null,"previous_names":["kalpeshgamit/codebase-pilot"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/kalpeshgamit/codebase-pilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalpeshgamit%2Fcodebase-pilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalpeshgamit%2Fcodebase-pilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalpeshgamit%2Fcodebase-pilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalpeshgamit%2Fcodebase-pilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalpeshgamit","download_url":"https://codeload.github.com/kalpeshgamit/codebase-pilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalpeshgamit%2Fcodebase-pilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31677819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"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":["agent-orchestration","ai-context-engine","claude-code","cli-tool","code-compression","code-context-engine","code-review","codebase-packer","cursor-ai","developer-tools","llm-tools","mcp-server","nodejs","security-scanner","sub-agents","token-optimization","typescript","vibe-coding","windsurf"],"created_at":"2026-04-07T07:48:38.243Z","updated_at":"2026-04-11T11:01:18.708Z","avatar_url":"https://github.com/kalpeshgamit.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/logo-02.png\" alt=\"codebase-pilot\" width=\"500\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eStop burning tokens. Start coding smarter.\u003c/strong\u003e\u003cbr/\u003e\n  AI context engine — pack, compress, optimize any codebase for LLMs. Zero cloud. Zero lock-in.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/codebase-pilot-cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/codebase-pilot-cli?style=flat-square\u0026color=blue\" alt=\"npm\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/kalpeshgamit/codebase-pilot/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/kalpeshgamit/codebase-pilot/ci.yml?style=flat-square\u0026label=CI\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green?style=flat-square\" alt=\"License\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://nodejs.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/node-%E2%89%A518-brightgreen?style=flat-square\" alt=\"Node\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://safeskill.dev/scan/kalpeshgamit-codebase-pilot\"\u003e\u003cimg src=\"https://img.shields.io/badge/SafeSkill-86%2F100-green?style=flat-square\" alt=\"SafeSkill\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Installation\n\n\u003ctable\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003enpm (recommended)\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\n\n```bash\nnpm install -g codebase-pilot-cli\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003enpx (no install)\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\n\n```bash\nnpx codebase-pilot-cli init\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003eHomebrew (macOS)\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\n\n```bash\nbrew install kalpeshgamit/codebase-pilot/codebase-pilot-cli\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003eInstall script\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/install.sh | bash\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cstrong\u003eUninstall\u003c/strong\u003e\u003c/td\u003e\u003ctd\u003e\n\n```bash\nnpm uninstall -g codebase-pilot-cli\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n## Quick Start\n\n```bash\n# 1. Install\nnpm install -g codebase-pilot-cli\n\n# 2. Set up your project\ncd your-project\ncodebase-pilot init\n\n# 3. Pack + compress for AI context\ncodebase-pilot pack --compress --copy\n\n# 4. Scan for secrets before committing\ncodebase-pilot scan-secrets\n\n# 5. Open web dashboard\ncodebase-pilot ui    # → http://localhost:7456\n```\n\n---\n\n## How It Works\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Architecture Pipeline**\n\nYour codebase goes through scan → detect → pack → compress → security scan → output. 98K tokens becomes 7K.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/diagrams/pipeline.png\" alt=\"How codebase-pilot works\" width=\"100%\" /\u003e\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Token Savings**\n\nCompression alone saves 70%. Add agent scoping for 93% reduction.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/diagrams/savings.png\" alt=\"Token savings comparison\" width=\"100%\" /\u003e\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Blast Radius Analysis**\n\nChange a file → see every dependent, transitive import, and affected test. Risk scored 0–100.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/diagrams/blast-radius.png\" alt=\"Blast radius analysis\" width=\"100%\" /\u003e\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n**Agent Layer Architecture**\n\n7 layers — haiku for extraction, sonnet for implementation, opus for review gates.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/diagrams/agent-layers.png\" alt=\"Agent layer architecture\" width=\"100%\" /\u003e\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"2\"\u003e\n\n**Multi-Platform Support** — one command generates configs for Claude Code, Cursor, Windsurf, and OpenAI Codex.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/diagrams/platforms.png\" alt=\"Multi-platform support\" width=\"100%\" /\u003e\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Token Savings\n\nThe `tokens` command tracks your actual savings over time:\n\n```\n  Savings estimate (per session):\n    Without codebase-pilot:   ~98,798 tokens\n    With pack --compress:      ~29,274 tokens\n    Pilot saves:              ~69,524 tokens per session\n\n  Your savings (from pack runs):\n    Today:      3 sessions  — ~92,232 tokens saved\n    This week:  5 sessions  — ~147,498 tokens saved\n```\n\n---\n\n## Web Dashboard\n\n```bash\ncodebase-pilot ui          # → http://localhost:7456\ncodebase-pilot ui --stop   # stop daemon\ncodebase-pilot ui --status # check status\n```\n\nPort **7456** = PILOT on phone keypad. Runs as background daemon with real-time SSE updates.\n\n### Dashboard\nLive stat cards, savings chart, recent sessions — auto-updates via SSE.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/dashboard.png\" alt=\"Dashboard\" width=\"100%\" /\u003e\n\n### Projects (System-Wide)\nAll projects in one view — sessions, tokens saved, efficiency per project.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/projects.png\" alt=\"Projects\" width=\"100%\" /\u003e\n\n### Import Graph\nInteractive D3.js force-directed graph. Nodes sized by tokens, colored by module. Drag, zoom, search.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/graph.png\" alt=\"Import Graph\" width=\"100%\" /\u003e\n\n### Search\nFull-text search with BM25 ranking. Highlighted matches with file path + line number.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/search.png\" alt=\"Search\" width=\"100%\" /\u003e\n\n### Agents\nLayer architecture, model assignment, context paths, dependencies.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/agents.png\" alt=\"Agents\" width=\"100%\" /\u003e\n\n### Files\nAll files with token counts, language tags, percentage of total.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/files.png\" alt=\"Files\" width=\"100%\" /\u003e\n\n### Security\nPattern categories, risk levels, detected secrets — side by side.\n\n\u003cimg src=\"https://raw.githubusercontent.com/kalpeshgamit/codebase-pilot/main/docs/screenshots/security.png\" alt=\"Security\" width=\"100%\" /\u003e\n\n---\n\n## Features\n\n| Feature | Details |\n|---------|---------|\n| **Pack \u0026 Compress** | XML/Markdown output, regex-based compression (8 languages), agent-scoped packing |\n| **Security Scanner** | 180 patterns across 15 categories — cloud, payment, AI, crypto, generic |\n| **Blast Radius** | Import graph analysis, risk scoring (0-100), affected test detection |\n| **Full-Text Search** | SQLite FTS5 with BM25 ranking, snippet extraction, highlighted matches |\n| **Web Dashboard** | 7 pages, dark/light theme, glassmorphism UI, real-time SSE updates |\n| **MCP Server** | 10 tools + 3 prompts over stdio — works with Claude Code, Cursor, Zed |\n| **Multi-Platform** | Generates CLAUDE.md, .cursorrules, .windsurfrules, AGENTS.md |\n| **Agent System** | 7-layer sub-agents with haiku/sonnet/opus model routing |\n| **Watch Mode** | Chokidar file watching, debounced re-scan, auto-update configs |\n| **Incremental** | SHA-256 hash-based change detection — only re-scans modified files |\n| **Visualization** | D3.js interactive force-directed import graph (drag, zoom, search) |\n| **Benchmarks** | `eval` command — tokens, compression ratio, import edges, timing |\n| **Usage Stats** | Per-project + system-wide savings tracking (today/week/month) |\n| **76 Languages** | 3 tiers: 17 full ecosystem, 21 package+test, 38 extension-only |\n| **58 Frameworks** | Next.js, Django, Gin, Axum, Spring Boot, Rails, Laravel, and more |\n| **39 Test Runners** | Vitest, pytest, Go test, Cargo test, JUnit, RSpec, and more |\n| **32 ORMs** | Prisma, SQLAlchemy, GORM, Diesel, Hibernate, ActiveRecord, and more |\n| **Config Validation** | Validates agents.json, hooks before writing — prevents invalid configs |\n| **Zero Cloud** | No API calls, no accounts, no telemetry. Everything runs locally |\n\n---\n\n## Commands\n\n```\ncodebase-pilot init [--platform cursor,windsurf,codex]  # scan + generate configs\ncodebase-pilot scan                                      # re-detect + update\ncodebase-pilot pack [--compress] [--agent \u003cname\u003e]        # pack for AI context\ncodebase-pilot scan-secrets [--path \u003cdir\u003e]               # security scan — 180 patterns\ncodebase-pilot tokens [--agent \u003cname\u003e]                   # token breakdown + savings\ncodebase-pilot impact [--file \u003cpath\u003e]                    # blast radius analysis\ncodebase-pilot search \u003cquery\u003e                            # full-text search\ncodebase-pilot visualize                                 # D3.js import graph HTML\ncodebase-pilot ui [--stop | --status]                    # web dashboard (port 7456)\ncodebase-pilot serve                                     # MCP server (stdio)\ncodebase-pilot watch                                     # file watcher\ncodebase-pilot stats [--global]                          # usage history\ncodebase-pilot eval                                      # benchmarks\ncodebase-pilot health                                    # validate agent setup\ncodebase-pilot fix                                       # auto-repair stale paths\ncodebase-pilot eject                                     # remove dependency\n```\n\n---\n\n## Blast Radius\n\nTrace the impact of any file change across your codebase:\n\n```bash\ncodebase-pilot impact --file src/types.ts\n\n  Risk: HIGH (53/100)\n\n  Direct dependents (18):\n    src/agents/generator.ts\n    src/mcp/server.ts\n    src/packer/index.ts\n    ...\n\n  Affected tests (5):\n    tests/agents/generator.test.ts\n    tests/cli/pack.test.ts\n    ...\n\n  Total affected: 27 files\n```\n\n---\n\n## MCP Server\n\nExpose codebase-pilot to any MCP-compatible AI tool:\n\n```bash\ncodebase-pilot serve\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e10 Tools + 3 Prompts\u003c/strong\u003e\u003c/summary\u003e\n\n**Tools:** `scan_project`, `pack_codebase`, `count_tokens`, `health_check`, `scan_secrets`, `list_agents`, `get_agent`, `detect_languages`, `get_savings`, `list_files`\n\n**Prompts:** `review`, `onboard`, `optimize`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eConnect to Claude Code\u003c/strong\u003e\u003c/summary\u003e\n\n```json\n{\n  \"mcpServers\": {\n    \"codebase-pilot\": {\n      \"command\": \"codebase-pilot\",\n      \"args\": [\"serve\"]\n    }\n  }\n}\n```\n\nSame config works for Cursor (`.cursor/mcp.json`) and other MCP clients.\n\n\u003c/details\u003e\n\n---\n\n## Security Scanner\n\n```bash\ncodebase-pilot scan-secrets           # scan current project\ncodebase-pilot scan-secrets --path .  # specify directory\n```\n\n180 patterns across 15 categories. Runs automatically on every `pack` — files with detected secrets are excluded from output.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCategories\u003c/strong\u003e\u003c/summary\u003e\n\n| Category | Examples |\n|----------|---------|\n| Cloud | AWS, GCP, Azure, DigitalOcean, Supabase, Cloudflare |\n| VCS / CI | GitHub, GitLab, Bitbucket, CircleCI, Travis |\n| Payment | Stripe, Razorpay, Square, Braintree, Plaid, PayPal |\n| AI LLMs | OpenAI, Anthropic, Groq, Perplexity, xAI |\n| AI Infra | HuggingFace, Replicate, Together, Fireworks |\n| AI DevTools | LangSmith, Pinecone, Weaviate, Qdrant |\n| Messaging | Slack, Twilio, SendGrid, Mailgun, Resend |\n| Database | MongoDB, PostgreSQL, Redis, PlanetScale, Neon |\n| Dev Infra | npm, Docker, Doppler, Vault, PostHog |\n| Monitoring | Sentry, Datadog, New Relic, Grafana |\n| Crypto | Ethereum, Solana, Bitcoin private keys |\n| Crypto Keys | RSA, EC, DSA, OpenSSH, PGP blocks |\n| Generic | password=, secret=, api_key=, Bearer tokens |\n\n\u003c/details\u003e\n\n---\n\n## Code Compression\n\nKeeps function signatures, folds bodies. Claude still understands the full API surface.\n\n```typescript\n// Before (150 tokens)\nexport async function createUser(data: UserInput): Promise\u003cUser\u003e {\n  const validated = schema.parse(data);\n  const user = await db.user.create({ data: validated });\n  await sendWelcomeEmail(user.email);\n  return user;\n}\n\n// After --compress (20 tokens)\nexport async function createUser(data: UserInput): Promise\u003cUser\u003e { /* ... */ }\n```\n\nSupports: TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, PHP.\n\n---\n\n## Benchmarks\n\n```bash\ncodebase-pilot eval\n\n  Project         Files  Raw tokens  Compressed  Ratio  Edges  Time\n  --------------  -----  ----------  ----------  -----  -----  ----\n  codebase-pilot     92      98,798      29,274    70%    134  45ms\n```\n\n---\n\n## Uninstall\n\n```bash\nnpm uninstall -g codebase-pilot-cli    # remove CLI\ncodebase-pilot eject               # remove project configs (optional)\n```\n\n---\n\n\u003cp align=\"center\"\u003e\n  Node.js \u003e= 18 · \u003ca href=\"LICENSE\"\u003eMIT License\u003c/a\u003e · \u003ca href=\"docs/CONTRIBUTING.md\"\u003eContributing\u003c/a\u003e · \u003ca href=\"SECURITY.md\"\u003eSecurity\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eSave tokens. Ship faster.\u003c/strong\u003e\u003cbr/\u003e\n  \u003ccode\u003enpm install -g codebase-pilot-cli\u003c/code\u003e\n\u003c/p\u003e\n","funding_links":["https://github.com/sponsors/kalpeshgamit"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalpeshgamit%2Fcodebase-pilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalpeshgamit%2Fcodebase-pilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalpeshgamit%2Fcodebase-pilot/lists"}