@muvon/octocode 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -59
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ### **Structural Code Intelligence for AI Agents — MCP Server + Knowledge Graph + Semantic Search**
6
6
 
7
+ [![CI](https://github.com/Muvon/octocode/actions/workflows/ci.yml/badge.svg)](https://github.com/Muvon/octocode/actions/workflows/ci.yml)
8
+ [![Crates.io](https://img.shields.io/crates/v/octocode)](https://crates.io/crates/octocode)
7
9
  [![GitHub stars](https://img.shields.io/github/stars/Muvon/octocode?style=social)](https://github.com/Muvon/octocode/stargazers)
8
10
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
9
11
  [![Rust](https://img.shields.io/badge/Rust-1.95%2B-orange.svg)](https://www.rust-lang.org)
@@ -33,17 +35,6 @@
33
35
 
34
36
  **Works with:** Claude Desktop • Cursor • Windsurf • Any MCP-compatible AI
35
37
 
36
- ```json
37
- // Add to your AI assistant config
38
- {
39
- "mcpServers": {
40
- "octocode": {
41
- "command": "octocode",
42
- "args": ["mcp", "--path", "/your/project"]
43
- }
44
- }
45
- }
46
- ```
47
38
 
48
39
  Now your AI assistant can:
49
40
  ```
@@ -67,7 +58,7 @@ AI: *uses LSP find-references* "process_payment() is called from 4 places:
67
58
  ```
68
59
  # Semantic search finds the right code
69
60
  octocode search "authentication middleware"
70
- → src/middleware/auth.rs | Similarity 0.923
61
+ → src/middleware/auth.rs — Similarity: 0.9234
71
62
 
72
63
  # The GraphRAG CLI queries the optional persisted graph
73
64
  octocode config --graphrag-enabled true
@@ -125,8 +116,9 @@ Tilting RRF fusion toward the BM25/keyword signal — which carries disproportio
125
116
  The benchmark also flags what _doesn't_ help here (full 6-variant matrix in [`benchmark/RESULTS.md`](benchmark/RESULTS.md)): a **generic** local cross-encoder reranker (`bge-reranker-base`) actually **regressed** results (Hit@5 0.732 → 0.598) — code retrieval needs a _code-aware_ reranker (e.g. `voyage:rerank-2.5`), not an off-the-shelf one.
126
117
 
127
118
  ```bash
128
- git worktree add /tmp/corpus b1771ba # pin the corpus to the ground-truth commit
129
- CORPUS=/tmp/corpus python3 benchmark/run_matrix.py
119
+ git clone https://github.com/Muvon/octocode && cd octocode
120
+ git worktree add /tmp/corpus b1771ba # pin the corpus to the ground-truth commit
121
+ CORPUS=/tmp/corpus python3 benchmark/run_matrix.py # set OCTO_BIN to use a custom binary
130
122
  ```
131
123
 
132
124
  See [benchmark/README.md](benchmark/README.md) for methodology and metric definitions.
@@ -147,7 +139,10 @@ brew install muvon/tap/octocode
147
139
  <summary><strong>Other installation methods</strong></summary>
148
140
 
149
141
  ```bash
150
- # Cargo (build from source)
142
+ # From crates.io
143
+ cargo install octocode
144
+
145
+ # Or from source (latest)
151
146
  cargo install --git https://github.com/Muvon/octocode
152
147
 
153
148
  # Download binary from releases
@@ -160,7 +155,7 @@ See [Installation Guide](INSTALL.md) for platform-specific instructions.
160
155
  ### 2. Set Up API Keys
161
156
 
162
157
  ```bash
163
- # Required: Embedding provider (Voyage AI has 200M free tokens/month)
158
+ # Required: Embedding provider (Voyage AI has a free tier)
164
159
  export VOYAGE_API_KEY="your-voyage-api-key"
165
160
 
166
161
  # Optional: LLM for commit messages, code review
@@ -196,7 +191,7 @@ See [API Keys guide](doc/API_KEYS.md) for all supported providers.
196
191
  ```bash
197
192
  cd /your/project
198
193
  octocode index
199
- # → Indexed 12,847 blocks across 342 files
194
+ # → ✓ Indexing complete! 342 of 342 files processed (342 new, 0 unchanged)
200
195
  ```
201
196
 
202
197
  ### 4. Search Your Code
@@ -309,44 +304,6 @@ claude mcp add octocode -- octocode mcp --path /path/to/your/project
309
304
 
310
305
  📖 **[Complete MCP Client Setup Guide](doc/MCP_CLIENTS.md)** — Detailed instructions for 15+ clients including VS Code (Cline/Continue), Zed, Replit, and more.
311
306
 
312
- ## 🎯 What Can You Do With It?
313
-
314
- **New developer onboarding:**
315
- ```
316
- You: "How does the authentication system work?"
317
- AI: *searches and navigates* "Authentication starts in src/middleware/auth.rs which
318
- validates JWT tokens. It calls src/auth/jwt.rs for token verification, which uses
319
- the public key from config. Failed auth returns 401 via src/errors/auth_error.rs.
320
- Sessions are stored in Redis via src/cache/session.rs."
321
- ```
322
-
323
- **Code archaeology:**
324
- ```
325
- You: "Find all places we handle database errors"
326
- AI: *structural search* "Found 47 error handling patterns:
327
- - 32 use Result<T, DbError> with proper error types
328
- - 15 use .unwrap() (potential issues in src/db/user.rs:23, src/db/order.rs:156)
329
- - Recommend adding proper error handling to those locations"
330
- ```
331
-
332
- **Refactoring with confidence:**
333
- ```
334
- You: "What depends on the PaymentProcessor trait?"
335
- AI: *queries graph* "src/api/handlers/checkout.rs, src/workers/refund_worker.rs,
336
- and src/cron/billing.rs all depend on PaymentProcessor. The trait is defined
337
- in src/domain/payment.rs and implemented by src/infrastructure/stripe.rs
338
- and src/infrastructure/paypal.rs."
339
- ```
340
-
341
- **Code review assistance:**
342
- ```
343
- You: "Review this PR for security issues"
344
- AI: *analyzes changes* "The PR adds password hashing in src/auth/hash.rs. However,
345
- it uses SHA256 which is fast and vulnerable to brute force. Recommend using
346
- bcrypt or argon2 instead. Also found 3 instances of .unwrap() that could panic
347
- in production."
348
- ```
349
-
350
307
  ## 🌐 Supported Languages
351
308
 
352
309
  16 languages with full tree-sitter AST parsing:
@@ -360,6 +317,7 @@ AI: *analyzes changes* "The PR adds password hashing in src/auth/hash.rs. Howeve
360
317
  | **PHP** | `.php` | Class/function extraction, namespace support |
361
318
  | **C++** | `.cpp`, `.cc`, `.cxx`, `.c++`, `.c`, `.h`, `.hpp`, `.hxx`, `.cppm`, `.ixx`, `.mxx`, `.ccm`, `.cxxm` | Include analysis, class/function extraction, C++20 module support |
362
319
  | **Ruby** | `.rb` | Class/module extraction, method definitions |
320
+ | **Elixir** | `.ex`, `.exs` | Module/protocol extraction, function and macro definitions |
363
321
  | **Java** | `.java` | Import analysis, class/method extraction |
364
322
  | **Swift** | `.swift` | Class/struct/protocol extraction, import analysis |
365
323
  | **Svelte** | `.svelte` | Component structure, script/style block extraction |
@@ -383,18 +341,18 @@ AI: *analyzes changes* "The PR adds password hashing in src/auth/hash.rs. Howeve
383
341
 
384
342
  ## 🔒 Privacy & Security
385
343
 
386
- - **🏠 Local-first** — local embedding models available on supported platforms (macOS ARM default builds); cloud providers on all platforms
344
+ - **🏠 Local-first** — fully local embedding via fastembed (no API key required); cloud providers optional
387
345
  - **🔐 Secure** — API keys stored locally, env vars supported
388
346
  - **🚫 Respects .gitignore** — Never indexes sensitive files
389
347
  - **🛡️ MCP security** — Local-only server, no external network for search
390
- - **📤 Cloud-safe** — Embeddings process only metadata, never source code
348
+ - **📤 Cloud-safe** — cloud providers receive only the code chunks being embedded; use local models for fully offline indexing
391
349
 
392
350
  <details>
393
351
  <summary><strong>📊 Retrieval Quality Benchmark</strong></summary>
394
352
 
395
353
  We measure semantic search quality using a hand-annotated ground truth dataset of 254 queries (127 code + 127 docs) with precise line-range annotations. Each query has 1–3 expected results scored by relevance.
396
354
 
397
- Tested on commit [`b1771ba`](https://github.com/Muvon/octocode/commit/b1771ba) with [benchmark config](benchmark/config.toml) (contextual retrieval, Voyage reranker, RaBitQ quantization).
355
+ These numbers use the **full cloud stack** — contextual retrieval, Voyage reranker, RaBitQ quantization — on commit [`b1771ba`](https://github.com/Muvon/octocode/commit/b1771ba) with [benchmark config](benchmark/config.toml). For the fully local baseline and the complete variant matrix, see [Retrieval Quality](#-retrieval-quality) above and [`benchmark/RESULTS.md`](benchmark/RESULTS.md).
398
356
 
399
357
  <details>
400
358
  <summary><strong>Documentation search</strong> (<code>--mode docs</code>) — Hit@10: 0.953, MRR: 0.776</summary>
@@ -467,4 +425,4 @@ Apache License 2.0 — See [LICENSE](LICENSE) for details.
467
425
 
468
426
  </div>
469
427
 
470
- mcp-name: io.github.Muvon/octocode
428
+ <!-- mcp-name: io.github.Muvon/octocode -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muvon/octocode",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "AI-powered code indexer with semantic search and knowledge graphs",
5
5
  "mcpName": "io.github.Muvon/octocode",
6
6
  "bin": {