@octocodeai/octocode-tools-core 16.5.1 → 16.6.2

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 (95) hide show
  1. package/README.md +200 -254
  2. package/dist/direct.js +37 -33
  3. package/dist/errors/localToolErrors.d.ts +1 -0
  4. package/dist/github/githubAPI.d.ts +22 -0
  5. package/dist/github/history.d.ts +3 -0
  6. package/dist/github/prTransformation.d.ts +1 -1
  7. package/dist/index.d.ts +6 -8
  8. package/dist/index.js +44 -40
  9. package/dist/oql/adapters/compile.d.ts +25 -0
  10. package/dist/oql/adapters/github.d.ts +3 -0
  11. package/dist/oql/adapters/local.d.ts +8 -0
  12. package/dist/oql/adapters/materialize.d.ts +11 -0
  13. package/dist/oql/adapters/pagination.d.ts +21 -0
  14. package/dist/oql/adapters/researchTargets.d.ts +50 -0
  15. package/dist/oql/adapters/resultMap.d.ts +20 -0
  16. package/dist/oql/adapters/ruleYaml.d.ts +11 -0
  17. package/dist/oql/adapters/runner.d.ts +14 -0
  18. package/dist/oql/adapters/v2.d.ts +32 -0
  19. package/dist/oql/capabilities.d.ts +31 -0
  20. package/dist/oql/defaults.d.ts +26 -0
  21. package/dist/oql/diagnostics.d.ts +25 -0
  22. package/dist/oql/diffLanes.d.ts +29 -0
  23. package/dist/oql/envelope.d.ts +21 -0
  24. package/dist/oql/features.d.ts +7 -0
  25. package/dist/oql/index.d.ts +27 -0
  26. package/dist/oql/index.js +49 -0
  27. package/dist/oql/normalize.d.ts +5 -0
  28. package/dist/oql/planner.d.ts +7 -0
  29. package/dist/oql/research/analyze.d.ts +134 -0
  30. package/dist/oql/research/packets.d.ts +80 -0
  31. package/dist/oql/run.d.ts +32 -0
  32. package/dist/oql/schema.d.ts +1018 -0
  33. package/dist/oql/schemeText.d.ts +154 -0
  34. package/dist/oql/shorthand.d.ts +177 -0
  35. package/dist/oql/targetParams.d.ts +20 -0
  36. package/dist/oql/transformers/contract.d.ts +19 -0
  37. package/dist/oql/transformers/github/code.d.ts +17 -0
  38. package/dist/oql/transformers/github/common.d.ts +8 -0
  39. package/dist/oql/transformers/language.d.ts +1 -0
  40. package/dist/oql/transformers/registry.d.ts +16 -0
  41. package/dist/oql/transformers/types.d.ts +11 -0
  42. package/dist/oql/types.d.ts +640 -0
  43. package/dist/oql/v2params.d.ts +22 -0
  44. package/dist/providers/types.d.ts +1 -1
  45. package/dist/schema.d.ts +13 -0
  46. package/dist/schema.js +9 -0
  47. package/dist/serverConfig.d.ts +0 -1
  48. package/dist/session.d.ts +2 -24
  49. package/dist/shared/config/defaults.d.ts +1 -2
  50. package/dist/shared/config/index.d.ts +2 -3
  51. package/dist/shared/config/index.js +2 -3
  52. package/dist/shared/config/resolverSections.d.ts +1 -3
  53. package/dist/shared/config/runtimeSurface.d.ts +5 -4
  54. package/dist/shared/config/schemas.d.ts +0 -1
  55. package/dist/shared/config/types.d.ts +0 -8
  56. package/dist/shared/credentials/envTokens.d.ts +1 -1
  57. package/dist/shared/credentials/index.js +1 -2
  58. package/dist/shared/credentials/types.d.ts +1 -1
  59. package/dist/shared/index.d.ts +0 -1
  60. package/dist/shared/languageSelectors.d.ts +23 -0
  61. package/dist/shared/paths.d.ts +2 -3
  62. package/dist/shared/paths.js +1 -1
  63. package/dist/shared/session/index.js +1 -2
  64. package/dist/tools/directToolCatalog.d.ts +15 -56
  65. package/dist/tools/directToolCatalog.exec.d.ts +11 -0
  66. package/dist/tools/directToolCatalog.meta.d.ts +83 -0
  67. package/dist/tools/github_clone_repo/cache.d.ts +1 -1
  68. package/dist/tools/github_clone_repo/types.d.ts +2 -0
  69. package/dist/tools/github_fetch_content/scheme.d.ts +81 -59
  70. package/dist/tools/github_fetch_content/types.d.ts +27 -0
  71. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
  72. package/dist/tools/lsp/semantic_content/scheme.d.ts +164 -10
  73. package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
  74. package/dist/tools/lsp/shared/semanticTypes.d.ts +34 -5
  75. package/dist/tools/oql_search/execution.d.ts +7 -0
  76. package/dist/tools/package_search/execution.d.ts +33 -0
  77. package/dist/tools/package_search/scheme.d.ts +8 -0
  78. package/dist/tools/providerMappers.d.ts +7 -7
  79. package/dist/tools/toolConfig.d.ts +1 -0
  80. package/dist/tools/toolNames.d.ts +2 -0
  81. package/dist/types/server.d.ts +1 -2
  82. package/dist/types/session.d.ts +0 -19
  83. package/dist/utils/contextUtils.d.ts +15 -1
  84. package/dist/utils/core/types.d.ts +2 -1
  85. package/dist/utils/markdownOutline.d.ts +10 -0
  86. package/dist/utils/response/groupedFinalizer.d.ts +0 -23
  87. package/package.json +14 -3
  88. package/dist/commands/BaseCommandBuilder.d.ts +0 -14
  89. package/dist/commands/FindCommandBuilder.d.ts +0 -23
  90. package/dist/commands/LsCommandBuilder.d.ts +0 -15
  91. package/dist/shared/logger/index.d.ts +0 -2
  92. package/dist/shared/logger/logger.d.ts +0 -17
  93. package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
  94. package/dist/utils/ranking/evidenceRanker.d.ts +0 -86
  95. package/dist/utils/response/structuredPagination.d.ts +0 -9
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
- # Agentic Research Platform
1
+ # Octocode - Agentic Research Platform
2
2
 
3
3
  <div align="center">
4
4
  <img src="https://github.com/bgauryy/octocode/raw/main/packages/octocode-mcp/assets/logo_white.png" width="400px" alt="Octocode Logo">
5
5
 
