@octocodeai/octocode-tools-core 16.6.0 → 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.
- package/README.md +176 -248
- package/dist/direct.js +34 -35
- package/dist/errors/localToolErrors.d.ts +1 -0
- package/dist/index.js +39 -40
- package/dist/oql/adapters/local.d.ts +1 -0
- package/dist/oql/envelope.d.ts +2 -0
- package/dist/oql/index.d.ts +2 -1
- package/dist/oql/index.js +34 -34
- package/dist/oql/schemeText.d.ts +16 -0
- package/dist/oql/types.d.ts +7 -0
- package/dist/schema.d.ts +1 -1
- package/dist/schema.js +2 -1
- package/dist/shared/config/index.js +2 -2
- package/dist/shared/config/runtimeSurface.d.ts +5 -4
- package/dist/shared/credentials/envTokens.d.ts +1 -1
- package/dist/shared/credentials/index.js +1 -1
- package/dist/shared/credentials/types.d.ts +1 -1
- package/dist/shared/paths.d.ts +2 -1
- package/dist/shared/paths.js +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/github_fetch_content/scheme.d.ts +0 -82
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
- package/dist/tools/lsp/semantic_content/scheme.d.ts +0 -14
- package/dist/tools/lsp/shared/semanticTypes.d.ts +2 -2
- package/dist/tools/package_search/execution.d.ts +23 -0
- package/dist/tools/package_search/scheme.d.ts +8 -0
- package/dist/tools/toolNames.d.ts +1 -1
- package/dist/types/server.d.ts +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
[](https://github.com/modelcontextprotocol/servers)
|
|
7
7
|
[](https://deepwiki.com/bgauryy/octocode)
|
|
8
|
+
|
|
8
9
|
[](https://octocode.ai)
|
|
9
10
|
[](https://www.youtube.com/@Octocode-ai)
|
|
10
11
|
|
|
@@ -20,6 +21,7 @@ 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)
|
|
24
26
|
- [What You Can Do](#what-you-can-do)
|
|
25
27
|
- [Tools](#tools)
|
|
@@ -32,6 +34,52 @@ Run it as a **CLI** or an **MCP server**. A **Rust engine** keeps every call fas
|
|
|
32
34
|
- [Skills](#skills)
|
|
33
35
|
- [Architecture](#architecture)
|
|
34
36
|
- [Documentation](#documentation)
|
|
37
|
+
- [Troubleshooting](#troubleshooting)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
**1. Run the Octocode CLI with `npx`**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx octocode --help
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**2. Authenticate with GitHub** — optional, but unlocks private repositories and higher API rate limits:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx octocode auth login
|
|
53
|
+
npx octocode status # verify the active token source
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**3. Choose your interface.** The same engine and 14 tools run identically either way.
|
|
57
|
+
|
|
58
|
+
**🖥️ CLI** — research straight from your terminal:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx octocode
|
|
62
|
+
```
|
|
63
|
+
|
|
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:**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["@octocodeai/mcp@latest"]}'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Any other client:** `npx octocode install`
|
|
81
|
+
|
|
82
|
+
➡️ Learn more at **[octocode.ai](https://octocode.ai)**.
|
|
35
83
|
|
|
36
84
|
---
|
|
37
85
|
|
|
@@ -62,78 +110,13 @@ Octocode is useful whenever the next coding step depends on finding and proving
|
|
|
62
110
|
| **Binary or archive inspection** | Inspect archives, compressed streams, native binaries, and strings without leaving the research flow. |
|
|
63
111
|
| **Agent workflows** | Expose the same engine through MCP, CLI, OQL, and Agent Skills so assistants and humans use one evidence model. |
|
|
64
112
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Add Octocode to an AI assistant with MCP, or run the same tools directly from
|
|
68
|
-
your terminal with the CLI.
|
|
69
|
-
|
|
70
|
-
**MCP fast install:**
|
|
71
|
-
|
|
72
|
-
[<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)
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# Interactive installer for Cursor, Claude Code, Codex, VS Code, and more
|
|
76
|
-
npx octocode install
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**CLI fast install:**
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npx octocode
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Authenticate GitHub when you want private repositories or higher API limits:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
npx octocode login
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Benchmarks
|
|
92
|
-
|
|
93
|
-
Latest benchmark output:
|
|
94
|
-
[packages/octocode-benchmark/output](https://github.com/bgauryy/octocode/tree/main/packages/octocode-benchmark/output/).
|
|
95
|
-
|
|
96
|
-
#### ast-grep Structural Comparison
|
|
97
|
-
|
|
98
|
-
Bars show relative throughput. Higher is better; lower `ms` is better.
|
|
99
|
-
|
|
100
|
-
What we tested: ast-grep CLI and Octocode structural grep on the same real
|
|
101
|
-
repository files, using the same broad AST node-kind searches
|
|
102
|
-
(`call_expression`, `call`, `method_invocation`). The goal was to check
|
|
103
|
-
structural AST grep compatibility by match count, then measure where time is
|
|
104
|
-
spent across Octocode's raw matcher, agent tool path, and public CLI.
|
|
105
|
-
|
|
106
|
-
This benchmark does not test text grep, LSP navigation, rewriting, or the full
|
|
107
|
-
ast-grep rule language. Those are separate capabilities.
|
|
108
|
-
|
|
109
|
-
```text
|
|
110
|
-
Octocode raw native ████████████████████ 17.1 ms median │ 2.0x faster │ 6/6 matched
|
|
111
|
-
ast-grep CLI ██████████░░░░░░░░░░ 34.6 ms median │ baseline │ 6/6 matched
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
`Octocode raw native` means the direct Rust/NAPI `structuralSearchFiles`
|
|
115
|
-
matcher: parse and match only, with no tool validation, sanitizer, pagination,
|
|
116
|
-
JSON shaping, or Node CLI startup. The agent-facing `localSearchCode` and public
|
|
117
|
-
`octocode search --pattern/--rule` paths are intentionally slower because they include those safety
|
|
118
|
-
and DX layers.
|
|
119
|
-
|
|
120
|
-
What was checked: we took ast-grep's benchmark scenario repo list, picked one
|
|
121
|
-
deterministic file from each supported repo, asked both tools to find the same
|
|
122
|
-
AST node kind in that file, verified identical match counts, then timed the
|
|
123
|
-
median run.
|
|
124
|
-
|
|
125
|
-
Benchmark files:
|
|
126
|
-
[runner](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/ast-grep/compare-upstream-scenarios.mjs) ·
|
|
127
|
-
[scenario manifest](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/ast-grep/upstream-outline-scenarios.json) ·
|
|
128
|
-
[latest output](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/output/comparison.md) ·
|
|
129
|
-
[unified CLI/tool/OQL eval](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/benchmark/octocode/README.md) ·
|
|
130
|
-
[agent runbook](https://github.com/bgauryy/octocode/blob/main/packages/octocode-benchmark/recipes/agent-benchmark-runbook.md)
|
|
113
|
+
See [Quick Start](#quick-start) to install in your terminal or AI assistant.
|
|
131
114
|
|
|
132
115
|
---
|
|
133
116
|
|
|
134
117
|
## Tools
|
|
135
118
|
|
|
136
|
-
Octocode ships **14 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
|
|
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).
|
|
137
120
|
|
|
138
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.
|
|
139
122
|
|
|
@@ -168,7 +151,7 @@ Octocode ships **14 research tools**; the same implementations run identically o
|
|
|
168
151
|
|
|
169
152
|
| Tool | What it does |
|
|
170
153
|
|------|--------------|
|
|
171
|
-
| `lspGetSemantics` | Typed semantic navigation. Raw tools support `definition`, `references`, `callers`, `callees`, `callHierarchy`, `hover`, `documentSymbols`, `typeDefinition`, `implementation`, `workspaceSymbol`, `supertypes`, `subtypes`, and `diagnostic`. The CLI uses `octocode search <file> --op <type>` for semantics and `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/
|
|
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)). |
|
|
172
155
|
|
|
173
156
|
### OQL Search
|
|
174
157
|
|
|
@@ -176,107 +159,84 @@ Octocode ships **14 research tools**; the same implementations run identically o
|
|
|
176
159
|
|------|--------------|
|
|
177
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
|
-
|
|
180
|
-
- [GitHub Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/GITHUB_TOOLS.md)
|
|
181
|
-
- [Local Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LOCAL_TOOLS.md)
|
|
182
|
-
- [Binary Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/BINARY_TOOLS.md)
|
|
183
|
-
- [LSP Tools](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/LSP_TOOLS.md)
|
|
184
|
-
- [Tool Behavior Guide](https://github.com/bgauryy/octocode/blob/main/docs/mcp/tools/TOOL_BEHAVIOR.md)
|
|
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)).
|
|
185
163
|
|
|
186
164
|
---
|
|
187
165
|
|
|
188
166
|
## MCP
|
|
189
167
|
|
|
190
|
-
The MCP server exposes the Octocode tool catalog directly to your AI assistant over stdio.
|
|
191
|
-
|
|
192
|
-
### Install
|
|
193
|
-
|
|
194
|
-
**Fast install:**
|
|
195
|
-
|
|
196
|
-
[<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)
|
|
197
|
-
|
|
198
|
-
**Or use the installer (detects your installed clients):**
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
# Interactive: detects your installed clients
|
|
202
|
-
npx octocode install
|
|
203
|
-
|
|
204
|
-
# Non-interactive
|
|
205
|
-
octocode install --ide cursor
|
|
206
|
-
octocode install --ide claude-code
|
|
207
|
-
```
|
|
168
|
+
The MCP server exposes the Octocode tool catalog directly to your AI assistant over stdio.
|
|
208
169
|
|
|
209
170
|
https://github.com/user-attachments/assets/de8d14c0-2ead-46ed-895e-09144c9b5071
|
|
210
171
|
|
|
211
172
|
### Manual Configuration
|
|
212
173
|
|
|
213
|
-
Add to your MCP client config
|
|
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`:
|
|
214
177
|
|
|
215
178
|
```json
|
|
216
179
|
{
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
180
|
+
"octocode": {
|
|
181
|
+
"command": "npx",
|
|
182
|
+
"type": "stdio",
|
|
183
|
+
"args": [
|
|
184
|
+
"@octocodeai/mcp@latest"
|
|
185
|
+
]
|
|
222
186
|
}
|
|
223
187
|
}
|
|
224
188
|
```
|
|
225
189
|
|
|
226
|
-
|
|
190
|
+
**Classic octocode-mcp** — use `octocode-mcp`:
|
|
227
191
|
|
|
228
|
-
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"octocode": {
|
|
195
|
+
"command": "npx",
|
|
196
|
+
"type": "stdio",
|
|
197
|
+
"args": [
|
|
198
|
+
"octocode-mcp@latest"
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
229
203
|
|
|
230
|
-
|
|
204
|
+
Add a GitHub token and options under `env` — see [Authentication](#authentication-methods) and [Configuration](#configuration).
|
|
231
205
|
|
|
232
206
|
---
|
|
233
207
|
|
|
234
208
|
## CLI
|
|
235
209
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
### Install
|
|
210
|
+
Same research engine, no MCP client needed. Local paths route to local tools; `owner/repo[/path]` routes to GitHub.
|
|
239
211
|
|
|
240
212
|
```bash
|
|
241
|
-
npx octocode
|
|
213
|
+
npx octocode auth login # authenticate once
|
|
214
|
+
npx octocode status # verify setup
|
|
215
|
+
npx octocode --help # full usage
|
|
242
216
|
```
|
|
243
217
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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 …) |
|
|
248
229
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
| `octocode search <owner/repo[#N]\|PR-URL> --target pullRequests` | Search or deep-read pull requests |
|
|
260
|
-
| `octocode search <owner/repo[/path]> --target commits` | Inspect commit history for a repo, directory, or file |
|
|
261
|
-
| `octocode search <keywords...> --target repositories` | Discover GitHub repositories |
|
|
262
|
-
| `octocode search <package\|keywords> --target packages` | Search npm and hand off to source repositories |
|
|
263
|
-
| `octocode search <file> --op <type> [--symbol <name>] [--line <n>]` | Trace `definition`, `references`, `callers`, `callees`, `callHierarchy`, `hover`, `typeDefinition`, `implementation`, `workspaceSymbol`, `supertypes`, `subtypes`, and `diagnostic`; `documentSymbols` outlines a file directly |
|
|
264
|
-
| `octocode search <file> --target artifacts` | Inspect archives, compressed files, and native binaries with `--inspect`, `--list`, `--extract`, `--decompress`, or `--strings` |
|
|
265
|
-
| `octocode unzip <archive>` | Unpack an archive to `<octocode-home>/tmp/unzip/<name>-<timestamp>/`, then use local `search --tree`, `search`, and `search <file>` |
|
|
266
|
-
| `octocode clone <owner/repo[/path][@branch]>` | Clone a repo or subtree to `<octocode-home>/tmp/clone/` for local/LSP analysis (`ENABLE_CLONE=true`) |
|
|
267
|
-
| `octocode cache fetch <owner/repo[@ref]> [path] [--depth file\|tree\|clone]` | Materialize remote content locally and return the absolute `localPath`; reuses the cache or force-refreshes with `--force-refresh` |
|
|
268
|
-
| `octocode cache status` | Show size and entry count of clone/tree/binary/unzip cache buckets |
|
|
269
|
-
| `octocode cache clear [--clone\|--repos\|--tree\|--binary\|--unzip\|--all]` | Remove cached materialization data |
|
|
270
|
-
| `octocode search --query <oql-json>` | Route typed OQL across code, content, structure, files, semantics, repositories, packages, pull requests, commits, artifacts, diff, research, graph, and materialization targets |
|
|
271
|
-
| `octocode tools` | List tools, read schemas, or run any MCP tool directly from the terminal |
|
|
272
|
-
| `octocode context` | Print agent-facing protocol, system prompt, tool descriptions, and schemas |
|
|
273
|
-
| `octocode skill --add <github-folder> --platform <common\|cursor\|claude\|codex\|all>` | Install one GitHub Agent Skill folder into deterministic agent destinations; full flags, no prompt |
|
|
274
|
-
| `octocode install` | Configure Octocode in MCP clients |
|
|
275
|
-
| `octocode auth` | Manage GitHub authentication with `login`, `logout`, `refresh`, or read-only `status` |
|
|
276
|
-
| `octocode login` / `octocode logout` | Open the interactive auth picker or clear stored GitHub credentials |
|
|
277
|
-
| `octocode status` | Check token presence, auth identity, MCP installs, sync state, and cache paths |
|
|
278
|
-
|
|
279
|
-
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)
|
|
280
240
|
|
|
281
241
|
---
|
|
282
242
|
|
|
@@ -292,7 +252,7 @@ environment variables > <octocode-home>/.octocoderc > built-in defaults
|
|
|
292
252
|
2. **Global config**: `<octocode-home>/.octocoderc`, machine-wide defaults read by **both the CLI and the MCP server**.
|
|
293
253
|
3. **Built-in defaults**: used when neither is set.
|
|
294
254
|
|
|
295
|
-
**Octocode home** (`<octocode-home>`) holds the global config, encrypted credentials, sessions, stats, and tmp materialization caches.
|
|
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`:
|
|
296
256
|
|
|
297
257
|
| Platform | Location |
|
|
298
258
|
|----------|----------|
|
|
@@ -300,25 +260,7 @@ environment variables > <octocode-home>/.octocoderc > built-in defaults
|
|
|
300
260
|
| Linux | `${XDG_CONFIG_HOME:-~/.config}/.octocode` |
|
|
301
261
|
| Windows | `%APPDATA%\.octocode` |
|
|
302
262
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"mcpServers": {
|
|
308
|
-
"octocode": {
|
|
309
|
-
"command": "npx",
|
|
310
|
-
"args": ["octocode-mcp@latest"],
|
|
311
|
-
"env": {
|
|
312
|
-
"GITHUB_TOKEN": "ghp_xxxxxxxx",
|
|
313
|
-
"ENABLE_LOCAL": "true",
|
|
314
|
-
"ENABLE_CLONE": "false"
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
**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`.
|
|
322
264
|
|
|
323
265
|
### Common settings
|
|
324
266
|
|
|
@@ -326,9 +268,10 @@ The **Scope** column shows where a setting applies: `Both`, or `MCP` (the CLI ig
|
|
|
326
268
|
|
|
327
269
|
| Env var | `.octocoderc` key | Default | Scope | What it does |
|
|
328
270
|
|---------|-------------------|---------|-------|--------------|
|
|
271
|
+
| `OCTOCODE_HOME` | env only | platform default | Both | Overrides the Octocode data directory for config, credentials, sessions, stats, and caches. |
|
|
329
272
|
| `OCTOCODE_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN` | env only | unset | Both | GitHub token, in priority order. Tokens stay in env, never in `.octocoderc`. |
|
|
330
273
|
| `GITHUB_API_URL` | `github.apiUrl` | `https://api.github.com` | Both | API endpoint; use `/api/v3` for GitHub Enterprise. |
|
|
331
|
-
| `ENABLE_LOCAL` | `local.enabled` |
|
|
274
|
+
| `ENABLE_LOCAL` | `local.enabled` | `true` | Both | Turns local filesystem + LSP tools on/off; set `false` to disable. |
|
|
332
275
|
| `ENABLE_CLONE` | `local.enableClone` | CLI `true`, MCP `false` | Both | `ghCloneRepo` and directory fetch. Default differs by surface; set `false` to disable in either. |
|
|
333
276
|
| `WORKSPACE_ROOT` | `local.workspaceRoot` | `cwd` | Both | Absolute root for resolving relative local paths. |
|
|
334
277
|
| `ALLOWED_PATHS` | `local.allowedPaths` | `[]` | Both | Extra path allowlist for local access; empty means home directory only after validation. |
|
|
@@ -337,42 +280,20 @@ The **Scope** column shows where a setting applies: `Both`, or `MCP` (the CLI ig
|
|
|
337
280
|
| `MAX_RETRIES` | `network.maxRetries` | `3` | Both | Retry attempts (clamped `0..10`). |
|
|
338
281
|
| `OCTOCODE_OUTPUT_FORMAT` | `output.format` | `yaml` | Both | Response format: `yaml` or `json`. |
|
|
339
282
|
|
|
340
|
-
> **Local
|
|
341
|
-
|
|
342
|
-
### Example `.octocoderc`
|
|
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`.
|
|
343
284
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
```jsonc
|
|
347
|
-
{
|
|
348
|
-
// GitHub Enterprise users: point at your API endpoint.
|
|
349
|
-
"github": { "apiUrl": "https://api.github.com" },
|
|
350
|
-
|
|
351
|
-
"local": {
|
|
352
|
-
"enabled": true, // overrides the surface default for CLI and MCP
|
|
353
|
-
"enableClone": false, // false disables ghCloneRepo for CLI and MCP
|
|
354
|
-
"workspaceRoot": "~/code", // base for relative local paths (absolute or ~)
|
|
355
|
-
"allowedPaths": [] // extra dirs the local tools may read
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
"network": { "timeout": 30000, "maxRetries": 3 },
|
|
359
|
-
|
|
360
|
-
"output": { "format": "yaml" } // "yaml" or "json"
|
|
361
|
-
}
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
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).
|
|
365
286
|
|
|
366
287
|
---
|
|
367
288
|
|
|
368
289
|
## Authentication Methods
|
|
369
290
|
|
|
370
|
-
GitHub-backed tools require authentication. Any one method is enough. Full details: [Authentication Setup](https://github.com/bgauryy/octocode/blob/main/docs/
|
|
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).
|
|
371
292
|
|
|
372
293
|
### Option 1: Octocode CLI (Recommended)
|
|
373
294
|
|
|
374
295
|
```bash
|
|
375
|
-
npx octocode login
|
|
296
|
+
npx octocode auth login
|
|
376
297
|
npx octocode status # verify the active token source
|
|
377
298
|
```
|
|
378
299
|
|
|
@@ -412,7 +333,7 @@ Create a token at [github.com/settings/tokens](https://github.com/settings/token
|
|
|
412
333
|
- **Schema validation** runs before any tool executes; untrusted input size and shape are bounded.
|
|
413
334
|
- **Credentials.** GitHub auth via env tokens, AES-256-GCM-encrypted on-disk OAuth, or the `gh` CLI; tokens are never logged.
|
|
414
335
|
|
|
415
|
-
**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/
|
|
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)
|
|
416
337
|
|
|
417
338
|
---
|
|
418
339
|
|
|
@@ -422,12 +343,12 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
|
|
|
422
343
|
|
|
423
344
|
| Axis | What it does | How to use it |
|
|
424
345
|
|------|--------------|---------------|
|
|
425
|
-
| **Structural AST** | Tree-sitter shape queries (`pattern` or YAML `rule`) across
|
|
346
|
+
| **Structural AST** | Tree-sitter shape queries (`pattern` or YAML `rule`) across 60+ extensions. | `localSearchCode mode:"structural"` · CLI `search --pattern`/`--rule` |
|
|
426
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` |
|
|
427
348
|
| **Content minification** | Comment/whitespace stripping for 70+ languages and config formats; HTML/Vue/Svelte also minify embedded `<style>`/`<script>`. | `minify:"standard"` (default) |
|
|
428
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` |
|
|
429
350
|
|
|
430
|
-
📋 **Full support matrix:** every extension with its exact AST, signature, LSP, and minify capability, machine-generated from the shipped binary, lives in **[
|
|
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`.
|
|
431
352
|
|
|
432
353
|
---
|
|
433
354
|
|
|
@@ -436,31 +357,35 @@ Four code-intelligence axes; three are native to the Rust engine and need no ext
|
|
|
436
357
|
> [Agent Skills](https://agentskills.io/what-are-skills) are a lightweight, open format for extending AI agent capabilities.
|
|
437
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)
|
|
438
359
|
|
|
439
|
-
These are the skills the Octocode team itself uses to build Octocode. **
|
|
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.
|
|
440
361
|
|
|
441
|
-
|
|
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.
|
|
442
363
|
|
|
443
|
-
|
|
444
|
-
# Shared cross-agent location: ~/.agents/skills
|
|
445
|
-
npx octocode skill --add bgauryy/octocode-mcp/skills/octocode-engineer --platform common
|
|
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.
|
|
446
365
|
|
|
447
|
-
|
|
448
|
-
npx octocode skill --
|
|
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
|
|
449
375
|
```
|
|
450
376
|
|
|
451
|
-
Platforms: `common` (`~/.agents/skills`), `cursor
|
|
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)
|
|
452
378
|
|
|
453
|
-
| Skill | Directory | Use it when |
|
|
454
|
-
|
|
455
|
-
| [**
|
|
456
|
-
|
|
|
457
|
-
| [**
|
|
458
|
-
| [**
|
|
459
|
-
| [**
|
|
460
|
-
| [**
|
|
461
|
-
| [**
|
|
462
|
-
| [**
|
|
463
|
-
| [**Stats**](https://www.skills.sh/bgauryy/octocode-mcp/octocode-stats) | `octocode-stats/` | You want to visualize Octocode usage: tokens/chars saved, cache hits, errors, and rate limits from `stats.json`. |
|
|
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. |
|
|
464
389
|
|
|
465
390
|
---
|
|
466
391
|
|
|
@@ -500,7 +425,7 @@ client → sanitize inputs (Rust) → run tool (GitHub / FS / LSP) → sanitize
|
|
|
500
425
|
| Directory | npm package | Role |
|
|
501
426
|
|-----------|-------------|------|
|
|
502
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. |
|
|
503
|
-
| [`packages/octocode-mcp`](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) |
|
|
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. |
|
|
504
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. |
|
|
505
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. |
|
|
506
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. |
|
|
@@ -509,55 +434,58 @@ client → sanitize inputs (Rust) → run tool (GitHub / FS / LSP) → sanitize
|
|
|
509
434
|
|
|
510
435
|
## Documentation
|
|
511
436
|
|
|
512
|
-
Website: **[octocode.ai](https://octocode.ai)** · Product docs: **[github.com/bgauryy/octocode/tree/main/docs](https://github.com/bgauryy/octocode/tree/main/docs)
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
- [
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
- [Security Model](https://github.com/bgauryy/octocode/blob/main/docs/SECURITY.md)
|
|
541
|
-
- [CLI Reference](https://github.com/bgauryy/octocode/blob/main/docs/cli/REFERENCE.md)
|
|
542
|
-
- [Skills Guide](https://github.com/bgauryy/octocode/blob/main/docs/SKILLS_GUIDE.md)
|
|
543
|
-
- [Skills Index](https://github.com/bgauryy/octocode/blob/main/skills/README.md)
|
|
544
|
-
|
|
545
|
-
**Shared Internals**
|
|
546
|
-
- [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)
|
|
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
|
+
---
|
|
451
|
+
|
|
452
|
+
## Troubleshooting
|
|
453
|
+
|
|
454
|
+
Having Node.js issues? Run:
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
npx node-doctor check --json
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Read the output and fix accordingly.
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Agent Workflows
|
|
547
465
|
|
|
548
466
|
### Recommended dev mode: Pi + Octocode
|
|
549
467
|
|
|
550
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:
|
|
551
469
|
|
|
552
|
-
- **Skill route — recommended, leanest.** Drop the [`octocode-
|
|
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:
|
|
553
471
|
|
|
554
472
|
```bash
|
|
555
|
-
npx octocode skill --
|
|
473
|
+
npx octocode skill --name octocode-research --platform pi
|
|
556
474
|
```
|
|
557
475
|
|
|
558
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`.
|
|
559
477
|
|
|
560
|
-
Tune Pi's behavior with an `APPEND_SYSTEM.md`
|
|
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.
|
|
487
|
+
|
|
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.
|
|
561
489
|
|
|
562
490
|
### The Manifest
|
|
563
491
|
|