{
  "markdown": "# Gemini Code Intel\n\nGemini Code Intel is a Model Context Protocol (MCP) plugin that enables semantic code search for AI assistants. It provides deep context from an entire codebase by indexing it into a local vector database, allowing efficient and cost-effective retrieval of relevant code snippets.\n\n## Modules\n\n### Core (@gemini/gemini-code-intel-core)\nThe core indexing engine responsible for semantic search and codebase analysis.\n\n- **Key Features**:\n  - Multi-language support (TypeScript, JavaScript, Python, Java, C++, and more).\n  - Hybrid search combining BM25 and vector search for improved accuracy.\n  - AST-based intelligent code chunking to preserve syntax and context.\n  - Incremental synchronization using Merkle trees for efficient re-indexing.\n- **Configuration**:\n  - ContextConfig: Configures embedding provider, vector database instance, splitting strategy, and file patterns.\n- **API Reference**:\n  - indexCodebase: Indexes an entire directory.\n  - reindexByChange: Incrementally updates the index based on file changes.\n  - semanticSearch: Performs semantic queries against the indexed code.\n  - clearIndex: Removes existing index data.\n\n### MCP (@gemini/gemini-code-intel-mcp)\nIntegrates the core engine with the Model Context Protocol for use with AI agents and clients.\n\n- **Prerequisites**: Node.js (20+), Gemini API key.\n- **Environment Variables**:\n  - GEMINI_API_KEY: Required API key for embeddings.\n  - EMBEDDING_MODEL: Optional model specification (default: gemini-embedding-001).\n  - DB_URI: Optional local storage path (default: ~/.gemini-code-intel/db).\n  - EMBEDDING_BATCH_SIZE: Optional batch size for performance tuning.\n- **Available Tools**:\n  - index_codebase: Index a codebase directory.\n  - search_code: Search using natural language queries.\n  - clear_index: Reset the search index.\n  - get_indexing_status: Retrieve current indexing progress.\n\n## Installation\n\n### Recommended: Install as Gemini Extension\nThis is the recommended way to use Gemini Code Intel as it automatically configures the MCP server and provides an integrated **Agent Skill**.\n\n#### Direct Installation (Pre-built)\nYou can install the extension directly from the repository. The build artifacts (`dist` folders) are included, so you don't need to manually build the TypeScript code. However, **you must still install dependencies** because this extension relies on native system bindings (like `tree-sitter` and `vectordb`).\n\n1. Install the extension using the CLI:\n   ```bash\n   gemini extensions install https://github.com/akh64bit/semantic-code-intelligence\n   ```\n2. Navigate to the installed extension directory (usually `~/.gemini/extensions/semantic-code-intelligence` or similar).\n3. Install the dependencies to fetch the required native binaries for your OS:\n   ```bash\n   pnpm install\n   ```\n\n#### Manual Installation (From Source)\nIf you are working from the source code, follow these steps:\n1. **Build the Project**:\n   ```bash\n   pnpm install\n   pnpm build\n   ```\n2. **Link the Extension**:\n   ```bash\n   gemini extensions link .\n   ```\n\n### Troubleshooting \"Disconnected\" Status\n\nIf the extension shows as **Disconnected** 🔴 after installation, it's usually due to missing configuration or native dependencies.\n\n#### 1. Configure your API Key\nThe MCP server requires a Gemini API key. You can set it using the extension configuration:\n```bash\n# This will prompt you to enter the key\ngemini extensions config gemini-code-intel GEMINI_API_KEY\n```\n\n#### 2. Install Native Dependencies\nThis extension uses native binaries for high-performance code parsing and vector search. If they weren't installed correctly:\n1. Navigate to the extension directory: `~/.gemini/extensions/gemini-code-intel`\n2. Run `pnpm install`\n3. If using `pnpm`, you may need to allow the build scripts for native modules:\n   ```bash\n   pnpm approve-builds\n   pnpm install\n   ```\n\n#### 3. Check logs\nIf it's still disconnected, check the extension logs for detailed error messages.\n\n## Manual MCP Setup (Optional)\nIf you prefer to configure the MCP server manually in your `settings.json`:\n1. Build the project as shown above.\n2. Add the following to your `mcpServers` section:\n```json\n\"gemini-code-intel\": {\n  \"command\": \"node\",\n  \"args\": [\"/path/to/gemini-code-intel/packages/mcp/dist/index.js\"],\n  \"env\": {\n    \"GEMINI_API_KEY\": \"your-api-key\",\n    \"DB_URI\": \"~/.gemini-code-intel/db\"\n  }\n}\n```\n\n## Technical Overview\n\n- **Storage**: Uses high-performance, serverless embedded vector storage.\n- **Embeddings**: Optimized for Google's Gemini embedding models.\n- **Languages**: Supports TypeScript, JavaScript, Python, Java, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Scala, and Markdown.\n",
  "bytes": 4695,
  "sha": "5e7aa52d0e0a8871d29440094c2896eb0d6fa2defd37a16a3718d2593d33247c",
  "repo_slug": "akh64bit/semantic-code-intelligence",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_akh64bit_semantic_code_intelligence_6e9efb04/readme"
}