6
6
  [![MCP Community Server](https://img.shields.io/badge/Model_Context_Protocol-Official_Community_Server-blue?style=flat-square)](https://github.com/modelcontextprotocol/servers)
7
7
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bgauryy/octocode)
8
+
8
9
  [![Website](https://img.shields.io/badge/Website-007ACC?style=for-the-badge&logo=link&logoColor=white)](https://octocode.ai)
9
10
  [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@Octocode-ai)
10
11
 
@@ -20,7 +21,9 @@ Run it as a **CLI** or an **MCP server**. A **Rust engine** keeps every call fas
20
21
 
21
22
  ## Table of Contents
22
23
 
24
+ - [Quick Start](#quick-start)
23
25
  - [Why Octocode](#why-octocode)
26
+ - [What You Can Do](#what-you-can-do)
24
27
  - [Tools](#tools)
25
28
  - [MCP](#mcp)
26
29
  - [CLI](#cli)
@@ -31,98 +34,89 @@ Run it as a **CLI** or an **MCP server**. A **Rust engine** keeps every call fas
31
34
  - [Skills](#skills)
32
35
  - [Architecture](#architecture)
33
36
  - [Documentation](#documentation)
34
- - [Contributing](#contributing)
37
+ - [Troubleshooting](#troubleshooting)
35
38
 
36
39
  ---
37
40
 
38
- ## Why Octocode
39
-
40
- Agents write better code from evidence than from assumptions. Octocode turns *guess-driven* work into **research-driven** work. Before an agent changes, reviews, or explains code, it gathers real evidence from your local workspace **and** from GitHub repositories, pull requests, and npm packages, then hands it back as compact, citable context. *Code is truth; context is the map.*
41
-
42
- Most tools cover one slice: searching the web, or grepping your repo. Octocode covers the **whole research flow, end to end**:
43
-
44
- - **Built for scale.** In organizations with thousands of repositories and endless code, Octocode is the solution: spot a pattern in one repo, follow it through the pull request that introduced it, then trace the same shape across other repos and your own files without leaving the conversation. Clone any repo and study it locally, on any machine.
45
- - **Smart GitHub workflows.** Parallel bulk queries and built-in **next-step hints** keep the agent on the cheapest path: search broadly, read narrowly, trace semantically. Each result points to the natural follow-up.
46
- - **No GitHub required.** Even without GitHub, clone any repository locally and point Octocode's local tools (search, structural AST, LSP, content) at it for the same evidence-first research.
47
- - **Reads the shape, not the noise.** Code is minified and skeletonized on the fly across 70+ languages, so an agent grasps a 100 KB file in a few hundred tokens instead of spending its context on boilerplate.
48
- - **Fast and self-contained.** Search, parsing, semantic navigation, and redaction run in one prebuilt **Rust engine**: quick on a laptop or a mega-repo, with no extra toolchain to install.
49
- - **Safe by default.** Every byte returned to the model is scanned and secrets redacted first (see [Security](#security)).
50
-
51
- ### Get Started
41
+ ## Quick Start
52
42
 
53
- Add Octocode to an AI assistant with MCP, or run the same tools directly from
54
- your terminal with the CLI.
43
+ **1. Run the Octocode CLI with `npx`**
55
44
 
56
- **MCP fast install:**
45
+ ```bash
46
+ npx octocode --help
47
+ ```
57
48
 
58
- [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJvY3RvY29kZS1tY3BAbGF0ZXN0Il19) [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D)
49
+ **2. Authenticate with GitHub** optional, but unlocks private repositories and higher API rate limits:
59
50
 
60
51
  ```bash
61
- # Interactive installer for Cursor, Claude Code, Codex, VS Code, and more
62
- npx octocode install
52
+ npx octocode auth login
53
+ npx octocode status # verify the active token source
63
54
  ```
64
55
 
65
- **CLI fast install:**
56
+ **3. Choose your interface.** The same engine and 14 tools run identically either way.
57
+
58
+ **🖥️ CLI** — research straight from your terminal:
66
59
 
67
60
  ```bash
68
- # Run without installing globally
69
61
  npx octocode
70
-
71
- # Or install once on macOS/Linux
72
- brew install bgauryy/octocode/octocode
73
- octocode
74
62
  ```
75
63
 
76
- Authenticate GitHub when you want private repositories or higher API limits:
64
+ **🤖 MCP** one-click install:
65
+
66
+ - [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwidHlwZSI6InN0ZGlvIiwiYXJncyI6WyJAb2N0b2NvZGVhaS9tY3BAbGF0ZXN0Il19)
67
+ - [<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code">](https://insiders.vscode.dev/redirect/mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
68
+ - [<img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect/mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D&quality=insiders)
69
+ - [<img src="https://img.shields.io/badge/Windsurf-Install_Server-1a1a1a?style=flat-square&logoColor=white" alt="Install in Windsurf">](windsurf://mcp/install?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
70
+ - [<img src="https://kiro.dev/images/add-to-kiro.svg" alt="Install in Kiro">](https://kiro.dev/launch/mcp/add?name=octocode&config=%7B%22command%22%3A%22npx%22%2C%22type%22%3A%22stdio%22%2C%22args%22%3A%5B%22%40octocodeai%2Fmcp%40latest%22%5D%7D)
71
+ - [<img src="https://goose-docs.ai/img/extension-install-dark.svg" alt="Install in Goose">](https://goose-docs.ai/extension?cmd=npx&arg=%40octocodeai%2Fmcp%40latest&id=octocode&name=octocode&description=Evidence-first%20code%20research%20for%20AI%20agents)
72
+ - [<img src="https://files.lmstudio.ai/deeplink/mcp-install-light.svg" alt="Install in LM Studio">](https://lmstudio.ai/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwidHlwZSI6InN0ZGlvIiwiYXJncyI6WyJAb2N0b2NvZGVhaS9tY3BAbGF0ZXN0Il19)
73
+
74
+ **Claude Code:**
77
75
 
78
76
  ```bash
79
- npx octocode auth login
77
+ claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["@octocodeai/mcp@latest"]}'
80
78
  ```
81
79
 
82
- ### Benchmarks
80
+ **Any other client:** `npx octocode install`
83
81
 
84
- Latest benchmark output:
85
- [packages/octocode-benchmark/output](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/output/).
82
+ ➡️ Learn more at **[octocode.ai](https://octocode.ai)**.
86
83
 
87
- #### ast-grep Structural Comparison
84
+ ---
85
+
86
+ ## Why Octocode
88
87
 
89
- Bars show relative throughput. Higher is better; lower `ms` is better.
88
+ Agents write better code from evidence than from assumptions. Octocode turns *guess-driven* work into **research-driven** work. Before an agent changes, reviews, or explains code, it gathers real evidence from your local workspace **and** from GitHub repositories, pull requests, and npm packages, then hands it back as compact, citable context. *Code is truth; context is the map.*
90
89
 
91
- What we tested: ast-grep CLI and Octocode structural grep on the same real
92
- repository files, using the same broad AST node-kind searches
93
- (`call_expression`, `call`, `method_invocation`). The goal was to check
94
- structural AST grep compatibility by match count, then measure where time is
95
- spent across Octocode's raw matcher, agent tool path, and public CLI.
90
+ Most tools cover one slice: searching the web, or grepping your repo. Octocode covers the **whole research flow, end to end**:
96
91
 
97
- This benchmark does not test text grep, LSP navigation, rewriting, or the full
98
- ast-grep rule language. Those are separate capabilities.
92
+ - **Built for scale.** In organizations with thousands of repositories and endless code, Octocode is the solution: spot a pattern in one repo, follow it through the pull request that introduced it, then trace the same shape across other repos and your own files without leaving the conversation. Clone any repo and study it locally, on any machine.
93
+ - **Smart GitHub workflows.** Parallel bulk queries and built-in **next-step hints** keep the agent on the cheapest path: search broadly, read narrowly, trace semantically. Each result points to the natural follow-up.
94
+ - **No GitHub required.** Even without GitHub, clone any repository locally and point Octocode's local tools (search, structural AST, LSP, content) at it for the same evidence-first research.
95
+ - **Reads the shape, not the noise.** Code is minified and skeletonized on the fly across 70+ languages, so an agent grasps a 100 KB file in a few hundred tokens instead of spending its context on boilerplate.
96
+ - **Fast and self-contained.** Search, parsing, semantic navigation, and redaction run in one prebuilt **Rust engine**: quick on a laptop or a mega-repo, with no extra toolchain to install.
97
+ - **Safe by default.** Every byte returned to the model is scanned and secrets redacted first (see [Security](#security)).
99
98
 
100
- ```text
101
- Octocode raw native ████████████████████ 5.0 ms median │ 3.0x faster │ 6/6 matched
102
- ast-grep CLI ███████░░░░░░░░░░░░░ 15.1 ms median │ baseline │ 6/6 matched
103
- ```
99
+ ## What You Can Do
104
100
 
105
- `Octocode raw native` means the direct Rust/NAPI `structuralSearchFiles`
106
- matcher: parse and match only, with no tool validation, sanitizer, pagination,
107
- JSON shaping, or Node CLI startup. The agent-facing `localSearchCode` and public
108
- `octocode grep` paths are intentionally slower because they include those safety
109
- and DX layers.
101
+ Octocode is useful whenever the next coding step depends on finding and proving context, not guessing it.
110
102
 
111
- What was checked: we took ast-grep's benchmark scenario repo list, picked one
112
- deterministic file from each supported repo, asked both tools to find the same
113
- AST node kind in that file, verified identical match counts, then timed the
114
- median run.
103
+ | Need | Use Octocode to |
104
+ |------|-----------------|
105
+ | **Codebase questions** | Search local or GitHub code, read exact regions, browse trees, and carry file/line anchors into the answer. |
106
+ | **Implementation research** | Compare patterns across repositories, npm packages, pull requests, commits, and local files before changing code. |
107
+ | **Semantic navigation** | Resolve definitions, references, callers/callees, call hierarchy, hovers, symbols, diagnostics, and type relationships through LSP. |
108
+ | **Structural matching** | Run AST-shaped searches with patterns or YAML rules so comments and strings do not become false positives. |
109
+ | **Large-file context** | Minify, skeletonize, or paginate code so agents spend tokens on relevant structure instead of boilerplate. |
110
+ | **Binary or archive inspection** | Inspect archives, compressed streams, native binaries, and strings without leaving the research flow. |
111
+ | **Agent workflows** | Expose the same engine through MCP, CLI, OQL, and Agent Skills so assistants and humans use one evidence model. |
115
112
 
116
- Benchmark files:
117
- [runner](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/ast-grep/compare-upstream-scenarios.mjs) ·
118
- [scenario manifest](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/ast-grep/upstream-outline-scenarios.json) ·
119
- [latest output](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/output/comparison.md)
113
+ See [Quick Start](#quick-start) to install in your terminal or AI assistant.
120
114
 
121
115
  ---
122
116
 
123
117
  ## Tools
124
118
 
125
- Octocode ships **13 research tools**; the same implementations run identically over [MCP](#mcp) and the [CLI](#cli). `ghCloneRepo` is opt-in for MCP (`ENABLE_CLONE=true`) and enabled by default for CLI; local tools require `ENABLE_LOCAL` (CLI default: on, MCP default: off). All flags: [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CONFIGURATION.md).
119
+ Octocode ships **14 research tools**; the same implementations run identically over [MCP](#mcp) and the [CLI](#cli). Local tools are enabled by default; `ENABLE_LOCAL=false` disables them. `ghCloneRepo` is opt-in for MCP (`ENABLE_CLONE=true`) and enabled by default for CLI. All flags: [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
126
120
 
127
121
  **Token knobs.** `concise:true` returns path/title-only lists. `minify` controls file read density: `symbols` = skeleton with line numbers, `standard` = comments/blanks stripped (default), `none` = exact bytes.
128
122
 
@@ -157,106 +151,92 @@ Octocode ships **13 research tools**; the same implementations run identically o
157
151
 
158
152
  | Tool | What it does |
159
153
  |------|--------------|
160
- | `lspGetSemantics` | Typed semantic navigation. Raw tools support `definition`, `references`, `callers`, `callees`, `callHierarchy`, `hover`, `documentSymbols`, `typeDefinition`, and `implementation`. The CLI `lsp` shortcut is for symbol-anchored queries only; use `ls --symbols` for `documentSymbols`. Navigation runs through installed language servers (see the [LSP Tools Reference](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LSP_TOOLS.md)). |
161
-
162
- **Per-tool references** (full schemas, fields, and examples) live in **[`docs/mcp`](https://github.com/bgauryy/octocode/tree/main/docs/mcp)**:
163
- - [GitHub Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/GITHUB_TOOLS.md)
164
- - [Local Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LOCAL_TOOLS.md)
165
- - [Binary Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/BINARY_TOOLS.md)
166
- - [LSP Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LSP_TOOLS.md)
167
- - [Tool Behavior Guide](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/TOOL_BEHAVIOR.md)
168
-
169
- ---
154
+ | `lspGetSemantics` | Typed semantic navigation. Raw tools support `definition`, `references`, `callers`, `callees`, `callHierarchy`, `hover`, `documentSymbols`, `typeDefinition`, `implementation`, `workspaceSymbol`, `supertypes`, `subtypes`, and `diagnostic`. The CLI uses `npx octocode search <file> --op <type>` for semantics and `npx octocode search <file> --symbols` for file or directory symbol outlines. Navigation runs through installed language servers (see the [LSP Tools Reference](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_TOOLS.md#lsp-tools-reference)). |
170
155
 
171
- ## MCP
172
-
173
- The MCP server exposes all 13 tools directly to your AI assistant over stdio. Install once; the assistant calls tools automatically.
156
+ ### OQL Search
174
157
 
175
- ### Install
176
-
177
- **Fast install:**
158
+ | Tool | What it does |
159
+ |------|--------------|
160
+ | `oqlSearch` | Runs typed OQL queries across code, content, structure, files, semantics, repositories, packages, pull requests, commits, artifacts, diff, research, graph, and materialization targets. |
178
161
 
179
- [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJvY3RvY29kZS1tY3BAbGF0ZXN0Il19) [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D)
162
+ Full schemas, fields, and examples for every tool live in [`docs/OCTOCODE_TOOLS.md`](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_TOOLS.md) (linked under [Documentation](#documentation)).
180
163
 
181
- **Or use the installer (detects your installed clients):**
164
+ ---
182
165
 
183
- ```bash
184
- # Interactive: detects your installed clients
185
- npx octocode install
166
+ ## MCP
186
167
 
187
- # Non-interactive
188
- octocode install --ide cursor
189
- octocode install --ide claude-code
190
- ```
168
+ The MCP server exposes the Octocode tool catalog directly to your AI assistant over stdio.
191
169
 
192
170
  https://github.com/user-attachments/assets/de8d14c0-2ead-46ed-895e-09144c9b5071
193
171
 
194
172
  ### Manual Configuration
195
173
 
196
- Add to your MCP client config file:
174
+ Add to your MCP client config. Pick the package that matches the version you want:
175
+
176
+ **New Octocode (Rust-powered engine)** — use `@octocodeai/mcp`:
197
177
 
198
178
  ```json
199
179
  {
200
- "mcpServers": {
201
- "octocode": {
202
- "command": "npx",
203
- "args": ["octocode-mcp@latest"]
204
- }
180
+ "octocode": {
181
+ "command": "npx",
182
+ "type": "stdio",
183
+ "args": [
184
+ "@octocodeai/mcp@latest"
185
+ ]
205
186
  }
206
187
  }
207
188
  ```
208
189
 
209
- For GitHub auth, add a token under `env` (see [Authentication Methods](#authentication-methods)).
190
+ **Classic octocode-mcp** use `octocode-mcp`:
210
191
 
211
- ### Configuration
192
+ ```json
193
+ {
194
+ "octocode": {
195
+ "command": "npx",
196
+ "type": "stdio",
197
+ "args": [
198
+ "octocode-mcp@latest"
199
+ ]
200
+ }
201
+ }
202
+ ```
212
203
 
213
- Set tokens and options as `env` entries here, or machine-wide in `.octocoderc`. See [Configuration](#configuration) for every setting, the home-folder layout, and precedence.
204
+ Add a GitHub token and options under `env` see [Authentication](#authentication-methods) and [Configuration](#configuration).
214
205
 
215
206
  ---
216
207
 
217
208
  ## CLI
218
209
 
219
- The CLI exposes the same research engine without an MCP client. Use quick commands for humans, or call raw tools from scripts and CI.
220
-
221
- ### Install
210
+ Same research engine, no MCP client needed. Local paths route to local tools; `owner/repo[/path]` routes to GitHub.
222
211
 
223
212
  ```bash
224
- brew install bgauryy/octocode/octocode
225
- # or
226
- npm install -g octocode
213
+ npx octocode auth login # authenticate once
214
+ npx octocode status # verify setup
215
+ npx octocode --help # full usage
227
216
  ```
228
217
 
229
- ```bash
230
- octocode login
231
- octocode status
232
- ```
218
+ ### Commands
219
+
220
+ #### Search
221
+
222
+ | Command | What it does |
223
+ |---------|--------------|
224
+ | `npx octocode search <term> <path\|owner/repo>` | Text, regex, AST structural (`--pattern`), or full OQL (`--query`) |
225
+ | `npx octocode search <path\|owner/repo> --tree` | Browse directory or repository structure |
226
+ | `npx octocode search <file>` | Read file content; `--content-view exact\|compact\|symbols` or `--raw` |
227
+ | `npx octocode search <file> --symbols` | Symbol outline for a file or source tree |
228
+ | `npx octocode search --query <oql-json>` | Full OQL across all target types (code, commits, PRs, packages, artifacts …) |
233
229
 
234
- ### All Commands
235
-
236
- Local paths route to local tools; `owner/repo[/path]` targets route to GitHub tools.
237
-
238
- | Command | Use it for |
239
- |---------|------------|
240
- | `octocode ls <path\|owner/repo>` | Browse local or GitHub structure; a file or `--symbols` shows a symbol outline |
241
- | `octocode cat <path\|owner/repo/path>` | Read a file, symbol skeleton (`--mode symbols`), line range, or matched slice |
242
- | `octocode grep <term> <path\|owner/repo>` | Text/regex search, or AST structural search with `--pattern` / `--rule` (local). `--type` accepts extensions and language aliases such as `ts`, `rust`, `typescript`, and `*.rs`. |
243
- | `octocode find <query> [path\|owner/repo]` | Find files by name, path, metadata, or content |
244
- | `octocode lsp <file> --type <type> --symbol <name> --line <n>` | Trace `definition`, `references`, `callers`, `callees`, `callHierarchy`, `hover`, `typeDefinition`, and `implementation`; use `ls --symbols` for file outlines |
245
- | `octocode pr <owner/repo[#N]\|PR-URL>` | Search or deep-read pull requests |
246
- | `octocode history <owner/repo[/path]>` | Inspect commit history for a repo, directory, or file |
247
- | `octocode repo <keywords...>` | Discover GitHub repositories |
248
- | `octocode pkg <package\|keywords>` | Search npm and hand off to source repositories |
249
- | `octocode binary <file>` | Inspect archives, compressed files, and native binaries |
250
- | `octocode unzip <archive>` | Unpack an archive to `<octocode-home>/tmp/unzip/<name>-<timestamp>/`, then use local `ls`, `grep`, `cat`, and `lsp` |
251
- | `octocode clone <owner/repo[/path][@branch]>` | Clone a repo or subtree to `<octocode-home>/tmp/clone/` for local/LSP analysis (`ENABLE_CLONE=true`) |
252
- | `octocode tools` | List tools, read schemas, or run any MCP tool directly from the terminal |
253
- | `octocode context` | Print agent-facing protocol, system prompt, tool descriptions, and schemas |
254
- | `octocode install` | Configure Octocode in MCP clients |
255
- | `octocode auth` | Manage GitHub authentication with `login`, `logout`, or `refresh` |
256
- | `octocode login` / `octocode logout` | Sign in or clear stored GitHub credentials |
257
- | `octocode status` | Check token presence, auth identity, MCP installs, sync state, and cache paths |
258
-
259
- Full command syntax, flags, examples, and exit codes live in the [CLI Reference](https://github.com/bgauryy/octocode/blob/main/docs/cli/REFERENCE.md).
230
+ #### More commands
231
+
232
+ - **GitHub & npm** `npx octocode search <…> --target repositories|packages|pullRequests|commits|artifacts|diff`
233
+ - **LSP** — `npx octocode search <file> --op definition|references|callers|callees|hover|diagnostic|callHierarchy` (`--symbol`, `--line` to narrow)
234
+ - **Cache & clone** `npx octocode clone`, `npx octocode unzip`, `npx octocode cache fetch|status|clear`
235
+ - **Skills** — `npx octocode skill --list | --name <skill> | --add <github-path> | --install-all`
236
+ - **Language servers** `npx octocode lsp-server list|install|status|uninstall|clean`
237
+ - **Setup & introspection** `npx octocode install`, `npx octocode auth`, `npx octocode status`, `npx octocode tools`, `npx octocode context`
238
+
239
+ Full syntax, flags, and exit codes: [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_CLI.md)
260
240
 
261
241
  ---
262
242
 
@@ -272,7 +252,7 @@ environment variables > <octocode-home>/.octocoderc > built-in defaults
272
252
  2. **Global config**: `<octocode-home>/.octocoderc`, machine-wide defaults read by **both the CLI and the MCP server**.
273
253
  3. **Built-in defaults**: used when neither is set.
274
254
 
275
- **Octocode home** (`<octocode-home>`) holds the global config, encrypted credentials, sessions, stats, logs, and tmp materialization caches. Its location is fixed per platform (there is no override):
255
+ **Octocode home** (`<octocode-home>`) holds the global config, encrypted credentials, sessions, stats, and tmp materialization caches. It defaults by platform and can be overridden with `OCTOCODE_HOME`:
276
256
 
277
257
  | Platform | Location |
278
258
  |----------|----------|
@@ -280,25 +260,7 @@ environment variables > <octocode-home>/.octocoderc > built-in defaults
280
260
  | Linux | `${XDG_CONFIG_HOME:-~/.config}/.octocode` |
281
261
  | Windows | `%APPDATA%\.octocode` |
282
262
 
283
- **Set in MCP** (env entries; these win over `.octocoderc`):
284
-
285
- ```json
286
- {
287
- "mcpServers": {
288
- "octocode": {
289
- "command": "npx",
290
- "args": ["octocode-mcp@latest"],
291
- "env": {
292
- "GITHUB_TOKEN": "ghp_xxxxxxxx",
293
- "ENABLE_LOCAL": "true",
294
- "ENABLE_CLONE": "false"
295
- }
296
- }
297
- }
298
- }
299
- ```
300
-
301
- **Set globally** for both the CLI and MCP in `<octocode-home>/.octocoderc` (JSON, comments and trailing commas tolerated; never put tokens here). See the ready-to-copy [example below](#example-octocoderc).
263
+ Set values as MCP `env` entries (per client; these win over `.octocoderc`) or globally in `<octocode-home>/.octocoderc` (JSON with comments). **Tokens never go in `.octocoderc`** — use `env` or `npx octocode auth login`.
302
264
 
303
265
  ### Common settings
304
266
 
@@ -306,9 +268,10 @@ The **Scope** column shows where a setting applies: `Both`, or `MCP` (the CLI ig
306
268
 
307
269
  | Env var | `.octocoderc` key | Default | Scope | What it does |
308
270
  |---------|-------------------|---------|-------|--------------|
271
+ | `OCTOCODE_HOME` | env only | platform default | Both | Overrides the Octocode data directory for config, credentials, sessions, stats, and caches. |
309
272
  | `OCTOCODE_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN` | env only | unset | Both | GitHub token, in priority order. Tokens stay in env, never in `.octocoderc`. |
310
273
  | `GITHUB_API_URL` | `github.apiUrl` | `https://api.github.com` | Both | API endpoint; use `/api/v3` for GitHub Enterprise. |
311
- | `ENABLE_LOCAL` | `local.enabled` | CLI `true`, MCP `false` | Both | Turns local filesystem + LSP tools on/off. |
274
+ | `ENABLE_LOCAL` | `local.enabled` | `true` | Both | Turns local filesystem + LSP tools on/off; set `false` to disable. |
312
275
  | `ENABLE_CLONE` | `local.enableClone` | CLI `true`, MCP `false` | Both | `ghCloneRepo` and directory fetch. Default differs by surface; set `false` to disable in either. |
313
276
  | `WORKSPACE_ROOT` | `local.workspaceRoot` | `cwd` | Both | Absolute root for resolving relative local paths. |
314
277
  | `ALLOWED_PATHS` | `local.allowedPaths` | `[]` | Both | Extra path allowlist for local access; empty means home directory only after validation. |
@@ -317,83 +280,38 @@ The **Scope** column shows where a setting applies: `Both`, or `MCP` (the CLI ig
317
280
  | `MAX_RETRIES` | `network.maxRetries` | `3` | Both | Retry attempts (clamped `0..10`). |
318
281
  | `OCTOCODE_OUTPUT_FORMAT` | `output.format` | `yaml` | Both | Response format: `yaml` or `json`. |
319
282
 
320
- > **Local and clone defaults differ by surface.** The **CLI** honors `ENABLE_LOCAL` and defaults local tools on; clone is enabled by default. The **MCP server** honors `ENABLE_LOCAL` and defaults local tools and clone off, so a deployment can control what an assistant may touch. Explicit env or `.octocoderc` values override those defaults.
321
-
322
- ### Example `.octocoderc`
323
-
324
- Drop this at `<octocode-home>/.octocoderc` for machine-wide defaults shared by the CLI and the MCP server. Every field is optional; keep only what you want to change. **Tokens never go here** (use env or `octocode login`).
325
-
326
- ```jsonc
327
- {
328
- // GitHub Enterprise users: point at your API endpoint.
329
- "github": { "apiUrl": "https://api.github.com" },
283
+ > **Local defaults on; clone differs by surface.** Both CLI and MCP default local tools on; set `ENABLE_LOCAL=false` to disable them. The **CLI** defaults clone on, while the **MCP server** requires `ENABLE_CLONE=true`.
330
284
 
331
- "local": {
332
- "enabled": true, // overrides the surface default for CLI and MCP
333
- "enableClone": false, // false disables ghCloneRepo for CLI and MCP
334
- "workspaceRoot": "~/code", // base for relative local paths (absolute or ~)
335
- "allowedPaths": [] // extra dirs the local tools may read
336
- },
337
-
338
- "network": { "timeout": 30000, "maxRetries": 3 },
339
-
340
- "output": { "format": "yaml" } // "yaml" or "json"
341
- }
342
- ```
343
-
344
- Per-project overrides and custom LSP servers live in a workspace `.octocode/` folder (for example `.octocode/lsp-servers.json`). For every variable, the full `.octocoderc` schema, clone-cache tuning, GitHub Enterprise setup, local-state paths, and precedence details, see the [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CONFIGURATION.md).
285
+ Per-project overrides and custom LSP servers live in a workspace `.octocode/` folder. For the full `.octocoderc` schema, a ready-to-copy example, clone-cache tuning, GitHub Enterprise setup, and precedence details, see the [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md).
345
286
 
346
287
  ---
347
288
 
348
289
  ## Authentication Methods
349
290
 
350
- GitHub-backed tools require authentication. Pick whichever method fits your setup; any one is enough. Full details: [Authentication Setup](https://github.com/bgauryy/octocode/blob/main/docs/mcp/AUTHENTICATION.md).
291
+ GitHub-backed tools require authentication. Any one method is enough. Full details: [Authentication Setup](https://github.com/bgauryy/octocode/blob/main/docs/AUTHENTICATION.md).
351
292
 
352
293
  ### Option 1: Octocode CLI (Recommended)
353
294
 
354
- The simplest setup. Octocode stores OAuth credentials encrypted on disk.
355
-
356
295
  ```bash
357
- npx octocode auth login # or: octocode login
296
+ npx octocode auth login
358
297
  npx octocode status # verify the active token source
359
298
  ```
360
299
 
361
- ### Option 2: GitHub CLI
300
+ Interactive login lets you choose Octocode browser OAuth or `gh auth login`. Octocode OAuth credentials are stored encrypted on disk.
362
301
 
363
- Use your existing `gh` credentials: automatic token management, works with 2FA and SSO.
302
+ ### Option 2: GitHub CLI (also supported)
364
303
 
365
304
  ```bash
366
- # Install GitHub CLI
367
- brew install gh # macOS
368
- winget install --id GitHub.cli # Windows
369
- # Linux: https://github.com/cli/cli/blob/trunk/docs/install_linux.md
370
-
371
305
  gh auth login
372
306
  ```
373
307
 
374
- No `GITHUB_TOKEN` is needed; Octocode reads the `gh` token automatically.
308
+ Octocode reads the `gh` token automatically — no further config needed.
375
309
 
376
- ### Option 3: Personal Access Token
310
+ ### Option 3: Personal Access Token (also supported)
377
311
 
378
- Best for CI/CD, automation, MCP client configs, or GitHub Enterprise.
312
+ Set `OCTOCODE_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` in your shell. Required scopes: `repo`, `read:user`, `read:org`.
379
313
 
380
- 1. Create a token at [github.com/settings/tokens](https://github.com/settings/tokens)
381
- 2. Select scopes: `repo`, `read:user`, `read:org`
382
- 3. Provide it via `OCTOCODE_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` (in your shell or MCP client `env`):
383
-
384
- ```json
385
- {
386
- "mcpServers": {
387
- "octocode": {
388
- "command": "npx",
389
- "args": ["octocode-mcp@latest"],
390
- "env": {
391
- "GITHUB_TOKEN": "<your-token>"
392
- }
393
- }
394
- }
395
- }
396
- ```
314
+ Create a token at [github.com/settings/tokens](https://github.com/settings/tokens).
397
315
 
398
316
  > **Security tip**: Never commit tokens to version control. Use environment variables or secure secret management.
399
317
 
@@ -401,21 +319,21 @@ Best for CI/CD, automation, MCP client configs, or GitHub Enterprise.
401
319
 
402
320
  ## Security
403
321
 
404
- **Every byte that reaches the model is scanned and redacted first.** All content (local files, GitHub and npm responses, error messages, and tool outputs) passes through the Rust engine's secret scanner on the way *in* (tool inputs) and on the way *out* (results), so secrets never reach the LLM or logs. The same enforcement runs identically under MCP and the CLI.
322
+ **Every byte that reaches the model is scanned and redacted first.** All content (local files, GitHub and npm responses, error messages, and tool outputs) passes through the Rust engine's secret scanner on the way *in* (tool inputs) and on the way *out* (results), so secrets never reach the LLM. The same enforcement runs identically under MCP and the CLI.
405
323
 
406
- - **Secret redaction, in and out.** 270+ provider credential patterns (AWS, Azure, GCP, GitHub, OpenAI, Anthropic, Stripe, Slack, 1Password, and more) plus generic JWTs, PEM/private keys, bearer tokens, database connection strings, and high-entropy strings. Masked values surface a `Secrets detected and redacted` warning so the agent knows.
407
- - **Content sanitized at the source.** Local reads (`localGetFileContent`, ripgrep, structural search, binary, find, structure) and external fetches (GitHub code/files, npm) are scanned as they are read, not only at the boundary.
408
- - **Path safety.** Local reads are bounded to `WORKSPACE_ROOT` and `ALLOWED_PATHS` (default: your home directory). Symlinks are resolved and the real target is **re-validated** against the same rules, so a link cannot escape into a blocked location. Every local tool runs this check before touching the filesystem.
324
+ - **Secret redaction, in and out.** 300+ provider credential patterns (AWS, Azure, GCP, GitHub, OpenAI, Anthropic, Stripe, Slack, 1Password, and more) plus generic JWTs, PEM/private keys, bearer tokens, database connection strings, and high-entropy strings. Masked values surface a redaction warning so the agent knows.
325
+ - **Content sanitized at the source.** Local reads (`localGetFileContent`, ripgrep, structural search, binary, file discovery, structure) and external fetches (GitHub code/files, npm) are scanned as they are read, not only at the boundary.
326
+ - **Path safety.** Relative inputs resolve from `WORKSPACE_ROOT` / config / `cwd`, then local reads are bounded to the engine's allowed roots (home by default, plus `ALLOWED_PATHS` and Octocode-registered roots). Symlinks are resolved and the real target is **re-validated**, so a link cannot escape into a blocked location.
409
327
  - **Sensitive files and directories are blocked by default.** Octocode refuses to read known secret-bearing files and folders wherever they live, returning a redacted error instead of contents. Blocked patterns include:
410
328
  - **Keys and certs:** `*.pem`, `*.key`, `*.crt`/`*.cer`/`*.csr`, `*.p12`/`*.pfx`/`*.jks`/`*.keystore`, and SSH keys (`id_rsa`, `*_ed25519`, `authorized_keys`, `known_hosts`, `.ssh/`).
411
329
  - **Credentials and tokens:** `.env` / `.env.*`, `.netrc`, `.npmrc`, `.pgpass`, `.git-credentials`, `*_token` / `.token`, `client_secret*.json`, `*service-account*.json`, `auth.json`, `.htpasswd`.
412
330
  - **Cloud and infra:** `.aws/`, `.azure/`, `.config/gcloud/`, `.kube/` / `kubeconfig`, `.docker/`, `.terraform/` and `*.tfstate`.
413
331
  - **OS and app secret stores:** `.git/`, `secrets/`, `private/`, browser login data (Chrome/Firefox), OS keychains, password managers (`*.kdbx`), shell history files, and crypto wallets.
414
- - **Command safety.** Local execution is whitelisted to `rg`, `find`, and `ls` via `spawn` with argument arrays: no shell strings, no injection.
332
+ - **Command safety.** Normal local search runs in-process inside `octocode-engine`. External helpers are fixed per lane, command/argument allowlisted, and run via `spawn` with argument arrays: no shell strings, no injection.
415
333
  - **Schema validation** runs before any tool executes; untrusted input size and shape are bounded.
416
334
  - **Credentials.** GitHub auth via env tokens, AES-256-GCM-encrypted on-disk OAuth, or the `gh` CLI; tokens are never logged.
417
335
 
418
- **Full security model, pipeline, and threat coverage: [SECURITY.md](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md).** Related: [Authentication](https://github.com/bgauryy/octocode/blob/main/docs/mcp/AUTHENTICATION.md) · [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CONFIGURATION.md) · [Credentials](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CREDENTIALS.md)
336
+ **Full security model, pipeline, and threat coverage: [SECURITY.md](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md).** Related: [Authentication](https://github.com/bgauryy/octocode/blob/main/docs/AUTHENTICATION.md) · [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Credentials](https://github.com/bgauryy/octocode/blob/main/docs/AUTHENTICATION.md#credential-architecture-api)
419
337
 
420
338
  ---
421
339
 
@@ -425,12 +343,12 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
425
343
 
426
344
  | Axis | What it does | How to use it |
427
345
  |------|--------------|---------------|
428
- | **Structural AST** | Tree-sitter shape queries (`pattern` or YAML `rule`) across 33 grammars. | `localSearchCode mode:"structural"` · CLI `grep --pattern`/`--rule` |
429
- | **Signature outline** | Body-free skeleton with line numbers from real tree-sitter parsing, no heuristics. An anti-growth guard returns the real file when a skeleton wouldn't be smaller. | `minify:"symbols"` · CLI `cat --mode symbols` |
346
+ | **Structural AST** | Tree-sitter shape queries (`pattern` or YAML `rule`) across 60+ extensions. | `localSearchCode mode:"structural"` · CLI `search --pattern`/`--rule` |
347
+ | **Signature outline** | Body-free skeleton with line numbers from real tree-sitter parsing, no heuristics. An anti-growth guard returns the real file when a skeleton wouldn't be smaller. | `minify:"symbols"` · CLI `search <file> --content-view symbols` |
430
348
  | **Content minification** | Comment/whitespace stripping for 70+ languages and config formats; HTML/Vue/Svelte also minify embedded `<style>`/`<script>`. | `minify:"standard"` (default) |
431
- | **LSP navigation** | definition, references, callers/callees, callHierarchy, hover, typeDefinition, implementation, documentSymbols, via an installed language server; JS/TS also have a native, no-server path. | `lspGetSemantics` · CLI `lsp` / `ls --symbols` |
349
+ | **LSP navigation** | definition, references, callers/callees, callHierarchy, hover, typeDefinition, implementation, documentSymbols, via an installed language server; JS/TS also have a native, no-server path. | `lspGetSemantics` · CLI `search --op` / `search --symbols` |
432
350
 
433
- 📋 **Full support matrix:** every extension with its exact AST, signature, LSP, and minify capability, machine-generated from the shipped binary, lives in **[`benchmark/SUPPORT.md`](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/SUPPORT.md)** (150 extensions: 61 AST, 47 signature, 56 LSP, 89 minify-only). Regenerate or verify with `yarn workspace @octocodeai/octocode-benchmark matrix:check`.
351
+ 📋 **Full support matrix:** every extension with its exact AST, signature, LSP, and minify capability, machine-generated from the shipped binary, lives in the **[Full format support matrix](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix)** (151 extensions: 61 AST, 47 signature, 32 LSP, 90 minify-only). Regenerate or verify with `yarn workspace @octocodeai/octocode-benchmark matrix:check`.
434
352
 
435
353
  ---
436
354
 
@@ -439,17 +357,35 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
439
357
  > [Agent Skills](https://agentskills.io/what-are-skills) are a lightweight, open format for extending AI agent capabilities.
440
358
  > Browse and install on [**skills.sh/bgauryy/octocode-mcp**](https://www.skills.sh/bgauryy/octocode-mcp) · Skills index: [skills/README.md](https://github.com/bgauryy/octocode/blob/main/skills/README.md)
441
359
 
442
- These are the skills the Octocode team itself uses to build Octocode. ⭐ **[Engineer](https://www.skills.sh/bgauryy/octocode-mcp/octocode-engineer)** is the recommended starting skill.
360
+ These are the skills the Octocode team itself uses to build Octocode. **8 skills** live under [`skills/`](https://github.com/bgauryy/octocode/tree/main/skills); the table mirrors the [Skills Index](https://github.com/bgauryy/octocode/blob/main/skills/README.md). ⭐ **[Research](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research)** is the recommended starting skill for technical research, code work, reviews, refactors, and repeated evidence loops.
361
+
362
+ Each skill folder includes a human README with purpose, features, workflow, developer notes, and `npx octocode skill` installation. `SKILL.md` stays the compact agent-facing router.
363
+
364
+ Install them with the Octocode CLI through `npx octocode`; no global install is required. Octocode refreshes the canonical source in `~/.octocode/skills/<skill>` and links it into the platform location by default. Pick the platform your agent reads from, or use `common` for the shared `~/.agents/skills` folder.
365
+
366
+ ```bash
367
+ npx octocode skill --list # browse available Octocode skills
368
+ npx octocode skill --name octocode-research # install to ~/.agents/skills (common)
369
+ npx octocode skill --name octocode-research --platform pi # install for Pi
370
+ npx octocode skill --name octocode-research --platform all --dry-run # preview before installing everywhere
371
+ npx octocode skill --add owner/repo/skills/my-skill # install any GitHub skill folder
372
+ npx octocode skill --add owner/repo/skills # install every skill in a GitHub skills library
373
+ npx octocode skill --install-all # install every official Octocode skill to ~/.agents/skills
374
+ npx octocode skill --help # read live flags
375
+ ```
443
376
 
444
- | Skill | What it does |
445
- |-------|--------------|
446
- | [**Engineer**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-engineer) | Codebase understanding, implementation, bug investigation, refactors, PR review, and RFC validation with AST + LSP evidence |
447
- | [**Research**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) | Deep code exploration with HTTP-based tool orchestration: trace flow, find usages, understand a codebase |
448
- | [**Brainstorming**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-brainstorming) | Validate ideas against GitHub, npm, and web evidence; produces a decision-ready brief |
449
- | [**RFC Generator**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-rfc-generator) | Evidence-backed RFCs, design docs, migration and implementation plans before coding |
450
- | [**Install**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-install) | Interactive step-by-step Octocode installer for macOS and Windows |
451
- | [**Search Skill**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-search-skill) | Find, evaluate, install, rate, and refactor Agent Skills (SKILL.md format) |
452
- | [**Stats**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-stats) | Render an Octocode MCP usage dashboard from stats.json (tokens saved, cache hits, errors) |
377
+ Platforms: `common` (default, `~/.agents/skills`), `cursor` (`~/.cursor/skills`), `claude` (`~/.claude/skills` and `~/.claude-desktop/skills`), `codex` (`~/.agents/skills`), `opencode` (`~/.config/opencode/skills`), `pi` (`~/.pi/agent/skills`), `copilot` (`~/.copilot/skills`), `gemini` (`~/.gemini/skills`), `all` · Modes: `symlink` (default), `copy`, `hybrid` · full platform table and bulk installs: [Skills Guide](https://github.com/bgauryy/octocode/blob/main/docs/SKILLS_GUIDE.md)
378
+
379
+ | Skill | Directory | Install with `npx octocode` | Use it when |
380
+ |-------|-----------|-----------------------------|-------------|
381
+ | [**Octocode**](https://www.skills.sh/bgauryy/octocode-mcp/octocode) | `octocode/` | `npx octocode skill --name octocode` | You want a quick code-research answer through MCP or the `npx octocode` CLI. |
382
+ | [**Brainstorming**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-brainstorming) | `octocode-brainstorming/` | `npx octocode skill --name octocode-brainstorming` | The idea is fuzzy and needs prior-art or opportunity validation. |
383
+ | [**Research**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) | `octocode-research/` | `npx octocode skill --name octocode-research` | You need evidence-first technical research, code work, review, refactor, architecture analysis, or repeated proof loops. |
384
+ | [**RFC Generator**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-rfc-generator) | `octocode-rfc-generator/` | `npx octocode skill --name octocode-rfc-generator` | You need a design doc, RFC, architecture proposal, migration plan, or rollout plan before coding. |
385
+ | [**Roast**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-roast) | `octocode-roast/` | `npx octocode skill --name octocode-roast` | You want blunt but actionable code critique. |
386
+ | [**Skills**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-skills) | `octocode-skills/` | `npx octocode skill --name octocode-skills` | You are working on Agent Skills themselves. |
387
+ | [**Awareness**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-awareness) | `octocode-awareness/` | `npx octocode skill --name octocode-awareness` | You need memory, file locks, handoffs, or verify-before-conclude in a shared repo. |
388
+ | [**Stats**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-stats) | `octocode-stats/` | `npx octocode skill --name octocode-stats` | You want to visualize Octocode usage, savings, cache hits, errors, or rate limits. |
453
389
 
454
390
  ---
455
391
 
@@ -488,8 +424,8 @@ client → sanitize inputs (Rust) → run tool (GitHub / FS / LSP) → sanitize
488
424
 
489
425
  | Directory | npm package | Role |
490
426
  |-----------|-------------|------|
491
- | [`packages/octocode`](https://github.com/bgauryy/octocode/tree/main/packages/octocode) | `octocode` | CLI: quick commands, raw tool runner, auth/login/logout, install, status, context. |
492
- | [`packages/octocode-mcp`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) | `octocode-mcp` | MCP server (stdio) that registers the tool catalog for AI assistants. |
427
+ | [`packages/octocode`](https://github.com/bgauryy/octocode/tree/main/packages/octocode) | `octocode` | CLI: quick commands, raw tool runner, skill installs, auth/login/logout, install, status, context. |
428
+ | [`packages/octocode-mcp`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) | `@octocodeai/mcp` | MCP server (stdio) that registers the tool catalog for AI assistants. |
493
429
  | [`packages/octocode-tools-core`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-tools-core) | `@octocodeai/octocode-tools-core` | Shared tool core: implementations, GitHub client, credentials and token resolution, session, pagination, security bridge. |
494
430
  | [`packages/octocode-engine`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-engine) | `@octocodeai/octocode-engine` | Rust/napi native engine: security scanning, minification, signatures, structural AST, ripgrep/diff/YAML, LSP. |
495
431
  | [`packages/octocode-vscode`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-vscode) | `octocode-mcp-vscode` | VS Code extension: GitHub OAuth + multi-editor MCP install. |
@@ -498,48 +434,58 @@ client → sanitize inputs (Rust) → run tool (GitHub / FS / LSP) → sanitize
498
434
 
499
435
  ## Documentation
500
436
 
501
- Website: **[octocode.ai](https://octocode.ai)** · Full docs: **[github.com/bgauryy/octocode/tree/main/docs](https://github.com/bgauryy/octocode/tree/main/docs)** · Index: **[docs/README.md](https://github.com/bgauryy/octocode/blob/main/docs/README.md)**. All monorepo documentation lives in [`docs/`](https://github.com/bgauryy/octocode/tree/main/docs) (no per-package `docs/`).
437
+ Website: **[octocode.ai](https://octocode.ai)** · Product docs: **[github.com/bgauryy/octocode/tree/main/docs](https://github.com/bgauryy/octocode/tree/main/docs)**. This section is the canonical documentation index; benchmark methodology, evals, and run artifacts live in [`packages/octocode-benchmark`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark).
438
+
439
+ | Area | Docs |
440
+ |---|---|
441
+ | MCP server | [Octocode MCP Server](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_MCP.md) · [Configuration](https://github.com/bgauryy/octocode/blob/main/docs/CONFIGURATION.md) · [Authentication](https://github.com/bgauryy/octocode/blob/main/docs/AUTHENTICATION.md) |
442
+ | Tools and workflows | [Octocode Tools Reference](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_TOOLS.md) · [Octocode Research Skill](https://github.com/bgauryy/octocode/tree/main/skills/octocode-research) · [Search Guide](https://github.com/bgauryy/octocode/blob/main/docs/context/SEARCH_GUIDE.md) |
443
+ | CLI and query language | [Octocode CLI Guide](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_CLI.md) · [Octocode Query Language](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_QUERY_LANGUAGE.md) · [OQL Research Graph Flow](https://github.com/bgauryy/octocode/blob/main/docs/context/OQL_RESEARCH_GRAPH_FLOW.md) |
444
+ | Agent harness and skills | [Octocode Pi package](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/README.md) · [Skills Guide](https://github.com/bgauryy/octocode/blob/main/docs/SKILLS_GUIDE.md) · [Skills Index](https://github.com/bgauryy/octocode/blob/main/skills/README.md) |
445
+ | Pi | [Pi package README](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/README.md) · [Pi APPEND_SYSTEM starter](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/docs/PI/APPEND_SYSTEM.md) |
446
+ | Development and security | [Development Guide](https://github.com/bgauryy/octocode/blob/main/docs/DEVELOPMENT_GUIDE.md) · [Security Model](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md) · [LSP Server Lifecycle](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md) |
447
+ | Benchmarks and evals | [Benchmark Summary](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/BENCHMARK.md) · [Unified CLI/Tool/OQL Eval](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/octocode/README.md) · [Benchmark Runbook](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/recipes/agent-benchmark-runbook.md) · [Support Matrix](https://github.com/bgauryy/octocode/blob/main/docs/LSP_SERVER_LIFECYCLE.md#full-format-support-matrix) |
448
+ | Shared internals | [Credentials Architecture](https://github.com/bgauryy/octocode/blob/main/docs/AUTHENTICATION.md#credential-architecture-api) · [Session Persistence](https://github.com/bgauryy/octocode/blob/main/docs/OCTOCODE_MCP.md#session-persistence) |
449
+
450
+ ---
502
451
 
503
- **Docs map**
504
- - [`docs/mcp/`](https://github.com/bgauryy/octocode/tree/main/docs/mcp): MCP server configuration, authentication, tools, workflows, architecture
505
- - [`docs/cli/`](https://github.com/bgauryy/octocode/tree/main/docs/cli): CLI commands, flags, benchmarks
506
- - [`docs/`](https://github.com/bgauryy/octocode/tree/main/docs): guides for development, security, skills, Pi setup
452
+ ## Troubleshooting
507
453
 
508
- **Setup**
509
- - [Authentication Setup](https://github.com/bgauryy/octocode/blob/main/docs/mcp/AUTHENTICATION.md)
510
- - [Configuration Reference](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CONFIGURATION.md)
511
- - [Using octocode-mcp with Pi](https://github.com/bgauryy/octocode/blob/main/docs/PI/PI_SETUP_GUIDE.md)
454
+ Having Node.js issues? Run:
512
455
 
513
- **Tool References**
514
- - [GitHub Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/GITHUB_TOOLS.md)
515
- - [Local Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LOCAL_TOOLS.md)
516
- - [LSP Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LSP_TOOLS.md)
517
- - [Clone & Local Workflow](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CLONE_WORKFLOW.md)
456
+ ```bash
457
+ npx node-doctor check --json
458
+ ```
518
459
 
519
- **Security, CLI & Skills**
520
- - [Security Model](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md)
521
- - [CLI Reference](https://github.com/bgauryy/octocode/blob/main/docs/cli/REFERENCE.md)
522
- - [Skills Guide](https://github.com/bgauryy/octocode/blob/main/docs/SKILLS_GUIDE.md) · [Skills Index](https://github.com/bgauryy/octocode/blob/main/skills/README.md)
460
+ Read the output and fix accordingly.
523
461
 
524
- **Shared Internals**
525
- - [Credentials Architecture](https://github.com/bgauryy/octocode/blob/main/docs/mcp/CREDENTIALS.md) · [Session Persistence](https://github.com/bgauryy/octocode/blob/main/docs/mcp/SESSION.md)
462
+ ---
526
463
 
527
- **Operations**
528
- - [Development Guide](https://github.com/bgauryy/octocode/blob/main/docs/DEVELOPMENT_GUIDE.md) · [Agent Guidance (AGENTS.md)](https://github.com/bgauryy/octocode/blob/main/AGENTS.md)
464
+ ## Agent Workflows
529
465
 
530
466
  ### Recommended dev mode: Pi + Octocode
531
467
 
532
468
  [Pi](https://github.com/earendil-works/pi) is a fast, local-first coding agent whose stated philosophy is *"CLI tools with READMEs (Skills) over MCP."* Pairing it with Octocode gives a lean, evidence-driven dev loop — **Pi edits, Octocode researches**. Two routes, pick by how much surface you need:
533
469
 
534
- - **Skill route — recommended, leanest.** Drop the [`octocode-engineer`](https://www.skills.sh/bgauryy/octocode-mcp/octocode-engineer) skill into Pi's global skills dir. It drives the Octocode **CLI** directly — no MCP transport, minimal token overhead — and Pi auto-discovers it:
470
+ - **Skill route — recommended, leanest.** Drop the [`octocode-research`](https://www.skills.sh/bgauryy/octocode-mcp/octocode-research) skill into Pi's global skills dir. It drives the Octocode **CLI** directly — no MCP transport, minimal token overhead — and Pi auto-discovers it:
535
471
 
536
472
  ```bash
537
- npx -y degit bgauryy/octocode/skills/octocode-engineer ~/.pi/agent/skills/octocode-engineer
473
+ npx octocode skill --name octocode-research --platform pi
538
474
  ```
539
475
 
540
- - **Adapter route — full tool surface.** Install [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) to expose all 13 Octocode MCP tools behind a single ~200-token proxy tool, so servers stay disconnected until a tool is actually called. Enable clone tools with `ENABLE_CLONE=true`.
476
+ - **Adapter route — full tool surface.** Install [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter) to expose all 14 Octocode MCP tools behind a single ~200-token proxy tool, so servers stay disconnected until a tool is actually called. Enable clone tools with `ENABLE_CLONE=true`.
477
+
478
+ Tune Pi's behavior with an `APPEND_SYSTEM.md` packaged in [`@octocodeai/pi-extension`](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/README.md). The full walkthrough — package install, setup commands, skills, optional MCP setup, and custom models — is in the [**Pi package README**](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/README.md).
479
+
480
+ ### Octocode Harness
481
+
482
+ The Octocode harness is the recommended agent environment for research-driven development: Pi supplies the local coding loop, `npx octocode` supplies structured code research, and Octocode Skills encode the workflows agents should follow before they edit.
483
+
484
+ Docs: [Pi package README](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/README.md) · [APPEND_SYSTEM starter](https://github.com/bgauryy/octocode/blob/main/packages/octocode-pi-extension/docs/PI/APPEND_SYSTEM.md)
485
+
486
+ It is deliberately research-oriented because most agent failures start before implementation: the agent guesses the owner of a behavior, trusts a snippet without reading the exact source, or edits before proving blast radius. The harness pushes the agent through a cheaper loop first: orient with trees and discovery output, search with Octocode, read exact evidence, use AST/LSP when identity matters, then patch and verify.
541
487
 
542
- Tune Pi's behavior with an `APPEND_SYSTEM.md` (a compact starter lives at [`docs/PI/APPEND_SYSTEM.md`](https://github.com/bgauryy/octocode/blob/main/docs/PI/APPEND_SYSTEM.md)). The full walkthrough adapter install, MCP config scopes, skills, system-prompt tuning, and custom models is in the [**Pi Setup Guide**](https://github.com/bgauryy/octocode/blob/main/docs/PI/PI_SETUP_GUIDE.md).
488
+ That shape keeps the editing surface small while preserving context for what matters: file anchors, symbols, call paths, PR/history evidence, package sources, and the verification command that proves the change. In short, Pi is the hands, Octocode is the map, and the skills/system prompt make the habit repeatable.
543
489
 
544
490
  ### The Manifest
545
491