octocode-cli 1.5.1 → 1.5.3
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 +28 -9
- package/out/chunks/chunk-375ZNU3A.js +317 -0
- package/out/chunks/{chunk-V64AXUWB.js → chunk-AYILFPX4.js} +1 -1
- package/out/chunks/chunk-BRHVQB64.js +10 -0
- package/out/chunks/{command-help-specs-JZXVSLZ5.js → chunk-KWJUBVXJ.js} +1 -1
- package/out/chunks/chunk-OMXWZJBJ.js +100 -0
- package/out/chunks/command-help-specs-RVJK6V6M.js +8 -0
- package/out/chunks/commands-JFDCC4Q7.js +8 -0
- package/out/chunks/{help-P7TCOYAJ.js → help-H3WGUJO7.js} +1 -1
- package/out/chunks/main-help-BUTDD4IR.js +10 -0
- package/out/chunks/{spinner-URV2OX6O.js → spinner-DXD4JQIU.js} +1 -1
- package/out/chunks/tool-command-L6PVHUNS.js +8 -0
- package/out/octocode-cli.js +1 -1
- package/package.json +2 -2
- package/skills/octocode-brainstorming/scripts/tavily-search.mjs +1 -10
- package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +0 -2
- package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +1 -5
- package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +1 -10
- package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +0 -3
- package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +1 -4
- package/skills/octocode-chrome-devtools/scripts/undercover.mjs +0 -2
- package/skills/octocode-engineer/SKILL.md +7 -33
- package/skills/octocode-engineer/references/cli-reference.md +5 -11
- package/skills/octocode-engineer/references/externals.md +0 -4
- package/skills/octocode-engineer/references/quality-indicators.md +10 -50
- package/skills/octocode-engineer/references/tool-workflows.md +10 -13
- package/skills/octocode-engineer/src/analysis/dependency-summary.test.ts +2 -2
- package/skills/octocode-engineer/src/ast/metrics.test.ts +2 -2
- package/skills/octocode-engineer/src/ast/search-main.ts +2 -15
- package/skills/octocode-engineer/src/ast/search.ts +1 -7
- package/skills/octocode-engineer/src/ast/tree-sitter.test.ts +4 -4
- package/skills/octocode-engineer/src/ast/tree-sitter.ts +2 -2
- package/skills/octocode-engineer/src/collectors/chains.ts +3 -10
- package/skills/octocode-engineer/src/collectors/prototype-pollution.ts +3 -3
- package/skills/octocode-engineer/src/collectors/security.ts +3 -3
- package/skills/octocode-engineer/src/common/ensure-deps.ts +3 -20
- package/skills/octocode-engineer/src/detectors/code-quality.ts +0 -1
- package/skills/octocode-engineer/src/index.test.ts +1 -1
- package/skills/octocode-engineer/src/index.ts +1 -11
- package/skills/octocode-engineer/src/pipeline/affected.ts +2 -7
- package/skills/octocode-engineer/src/pipeline/baseline.ts +2 -8
- package/skills/octocode-engineer/src/pipeline/cache.ts +2 -2
- package/skills/octocode-engineer/src/pipeline/config-loader.test.ts +1 -2
- package/skills/octocode-engineer/src/pipeline/config-loader.ts +0 -9
- package/skills/octocode-engineer/src/pipeline/create-options.ts +2 -15
- package/skills/octocode-engineer/src/pipeline/reporters.ts +2 -12
- package/skills/octocode-engineer/src/reporting/summary-md.test.ts +2 -2
- package/skills/octocode-engineer/src/run.ts +1 -7
- package/skills/octocode-engineer/src/types/constants.ts +0 -5
- package/skills/octocode-engineer/src/types/core.ts +0 -5
- package/skills/octocode-news/eslint.config.mjs +1 -6
- package/skills/octocode-news/src/rss-core.ts +2 -4
- package/skills/octocode-research/ecosystem.config.cjs +0 -31
- package/skills/octocode-research/package.json +1 -1
- package/skills/octocode-research/scripts/server.js +272 -230
- package/skills/octocode-research/src/__tests__/integration/circuitBreaker.test.ts +0 -24
- package/skills/octocode-research/src/__tests__/integration/routes.test.ts +0 -10
- package/skills/octocode-research/src/__tests__/integration/serverLifecycle.test.ts +5 -22
- package/skills/octocode-research/src/__tests__/integration/toolsRoutes.test.ts +0 -27
- package/skills/octocode-research/src/__tests__/unit/circuitBreaker.test.ts +0 -29
- package/skills/octocode-research/src/__tests__/unit/errorHandler.test.ts +1 -12
- package/skills/octocode-research/src/__tests__/unit/httpPreprocess.test.ts +1 -9
- package/skills/octocode-research/src/__tests__/unit/logger.test.ts +0 -7
- package/skills/octocode-research/src/__tests__/unit/queryParser.test.ts +1 -7
- package/skills/octocode-research/src/__tests__/unit/responseBuilder.test.ts +0 -11
- package/skills/octocode-research/src/__tests__/unit/retry.test.ts +1 -18
- package/skills/octocode-research/src/__tests__/unit/schemas.test.ts +2 -25
- package/skills/octocode-research/src/index.ts +0 -27
- package/skills/octocode-research/src/mcpCache.ts +3 -18
- package/skills/octocode-research/src/middleware/errorHandler.ts +1 -4
- package/skills/octocode-research/src/middleware/logger.ts +1 -6
- package/skills/octocode-research/src/middleware/queryParser.ts +3 -22
- package/skills/octocode-research/src/routes/github.ts +0 -11
- package/skills/octocode-research/src/routes/local.ts +0 -12
- package/skills/octocode-research/src/routes/lsp.ts +1 -10
- package/skills/octocode-research/src/routes/package.ts +0 -2
- package/skills/octocode-research/src/routes/prompts.ts +2 -32
- package/skills/octocode-research/src/routes/tools.ts +12 -177
- package/skills/octocode-research/src/server-init.ts +0 -32
- package/skills/octocode-research/src/server.ts +8 -37
- package/skills/octocode-research/src/types/errorGuards.ts +0 -15
- package/skills/octocode-research/src/types/guards.ts +6 -27
- package/skills/octocode-research/src/types/mcp.ts +1 -8
- package/skills/octocode-research/src/types/responses.ts +0 -15
- package/skills/octocode-research/src/utils/asyncTimeout.ts +1 -63
- package/skills/octocode-research/src/utils/circuitBreaker.ts +43 -166
- package/skills/octocode-research/src/utils/colors.ts +3 -17
- package/skills/octocode-research/src/utils/errorQueue.ts +6 -28
- package/skills/octocode-research/src/utils/logger.ts +11 -93
- package/skills/octocode-research/src/utils/resilience.ts +22 -77
- package/skills/octocode-research/src/utils/responseBuilder.ts +26 -78
- package/skills/octocode-research/src/utils/responseFactory.ts +0 -7
- package/skills/octocode-research/src/utils/responseParser.ts +11 -59
- package/skills/octocode-research/src/utils/retry.ts +12 -75
- package/skills/octocode-research/src/utils/routeFactory.ts +10 -61
- package/skills/octocode-research/src/utils/url.ts +0 -5
- package/skills/octocode-research/src/validation/httpPreprocess.ts +15 -61
- package/skills/octocode-research/src/validation/schemas.ts +14 -101
- package/skills/octocode-research/src/validation/toolCallSchema.ts +5 -65
- package/skills/octocode-research/tsdown.config.ts +2 -7
- package/skills/octocode-search-skill/SKILL.md +9 -2
- package/skills/octocode-search-skill/references/discovery-surfaces.md +2 -1
- package/skills/octocode-slides/scripts/navbridge.js +1 -14
- package/skills/octocode-slides/scripts/presenter.js +2 -61
- package/skills/octocode-stats/scripts/build_dashboard.mjs +1 -19
- package/out/chunks/chunk-7476PETK.js +0 -309
- package/out/chunks/chunk-OQBJTZWK.js +0 -60
- package/out/chunks/chunk-UCZCF3BQ.js +0 -9
- package/out/chunks/commands-XBFPLHSQ.js +0 -8
- package/out/chunks/main-help-ULF5PAQY.js +0 -10
- package/out/chunks/tool-command-M6VA7P2F.js +0 -8
- package/skills/octocode-research/AGENTS.md +0 -349
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npx octocode-cli install
|
|
|
36
36
|
Verify, then sign in:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
octocode --version # → octocode v1.5.
|
|
39
|
+
octocode --version # → octocode v1.5.3
|
|
40
40
|
octocode login # GitHub OAuth (device flow)
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -74,23 +74,28 @@ Call any tool directly from the terminal. Great for scripts, pipelines, and one-
|
|
|
74
74
|
| **LSP** | `lspGotoDefinition` | Navigate to a symbol's definition |
|
|
75
75
|
| | `lspFindReferences` | Find all usages of a symbol |
|
|
76
76
|
| | `lspCallHierarchy` | Trace function call relationships |
|
|
77
|
-
| **Package** | `packageSearch` | Resolve npm
|
|
77
|
+
| **Package** | `packageSearch` | Resolve an npm package to its source repo + metadata |
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
# Discover
|
|
81
|
+
octocode --agent # agent bootstrap: protocol + tools + input fields
|
|
82
|
+
octocode --agent --full # …plus every tool's full JSON schema inline
|
|
81
83
|
octocode tools # list all tools
|
|
82
84
|
octocode tools localSearchCode # show one tool's schema
|
|
83
85
|
octocode tools localSearchCode githubSearchCode # batch schemas
|
|
84
|
-
octocode instructions #
|
|
86
|
+
octocode instructions # alias of --agent (add --full for all schemas)
|
|
85
87
|
|
|
86
88
|
# Run
|
|
87
89
|
octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}'
|
|
88
90
|
octocode tools githubSearchCode --queries '{"keywordsToSearch":["useReducer"],"owner":"facebook","repo":"react"}'
|
|
89
|
-
octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}' --json
|
|
91
|
+
octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}' --json # full MCP envelope
|
|
92
|
+
octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}' --compact # leanest (structuredContent only)
|
|
90
93
|
```
|
|
91
94
|
|
|
92
95
|
The shared metadata fields (`id`, `researchGoal`, `reasoning`, `mainResearchGoal`) are auto-filled. Provide only tool-specific fields.
|
|
93
96
|
|
|
97
|
+
> **For agents:** run `octocode --agent` once for the full bootstrap (protocol + every tool + input fields + the mandatory "read the schema before calling" rule + the exit-code table). Then `octocode tools <name>` to confirm a tool's exact schema before calling it. This checklist is also printed at the top of `octocode --help`.
|
|
98
|
+
|
|
94
99
|
---
|
|
95
100
|
|
|
96
101
|
## GitHub Token
|
|
@@ -103,6 +108,8 @@ For env-based setup, any of these are accepted (checked in this priority): `OCTO
|
|
|
103
108
|
export GITHUB_TOKEN=ghp_xxx # or OCTOCODE_TOKEN / GH_TOKEN
|
|
104
109
|
octocode token --source # show which token & source is being used
|
|
105
110
|
octocode token --validate # ping the GitHub API to verify it
|
|
111
|
+
octocode token # masked on screen; raw when piped, e.g. export GH_TOKEN=$(octocode token)
|
|
112
|
+
octocode token --reveal # print the full token on screen
|
|
106
113
|
```
|
|
107
114
|
|
|
108
115
|
---
|
|
@@ -113,7 +120,7 @@ octocode token --validate # ping the GitHub API to verify it
|
|
|
113
120
|
|---------|---------|--------------|
|
|
114
121
|
| `install --ide <ide>` | `i`, `setup` | Configure octocode-mcp for an IDE |
|
|
115
122
|
| `install --ide <ide> --check` | | Pre-flight: verify config path is writable, show what would change |
|
|
116
|
-
| `install --ide <ide>
|
|
123
|
+
| `install --ide <ide> --method npx` | | Installation method (`npx` is the only/default method) |
|
|
117
124
|
| `install --ide <ide> --force` | | Overwrite an existing configuration |
|
|
118
125
|
| `install --ide <ide> --rollback` | | Restore the most recent backup configuration |
|
|
119
126
|
| `install --ide <ide> --rollback --backup-path <file>` | | Restore a specific backup file |
|
|
@@ -127,6 +134,7 @@ octocode token --validate # ping the GitHub API to verify it
|
|
|
127
134
|
| `token --type <auto\|octocode\|gh>` | | Force a specific token source instead of auto-resolution |
|
|
128
135
|
| `token --source` | | Show which source resolved the token |
|
|
129
136
|
| `token --validate` | | Ping the GitHub API to verify the token and show rate-limit |
|
|
137
|
+
| `token --reveal` | | Print the full token on screen (default: masked on a terminal, raw when piped) |
|
|
130
138
|
| `status` | `s` | Full health check: auth + MCP clients + cache |
|
|
131
139
|
| `status --sync` | | Also include per-MCP sync analysis |
|
|
132
140
|
| `sync` | `sy` | Sync MCP configs across all IDEs |
|
|
@@ -134,9 +142,10 @@ octocode token --validate # ping the GitHub API to verify it
|
|
|
134
142
|
| `sync --status` | | Show sync analysis without syncing |
|
|
135
143
|
| `sync --force` | | Auto-resolve conflicts (use first variant found) |
|
|
136
144
|
| `skills` | `sk` | Install / remove / list / search / read / sync skills |
|
|
137
|
-
| `skills search
|
|
145
|
+
| `skills search <query>` | | In a terminal: immediate results from skills.sh. In scripts/agents (non-TTY): emits the research protocol |
|
|
146
|
+
| `skills search --direct` | | Force direct results from skills.sh (auto-enabled in a terminal; use this in scripts/pipes) |
|
|
138
147
|
| `skills search --direct --install` | | Fetch and install top result automatically |
|
|
139
|
-
| `skills read <path\|
|
|
148
|
+
| `skills read <path \| owner/repo/path \| github-url>` | | Preview a SKILL.md from disk or GitHub (`--full` for untruncated) |
|
|
140
149
|
| `skills install --targets <t1,t2>` | | Install all bundled skills to targets |
|
|
141
150
|
| `skills install --skill <name> --targets <t>` | | Install one specific skill |
|
|
142
151
|
| `skills install --local <path> --targets <t>` | | Install a local skill folder |
|
|
@@ -174,7 +183,10 @@ Most subcommands accept `--hostname <host>` for GitHub Enterprise.
|
|
|
174
183
|
|
|
175
184
|
| Flag | Description |
|
|
176
185
|
|------|-------------|
|
|
177
|
-
| `--json`, `-j` | Raw JSON output (
|
|
186
|
+
| `--json`, `-j` | Raw JSON output (full MCP envelope) for tool runs |
|
|
187
|
+
| `--compact` | Leanest tool output: minified `structuredContent` only (~60% smaller than `--json`) |
|
|
188
|
+
| `--agent` | Print the agent bootstrap: protocol + every tool + input fields (add `--full` for all JSON schemas) |
|
|
189
|
+
| `--no-color` | Disable ANSI colors (also honored via `NO_COLOR=1`) |
|
|
178
190
|
| `--version`, `-v` | Print the CLI version |
|
|
179
191
|
| `--help`, `-h` | Show help for the CLI or a command |
|
|
180
192
|
|
|
@@ -192,7 +204,14 @@ Most subcommands accept `--hostname <host>` for GitHub Enterprise.
|
|
|
192
204
|
| Code | Meaning |
|
|
193
205
|
|------|---------|
|
|
194
206
|
| `0` | Success |
|
|
195
|
-
| `1` |
|
|
207
|
+
| `1` | General error |
|
|
208
|
+
| `2` | Invalid input / unsupported flags |
|
|
209
|
+
| `3` | Unknown tool or command |
|
|
210
|
+
| `4` | Authentication failure |
|
|
211
|
+
| `5` | Tool / API execution error |
|
|
212
|
+
| `7` | Rate limited |
|
|
213
|
+
|
|
214
|
+
Typed codes `2`–`7` apply to the tool surface (`tools`, `--tool`) and command dispatch, so agents can branch on the failure mode without parsing output. Management commands (`install`, `auth`, `sync`, …) use `0`/`1`.
|
|
196
215
|
|
|
197
216
|
---
|
|
198
217
|
|