{"id":49558036,"url":"https://github.com/fazleyrabby/xencode","last_synced_at":"2026-05-03T06:17:16.827Z","repository":{"id":353748007,"uuid":"1220709334","full_name":"fazleyrabby/xencode","owner":"fazleyrabby","description":"Fast local coding assistant that understands your codebase using RAG.","archived":false,"fork":false,"pushed_at":"2026-04-25T09:51:39.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T11:27:41.033Z","etag":null,"topics":["ai","embeddings","llm","rag","sqlite","vector-database"],"latest_commit_sha":null,"homepage":"","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/fazleyrabby.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-25T08:18:01.000Z","updated_at":"2026-04-25T09:51:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fazleyrabby/xencode","commit_stats":null,"previous_names":["fazleyrabby/xencode"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fazleyrabby/xencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazleyrabby%2Fxencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazleyrabby%2Fxencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazleyrabby%2Fxencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazleyrabby%2Fxencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fazleyrabby","download_url":"https://codeload.github.com/fazleyrabby/xencode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazleyrabby%2Fxencode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32559760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","embeddings","llm","rag","sqlite","vector-database"],"created_at":"2026-05-03T06:17:15.352Z","updated_at":"2026-05-03T06:17:16.823Z","avatar_url":"https://github.com/fazleyrabby.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xencode\n\nLocal-first code-aware RAG assistant and agentic coding system for PHP/JS/TS/Vue projects.\n\n## Features\n\n- **Fast embedding** with BGE-M3 ONNX model (local, no API needed)\n- **Smart chunking** - extracts functions/classes, avoids vendor noise\n- **Hybrid search** - vector + keyword matching\n- **Full context** - stores complete code for LLM (no truncation)\n- **CLI spinners** - animated progress with ETA\n- **Stale index warning** - alerts if index is outdated\n- **Agentic coding** - plan → retrieve → patch → diff → approve → apply\n- **Inline approval UI** - keyboard-driven patch review (Enter/Esc/E/V)\n- **Multi-project workspaces** - index and switch between multiple projects\n\n## Quick Start\n\n```bash\n# 1. Install\nnpm install\n\n# 2. Start your LLM server (e.g., MLX, Ollama) on port 8080\n\n# 3. Index your codebase\nnode src/app.js index ./my-project\n\n# 4. Ask questions\nnode src/app.js ask \"How does billing work?\"\n\n# 5. Generate and apply patches\nnode src/app.js agent \"Add refund method to PaymentService\"\n```\n\n## Usage\n\n```bash\n# Index a codebase\nnode src/app.js index ./my-project\n\n# List indexed projects\nnode src/app.js projects\n\n# Switch between projects\nnode src/app.js use my-project\n\n# Ask questions (auto-detects current project)\nnode src/app.js ask \"Show me the Product model\"\nnode src/app.js ask \"How does refund payment work?\"\n\n# Generate patches with inline approval\nnode src/app.js agent \"Add refund method to PaymentService\"\nnode src/app.js agent \"Create Laravel refund service\" --review\n\n# Re-index after code changes\nnode src/app.js index ./my-project\n```\n\n## Configuration\n\n```bash\n# LLM endpoint (default: http://127.0.0.1:8080)\nexport LLM_URL=http://127.0.0.1:8080\n\n# LLM models (optional — role-based routing)\nexport LLM_MODEL=\"\"\nexport LLM_MODEL_PLANNER=\"\"    # Fast model for intent parsing\nexport LLM_MODEL_CODER=\"\"      # Best model for patch generation\nexport LLM_MODEL_REVIEWER=\"\"   # Strict model for review\n```\n\n## Tech Stack\n\n- Transformers.js (local ONNX embedding: BGE-M3)\n- better-sqlite3\n- Node.js ESM\n- OpenAI-compatible LLM API\n- diff + chalk for colored diff output\n\n## Project Structure\n\n```\nsrc/\n  app.js          - CLI entry point\n  workspace.js    - Multi-project workspace manager\n  embedder.js     - BGE-M3 embedding (256 char truncation)\n  indexer.js      - Code scanning \u0026 chunking\n  search.js       - Hybrid search (vector + keyword)\n  context.js      - Result formatting\n  llm.js          - LLM client (role-based routing)\n  db.js           - Per-project SQLite storage\n  ui.js           - Spinner animations\n  agent/\n    agent.js      - Orchestrator (pipeline)\n    planner.js    - Intent parser\n    coder.js      - Patch generator\n    reviewer.js   - Validation + retry\n    tool.js       - Patch application\n    diff.js       - Unified diff output\n    approval.js   - Inline approval UI (keypress)\n.xencode/\n  projects/       - Per-project databases\n  current_project.json\ndocs/\n  guide.md        - Full user guide\n  architecture.md - System design\n  performance.md  - Benchmarks\n  troubleshooting.md - Common issues\n```\n\n## Documentation\n\n- **[User Guide](docs/guide.md)** - Step-by-step instructions\n- **[Architecture](docs/architecture.md)** - System design\n- **[Performance](docs/performance.md)** - Benchmarks\n- **[Troubleshooting](docs/troubleshooting.md)** - Common issues\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazleyrabby%2Fxencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffazleyrabby%2Fxencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazleyrabby%2Fxencode/lists"}