{"id":47247854,"url":"https://github.com/ekaone/repo-intel","last_synced_at":"2026-04-02T00:44:42.672Z","repository":{"id":343707128,"uuid":"1176542262","full_name":"ekaone/repo-intel","owner":"ekaone","description":"Repository Intelligence: a tool that extracts structured knowledge from a code repository","archived":false,"fork":false,"pushed_at":"2026-03-23T06:05:07.000Z","size":237,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-23T23:48:00.339Z","etag":null,"topics":["ai","cli","context","json","rust","skills","typescript"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ekaone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-09T05:52:46.000Z","updated_at":"2026-03-23T12:05:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ekaone/repo-intel","commit_stats":null,"previous_names":["ekaone/repo-intel"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ekaone/repo-intel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekaone%2Frepo-intel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekaone%2Frepo-intel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekaone%2Frepo-intel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekaone%2Frepo-intel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekaone","download_url":"https://codeload.github.com/ekaone/repo-intel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekaone%2Frepo-intel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"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","cli","context","json","rust","skills","typescript"],"created_at":"2026-03-14T09:20:01.332Z","updated_at":"2026-04-02T00:44:42.666Z","avatar_url":"https://github.com/ekaone.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# repo-intel\n\n\u003e Scan your repository. Generate AI agent documentation. Instantly.\n\n**repo-intel** is a blazing-fast CLI tool powered by a Rust core that scans your codebase,\ndetects your tech stack, and generates rich AI agent persona docs — so tools like\nClaude Code, Cursor, and GitHub Copilot actually understand your project.\n\n```\n✓ Scanned 6,241 files in 147ms\n✓ Detected: Next.js · TypeScript · Tailwind CSS · Prisma · Vitest\n✓ Generated 4 agent docs → ./agents/\n  agents/frontend-engineer.md\n  agents/fullstack-engineer.md\n  agents/database-engineer.md\n  agents/qa-testing-engineer.md\n✓ Written: AGENTS.md\n```\n\n---\n\n## Why repo-intel?\n\nAI coding agents are only as good as the context they have. Without project-specific\nknowledge, they give generic answers — correct for the framework, wrong for your codebase.\n\n**Without repo-intel**, your agent knows:\n- How React works in general\n- How Prisma works in general\n\n**With repo-intel**, your agent knows:\n- That *your* project uses a feature-based architecture under `src/modules/`\n- That *your* hooks live in `src/hooks/` and follow a specific pattern\n- That *your* team targets LCP \u003c 2.5s as a hard performance constraint\n- That *your* project is an IoT monitoring dashboard (from README context)\n\n---\n\n## How it works\n\n```\nYour repo\n   ↓\nRust core (fast)\n  ├── metadata-scanner   walks directory tree, finds signal files\n  ├── stack-detector     3-layer inference: deps → folders → file patterns\n  └── context-builder    produces structured context.json\n\n   ↓ stdout (context.json)\n\nTypeScript layer\n  ├── prompt-builder     context → rich LLM prompt\n  ├── AI provider        Anthropic · OpenAI · Ollama\n  └── file writer        agents/*.md + AGENTS.md\n```\n\nThe Rust binary handles all filesystem work — scanning 10,000 files in under 200ms.\nThe TypeScript layer handles the LLM call and file output.\n\n---\n\n## Requirements\n\n- **Node.js** 18 or later\n- An **API key** for your chosen AI provider:\n  - [Anthropic](https://console.anthropic.com/) — `ANTHROPIC_API_KEY`\n  - [OpenAI](https://platform.openai.com/) — `OPENAI_API_KEY`\n  - [Ollama](https://ollama.com/) — free, runs locally, no key needed\n\n---\n\n## Installation\n\nrepo-intel ships pre-compiled Rust binaries for all major platforms.\nThe platform binary is installed automatically — no extra packages needed.\n\n### Global install (recommended)\n\n```bash\n# pnpm\npnpm add -g @ekaone/repo-intel\n\n# npm\nnpm install -g @ekaone/repo-intel\n```\n\n### No install — run with npx\n\n```bash\nnpx @ekaone/repo-intel generate\n```\n\n\u003e The platform-specific binary (`win32-x64`, `darwin-arm64`, `linux-x64`, etc.)\n\u003e is resolved automatically at runtime. No manual binary install required.\n\n---\n\n## Quick Start\n\n**1. Set your API key**\n\nmacOS / Linux:\n```bash\nexport ANTHROPIC_API_KEY=your-key-here\nrepo-intel generate\n```\n\nWindows (inline — recommended):\n```bash\nANTHROPIC_API_KEY=your-key-here repo-intel generate\n```\n\nWindows (permanent — open a new terminal after running):\n```bash\nsetx ANTHROPIC_API_KEY \"your-key-here\"\n```\n\nOpenAI instead:\n```bash\nOPENAI_API_KEY=your-key-here repo-intel generate --provider openai\n```\n\n**2. Run in your project**\n\n```bash\ncd your-project\nrepo-intel generate\n```\n\n**3. Done** — check `./agents/` and `AGENTS.md`\n\n---\n\n## Commands\n\n### `repo-intel generate`\n\nFull pipeline — scan repo, detect stack, generate agent docs via LLM.\n\n```bash\nrepo-intel generate\nrepo-intel generate --root ./my-project        # custom root\nrepo-intel generate --output ./docs/agents     # custom output dir\nrepo-intel generate --provider openai          # use OpenAI instead\nrepo-intel generate --provider ollama          # use local Ollama\nrepo-intel generate --no-ai                    # skip LLM, static output\nrepo-intel generate --dry-run                  # preview, no files written\nrepo-intel generate --debug                    # verbose output\n```\n\n### `repo-intel scan`\n\nScan only — outputs `context.json` to stdout. No LLM call. Useful for\ndebugging what the tool detected, or piping to your own tooling.\n\n```bash\nrepo-intel scan\nrepo-intel scan --pretty                       # human-readable JSON\nrepo-intel scan --root ./my-project\n```\n\n---\n\n## AI Providers\n\n### Anthropic (default)\n\n```bash\nANTHROPIC_API_KEY=your-key repo-intel generate\n# uses claude-sonnet-4-20250514 by default\n```\n\n### OpenAI\n\n```bash\nOPENAI_API_KEY=your-key repo-intel generate --provider openai\n# uses gpt-4o by default\n```\n\n### Ollama (free, local, offline)\n\n```bash\n# Install Ollama: https://ollama.com\nollama pull llama3.2\nrepo-intel generate --provider ollama\n# no API key needed\n```\n\n---\n\n## Configuration\n\nCreate `.repo-intel.toml` in your project root to customise behaviour.\nThe file is optional — repo-intel works with zero configuration.\n\n```toml\n[ai]\nprovider = \"anthropic\"\nmodel = \"claude-sonnet-4-20250514\"\napi_key_env = \"ANTHROPIC_API_KEY\"   # env var name, never the key itself\n\n[output]\ndir = \"./agents\"\nformat = \"markdown\"\n\n[project]\nexclude = [\"legacy/\", \"vendor/\", \"generated/\"]\n\n[stack]\noverride = []\n```\n\n---\n\n## Output\n\n### `agents/` directory\n\nOne Markdown file per detected agent role:\n\n```\nagents/\n  frontend-engineer.md\n  fullstack-engineer.md\n  database-engineer.md\n  qa-testing-engineer.md\n  devops-engineer.md\n```\n\nEach file contains a rich, project-aware agent persona with sections for\nIdentity, Personality, Memory, Experience, Core Responsibilities, Workflow,\nDeliverables, Rules, and Metrics — all specific to your actual codebase.\n\n### `AGENTS.md`\n\nA summary index at your repo root listing all generated agents with relative\nlinks — the \"README for your AI agents.\"\n\n---\n\n## Stack Detection\n\nrepo-intel uses a three-layer confidence system to detect your stack:\n\n| Layer | Method | Example |\n|---|---|---|\n| 1 | Dependency fingerprinting | `react` in `package.json` → React (0.99) |\n| 2 | Folder architecture | `src/hooks/` exists → React hooks pattern (0.85) |\n| 3 | File pattern matching | `*.test.ts` files → Testing framework (0.80) |\n\nSkills with confidence ≥ 0.90 are marked as primary and directly influence\nagent responsibilities. Skills below 0.50 are ignored.\n\n**Detected automatically:**\n\n- Frameworks: React, Next.js, Nuxt, Remix, Vue, Svelte, Angular\n- Languages: TypeScript, JavaScript, Rust, Python, Go\n- Styling: Tailwind CSS, CSS Modules, Styled Components\n- State: Zustand, Jotai, Redux Toolkit, TanStack Query\n- Testing: Vitest, Jest, Playwright, Cypress\n- Database: Prisma, Drizzle, TypeORM, SQLx, Diesel\n- Runtime: Node.js, Deno, Bun, Axum, Fastify, Express\n- Infra: Docker, GitHub Actions, CircleCI\n\n---\n\n## `--no-ai` mode\n\nIf you don't have an API key or want a quick static output:\n\n```bash\nrepo-intel generate --no-ai\n```\n\nProduces a structured agent doc based on detected stack only —\nno LLM call, instant output, always free.\n\n---\n\n## Programmatic API\n\n```typescript\nimport { scan, generate, analyze } from '@ekaone/repo-intel'\nimport type { AIConfig } from '@ekaone/repo-intel'\n\n// ── scan only — no LLM ──────────────────────────────────────\nconst context = await scan('./my-project')\nconsole.log(context.stack.language)   // \"TypeScript\"\nconsole.log(context.stack.framework)  // \"Next.js\"\nconsole.log(context.agent_roles)      // [\"Fullstack Engineer\", \"QA \u0026 Testing Engineer\"]\n\n// ── generate docs from an existing context ──────────────────\nconst config: AIConfig = {\n  provider: 'anthropic',\n  // apiKey resolved from ANTHROPIC_API_KEY env var automatically\n}\n\nconst { docs, errors } = await generate(context, config)\n\ndocs.forEach(doc =\u003e {\n  console.log(doc.role)      // \"Fullstack Engineer\"\n  console.log(doc.filename)  // \"fullstack-engineer.md\"\n  console.log(doc.content)   // full markdown content\n})\n\n// ── full pipeline: scan + generate (dryRun: true = no files written) ──\nconst result = await analyze('./my-project', {\n  provider: 'anthropic',\n  dryRun: true,\n})\n\nconsole.log(result.docs.length)   // number of docs generated\nconsole.log(result.durationMs)    // total pipeline time\nconsole.log(result.usedAi)        // true\n```\n\n---\n\n## Performance\n\n| Scenario | Time |\n|---|---|\n| Scan 1,000 files | ~30ms |\n| Scan 6,000 files | ~150ms |\n| Scan 20,000 files | ~400ms |\n| LLM generation (1 agent) | ~35–40s |\n| LLM generation (3 agents) | ~80–110s |\n| `--no-ai` mode | ~200ms total |\n\nThe Rust core is the fast part. The LLM call dominates total time —\nthat's expected and unavoidable when generating rich, project-aware content.\n\n---\n\n## Platform Support\n\nrepo-intel ships pre-compiled Rust binaries for all major platforms.\nNo Rust toolchain required. The correct binary is resolved automatically\nat runtime based on your OS and CPU architecture.\n\n| Platform | Binary package |\n|---|---|\n| macOS (Apple Silicon) | `@ekaone/repo-intel-darwin-arm64` |\n| macOS (Intel) | `@ekaone/repo-intel-darwin-x64` |\n| Linux x64 | `@ekaone/repo-intel-linux-x64` |\n| Windows x64 | `@ekaone/repo-intel-win32-x64` |\n\n---\n\n## Roadmap\n\n| Version | Focus |\n|---|---|\n| **v0.1.x** | CLI MVP — scan, detect, LLM generate, cross-platform npm publish, `npx` support |\n| **v0.2.0** | Incremental cache, rayon parallel scanning, watch mode, YAML output, `--force` flag |\n| **v0.2.x** | `repo-intel-sdk` — programmatic SDK package, deep source file scanning |\n| **v0.3.0** | `repo-intel-native` — napi-rs bridge, single-package install, maximum performance |\n\n**v0.1.x highlights (shipped):**\n- Rust core scans 10,000 files in under 200ms\n- Three-layer confidence scoring for stack detection\n- AI agent doc generation via Anthropic, OpenAI, and Ollama\n- Cross-platform binaries for macOS, Linux, and Windows\n- Single package install — platform binary resolved automatically\n- `npx` support with no manual binary install\n\n**v0.2.0 planned:**\n- Incremental cache — skip re-scanning unchanged files\n- Rayon parallel processing — multi-core Rust scanning\n- Watch mode — auto-regenerate docs on file changes\n- YAML output format alongside JSON\n- `--force` flag — skip overwrite prompt on re-generation\n- Deep source file scanning — read actual `.ts`/`.rs` files for richer context\n\n**v0.3.0 planned:**\n- napi-rs bridge — in-process Rust↔Node.js, zero spawn overhead\n- Single package install with bundled binaries\n- `repo-intel-native` — drop-in replacement with identical API\n\nSee [docs/ROADMAP.md](./docs/ROADMAP.md) for the full plan.\n\n---\n\n## Contributing\n\nSee [docs/contributing.md](./docs/contributing.md) for dev setup,\nrunning tests, and the contribution workflow.\n\n**Quick start for contributors:**\n\n```bash\ngit clone https://github.com/ekaone/repo-intel\ncd repo-intel\npnpm install\ncargo build\n```\n\n**Run tests:**\n\n```bash\ncargo test          # Rust tests\npnpm test           # JS tests (from packages/repo-intel)\n```\n\n---\n\n## License\n\nMIT © Eka Prasetia — see [LICENSE](./LICENSE) for details.\n\n## Links\n\n- [NPM Package](https://www.npmjs.com/package/@ekaone/repo-intel)\n- [GitHub Repository](https://github.com/ekaone/repo-intel)\n- [Issue Tracker](https://github.com/ekaone/repo-intel/issues)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with Rust 🦀 + TypeScript · Inspired by the agent skills ecosystem\u003c/sub\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekaone%2Frepo-intel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekaone%2Frepo-intel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekaone%2Frepo-intel/lists"}