{"id":30068177,"url":"https://github.com/hpbyte/h-codex","last_synced_at":"2025-08-08T10:03:17.091Z","repository":{"id":300363839,"uuid":"1005973024","full_name":"hpbyte/h-codex","owner":"hpbyte","description":"A semantic code search tool for intelligent, cross-repo context retrieval.","archived":false,"fork":false,"pushed_at":"2025-08-07T08:18:52.000Z","size":1771,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T08:29:34.646Z","etag":null,"topics":["abstract-syntax-tree","agent","ai","claude-code","code-indexing","code-search","cursor","embedding","java","mcp","nodejs","openai","postgresql","rag","semantic-search","tree-sitter","typescript","vector-database","vibe-coding"],"latest_commit_sha":null,"homepage":"","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/hpbyte.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}},"created_at":"2025-06-21T07:46:10.000Z","updated_at":"2025-08-07T08:18:55.000Z","dependencies_parsed_at":"2025-06-21T09:38:06.610Z","dependency_job_id":null,"html_url":"https://github.com/hpbyte/h-codex","commit_stats":null,"previous_names":["hpbyte/h-codex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hpbyte/h-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpbyte%2Fh-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpbyte%2Fh-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpbyte%2Fh-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpbyte%2Fh-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpbyte","download_url":"https://codeload.github.com/hpbyte/h-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpbyte%2Fh-codex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269402175,"owners_count":24410958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":["abstract-syntax-tree","agent","ai","claude-code","code-indexing","code-search","cursor","embedding","java","mcp","nodejs","openai","postgresql","rag","semantic-search","tree-sitter","typescript","vector-database","vibe-coding"],"created_at":"2025-08-08T10:01:52.743Z","updated_at":"2025-08-08T10:03:17.077Z","avatar_url":"https://github.com/hpbyte.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# h-codex\n\nA semantic code search tool for intelligent, cross-repo context retrieval.\n\n## ✨ Features\n\n- **AST-Based Chunking**: Intelligent code parsing using Abstract Syntax Trees for optimal chunk boundaries\n- **Embedding \u0026 Semantic Search**: Using OpenAI's `text-embedding-3-small` model (support for `voyage-code-3` planned)\n- **Vector Database**: PostgreSQL with pgvector extension for efficient similarity search\n- **Multi-Language Support**: TypeScript, JavaScript, and extensible for other languages\n- **Multi-Project Support**: Index and search multiple projects\n- **MCP Integration**: Seamlessly connects with AI coding assistants through Model Context Protocol\n\n## 🚀 Demo\n\n![demo](./assets/demo-1.gif)\n\n## 💻 Getting Started\n\nh-codex can be integrated with AI assistants through the Model Context Protocol.\n\n### Example with Claude Desktop\n\nEdit your `claude_mcp_settings.json` file:\n\n```json\n{\n  \"mcpServers\": {\n    \"h-codex\": {\n      \"command\": \"npx\",\n      \"args\": [\"@hpbyte/h-codex-mcp\"],\n      \"env\": {\n        \"LLM_API_KEY\": \"your_llm_api_key_here\", \n        \"LLM_BASE_URL\": \"your_llm_base_url_here (default is openai baseurl: https://api.openai.com/v1)\",\n        \"DB_CONNECTION_STRING\": \"postgresql://postgres:password@localhost:5432/h-codex\"\n      }\n    }\n  }\n}\n```\n\n## 🛠️ Development\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) (v18+)\n- [pnpm](https://pnpm.io/) - Package manager\n- [Docker](https://www.docker.com/) - For running PostgreSQL with pgvector\n- OpenAI API key for embeddings\n\n### Getting Started\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/hpbyte/h-codex.git\n   cd h-codex\n   ```\n\n2. **Set up environment variables**\n\n   ```bash\n   cp packages/core/.env.example packages/core/.env\n   ```\n\n   Edit the `.env` file with your OpenAI API key and other configuration options.\n\n3. **Install dependencies**\n\n   ```bash\n   pnpm install\n   ```\n\n4. **Start PostgreSQL database**\n\n   ```bash\n   cd dev \u0026\u0026 docker compose up -d\n   ```\n\n5. **Set up the database**\n\n   ```bash\n   pnpm run db:migrate\n   ```\n\n6. **Start development server**\n\n   ```bash\n   pnpm dev\n   ```\n\n## 🔧 Configuration Options\n\n| Environment Variable   | Description                      | Default                                                 |\n|------------------------|----------------------------------| ------------------------------------------------------- |\n| `LLM_API_KEY`          | LLM API key for embeddings       | Required                                                |\n| `LLM_BASE_URL`         | LLM Base url key for embeddings  | `https://api.openai.com/v1`                                                |\n| `EMBEDDING_MODEL`      | OpenAI model for embeddings      | `text-embedding-3-small`                                |\n| `CHUNK_SIZE`           | Maximum chunk size in characters | `1000`                                                  |\n| `SEARCH_RESULTS_LIMIT` | Max search results returned      | `10`                                                    |\n| `SIMILARITY_THRESHOLD` | Minimum similarity for results   | `0.5`                                                   |\n| `DB_CONNECTION_STRING` | PostgreSQL connection string     | `postgresql://postgres:password@localhost:5432/h-codex` |\n\n## 🏗️ Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Core Package\"\n        subgraph \"Ingestion Pipeline\"\n            Explorer[\"Explorer\u003cbr/\u003e(file discovery)\"]\n            Chunker[\"Chunker\u003cbr/\u003e(AST parsing \u0026 chunking)\"]\n            Embedder[\"Embedder\u003cbr/\u003e(semantic embeddings)\"]\n            Indexer[\"Indexer\u003cbr/\u003e(orchestration)\"]\n\n            Explorer --\u003e Chunker\n            Chunker --\u003e Embedder\n            Embedder --\u003e Indexer\n        end\n\n        subgraph \"Storage Layer\"\n            Repository[\"Repository\"]\n        end\n\n        Indexer --\u003e Repository\n        Repository --\u003e Database[(PostgreSQL Vector Database)]\n    end\n\n    subgraph \"MCP Package\"\n        MCPServer[\"MCP Server\"]\n        CodeIndexTool[\"Code Index Tool\"]\n        CodeSearchTool[\"Code Search Tool\"]\n\n        MCPServer --\u003e CodeIndexTool\n        MCPServer --\u003e CodeSearchTool\n    end\n\n    CodeIndexTool --\u003e Indexer\n    CodeSearchTool --\u003e Repository\n```\n\n## 🗺️ Roadmap\n\n- Support for additional embedding providers (Voyage AI)\n- Enhanced language support with more tree-sitter parsers\n\n## 📄 License\n\nThis project is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpbyte%2Fh-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpbyte%2Fh-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpbyte%2Fh-codex/lists"}