octocode-cli 1.3.1 → 1.5.1

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 (102) hide show
  1. package/README.md +193 -34
  2. package/out/chunks/chunk-7476PETK.js +309 -0
  3. package/out/chunks/chunk-CVNNNSMQ.js +26 -0
  4. package/out/chunks/chunk-OQBJTZWK.js +60 -0
  5. package/out/chunks/chunk-UCZCF3BQ.js +9 -0
  6. package/out/chunks/command-help-specs-JZXVSLZ5.js +8 -0
  7. package/out/chunks/commands-XBFPLHSQ.js +8 -0
  8. package/out/chunks/help-P7TCOYAJ.js +10 -0
  9. package/out/chunks/main-help-ULF5PAQY.js +10 -0
  10. package/out/chunks/prompts-5E6VKRX5.js +8 -0
  11. package/out/chunks/spinner-URV2OX6O.js +8 -0
  12. package/out/chunks/tool-command-M6VA7P2F.js +8 -0
  13. package/out/octocode-cli.js +1 -1
  14. package/package.json +5 -3
  15. package/skills/README.md +13 -1
  16. package/skills/agentic-flow-best-practices/SKILL.md +280 -0
  17. package/skills/agentic-flow-best-practices/references/agent-collaboration-patterns.md +75 -0
  18. package/skills/agentic-flow-best-practices/references/pr-review-agent-example.md +47 -0
  19. package/skills/agentic-flow-best-practices/references/resources.md +112 -0
  20. package/skills/octocode-chrome-devtools/README.md +541 -0
  21. package/skills/octocode-chrome-devtools/SKILL.md +197 -0
  22. package/skills/octocode-chrome-devtools/agents/openai.yaml +7 -0
  23. package/skills/octocode-chrome-devtools/references/CDP_AGENT_REFERENCE.md +401 -0
  24. package/skills/octocode-chrome-devtools/references/CHROME_FLAGS.md +234 -0
  25. package/skills/octocode-chrome-devtools/references/INTENTS.md +108 -0
  26. package/skills/octocode-chrome-devtools/references/INTENTS_AUTH.md +179 -0
  27. package/skills/octocode-chrome-devtools/references/INTENTS_AUTOMATION.md +214 -0
  28. package/skills/octocode-chrome-devtools/references/INTENTS_DEBUG.md +329 -0
  29. package/skills/octocode-chrome-devtools/references/INTENTS_ENVIRONMENT.md +237 -0
  30. package/skills/octocode-chrome-devtools/references/INTENTS_INSPECT.md +263 -0
  31. package/skills/octocode-chrome-devtools/references/INTENTS_STORAGE_CONSENT.md +214 -0
  32. package/skills/octocode-chrome-devtools/references/RECOVERY.md +39 -0
  33. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS.md +43 -0
  34. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_ASYNC_WORKERS.md +345 -0
  35. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_BROWSER.md +403 -0
  36. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_OBSERVE.md +275 -0
  37. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_SPECIAL.md +18 -0
  38. package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +503 -0
  39. package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +123 -0
  40. package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +81 -0
  41. package/skills/octocode-chrome-devtools/scripts/octocode-chrome-devtools.vpn.example.json +8 -0
  42. package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +362 -0
  43. package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +193 -0
  44. package/skills/octocode-chrome-devtools/scripts/undercover.mjs +226 -0
  45. package/skills/octocode-design/README.md +2 -2
  46. package/skills/octocode-documentation-writer/README.md +1 -1
  47. package/skills/octocode-engineer/README.md +1 -1
  48. package/skills/octocode-engineer/SKILL.md +4 -2
  49. package/skills/octocode-engineer/references/output-files.md +3 -3
  50. package/skills/octocode-engineer/scripts/run.js +136 -136
  51. package/skills/octocode-engineer/src/reporting/summary-md.test.ts +48 -0
  52. package/skills/octocode-engineer/src/reporting/summary-md.ts +43 -2
  53. package/skills/octocode-install/SKILL.md +1 -1
  54. package/skills/octocode-pull-request-reviewer/README.md +5 -5
  55. package/skills/octocode-pull-request-reviewer/SKILL.md +1 -1
  56. package/skills/octocode-research/AGENTS.md +1 -1
  57. package/skills/octocode-research/README.md +2 -2
  58. package/skills/octocode-research/docs/ARCHITECTURE.md +1 -1
  59. package/skills/octocode-research/scripts/server.js +191 -246
  60. package/skills/octocode-research/src/routes/github.ts +4 -21
  61. package/skills/octocode-research/src/routes/local.ts +4 -21
  62. package/skills/octocode-research/src/utils/fileContentTransform.ts +44 -0
  63. package/skills/octocode-search-skill/SKILL.md +245 -229
  64. package/skills/octocode-search-skill/references/agent-skills-guide.md +177 -0
  65. package/skills/octocode-search-skill/references/discovery-surfaces.md +162 -0
  66. package/skills/octocode-search-skill/references/fetch-and-create-locally.md +57 -0
  67. package/skills/octocode-search-skill/references/install-reference.md +130 -0
  68. package/skills/octocode-search-skill/references/references-template.md +27 -0
  69. package/skills/octocode-search-skill/references/references.md +62 -0
  70. package/skills/octocode-slides/README.md +307 -0
  71. package/skills/octocode-slides/SKILL.md +410 -0
  72. package/skills/octocode-slides/references/01-brief.md +156 -0
  73. package/skills/octocode-slides/references/02-research.md +149 -0
  74. package/skills/octocode-slides/references/03-outline.md +172 -0
  75. package/skills/octocode-slides/references/04-design.md +301 -0
  76. package/skills/octocode-slides/references/05-implementation.md +213 -0
  77. package/skills/octocode-slides/references/06-review.md +258 -0
  78. package/skills/octocode-slides/references/animation.md +281 -0
  79. package/skills/octocode-slides/references/design-system.md +316 -0
  80. package/skills/octocode-slides/references/html-templates.md +673 -0
  81. package/skills/octocode-slides/references/image-generation.md +448 -0
  82. package/skills/octocode-slides/references/resources.md +840 -0
  83. package/skills/octocode-slides/references/slide-rules.md +541 -0
  84. package/skills/octocode-slides/references/wireframes.md +727 -0
  85. package/skills/octocode-slides/scripts/animation.js +182 -0
  86. package/skills/octocode-slides/scripts/base.css +353 -0
  87. package/skills/octocode-slides/scripts/base.html +655 -0
  88. package/skills/octocode-slides/scripts/generate_image.py +221 -0
  89. package/skills/octocode-slides/scripts/navbridge.js +79 -0
  90. package/skills/octocode-slides/scripts/presenter.js +316 -0
  91. package/skills/octocode-slides/scripts/slide.html +248 -0
  92. package/skills/octocode-stats/SKILL.md +73 -0
  93. package/skills/octocode-stats/assets/template.html +1332 -0
  94. package/skills/octocode-stats/scripts/build_dashboard.mjs +407 -0
  95. package/assets/example.png +0 -0
  96. package/out/chunks/chunk-QCY7Q7YW.js +0 -389
  97. package/out/chunks/command-help-specs-CQ3RBLP6.js +0 -8
  98. package/out/chunks/commands-OCTZP2TO.js +0 -51
  99. package/out/chunks/help-XPXP46ZT.js +0 -10
  100. package/out/chunks/main-help-35HX2UDQ.js +0 -10
  101. package/out/chunks/tool-command-HOSMVLNK.js +0 -8
  102. package/skills/octocode-search-skill/INSTALL_REFERENCE.md +0 -112
package/README.md CHANGED
@@ -6,69 +6,228 @@
6
6
  [![npm downloads](https://img.shields.io/npm/dm/octocode-cli.svg?style=flat-square)](https://www.npmjs.com/package/octocode-cli)
7
7
  [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-cli/LICENSE)
8
8
 
9
- **Two things in one binary:**
9
+ **Two things in one binary:** manage Octocode MCP across your IDEs, and run any Octocode tool directly from the terminal.
10
10
 
11
- 1. **Manage** install, authenticate, sync, and configure Octocode MCP, skills, and marketplace MCPs across IDEs.
12
- 2. **Run tools** — call any Octocode tool directly from the terminal, for agents and humans alike.
11
+ [Website](https://octocode.ai) · [CLI Reference](https://github.com/bgauryy/octocode-mcp/blob/main/docs/dev/reference/CLI_REFERENCE.md) · [GitHub](https://github.com/bgauryy/octocode-mcp)
13
12
 
14
- [Website](https://octocode.ai) | [CLI Reference](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-cli/docs/CLI_REFERENCE.md) | [GitHub](https://github.com/bgauryy/octocode-mcp)
13
+ <img src="https://github.com/bgauryy/octocode-mcp/raw/main/packages/octocode-mcp/assets/logo_white.png" width="400px" alt="Octocode Logo">
15
14
 
16
- <img src="https://raw.githubusercontent.com/bgauryy/octocode-mcp/main/packages/octocode-cli/assets/example.png" alt="Octocode CLI Demo" width="700" style="border-radius: 8px; margin: 20px 0;">
17
15
 
18
16
  </div>
19
17
 
20
- ## Quick Start
18
+ ---
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ # Homebrew (macOS / Linux): installs the `octocode` command globally
24
+ brew install bgauryy/octocode/octocode
25
+
26
+ # equivalent short form
27
+ brew tap bgauryy/octocode && brew install octocode
28
+
29
+ # or npm (global)
30
+ npm install -g octocode-cli
31
+
32
+ # or run once without installing
33
+ npx octocode-cli install
34
+ ```
35
+
36
+ Verify, then sign in:
21
37
 
22
38
  ```bash
23
- npx octocode-cli install # Interactive setup
24
- octocode-cli install --ide cursor # Non-interactive install
25
- octocode-cli auth # GitHub authentication
39
+ octocode --version # octocode v1.5.0
40
+ octocode login # GitHub OAuth (device flow)
26
41
  ```
27
42
 
28
- ## Run Tools
43
+ The installed command is **`octocode`** (not `octocode-cli`). Homebrew pulls in Node automatically.
29
44
 
30
- Call any Octocode tool directly — works for agents, scripts, and humans. Shared fields (`id`, `researchGoal`, `reasoning`, `mainResearchGoal`) are auto-filled.
45
+ ## Quick Start
31
46
 
32
47
  ```bash
33
- octocode-cli --tool localSearchCode --queries '{"path":".","pattern":"runCLI"}'
34
- octocode-cli --tool githubSearchCode --queries '{"keywordsToSearch":["useReducer"],"owner":"facebook","repo":"react"}'
35
- octocode-cli --tool githubSearchCode --help # Input/output schema
36
- octocode-cli --tools-context # Full MCP instructions + all schemas
48
+ octocode login # GitHub authentication
49
+ octocode install --ide cursor # wire MCP into an editor
50
+ octocode install --ide cursor --check # pre-flight: check writability & current state
51
+ octocode skills install --targets claude-code # add Agent Skills
52
+ octocode tools # list every tool
53
+ octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}'
37
54
  ```
38
55
 
39
- ## Manage Octocode
56
+ ---
57
+
58
+ ## The 14 Tools
59
+
60
+ Call any tool directly from the terminal. Great for scripts, pipelines, and one-off queries. No MCP server required.
61
+
62
+ | Group | Tool | What it does |
63
+ |-------|------|--------------|
64
+ | **GitHub** | `githubSearchCode` | Search code across GitHub `[EXTERNAL]` |
65
+ | | `githubSearchRepositories` | Search repositories by keywords/topics `[EXTERNAL]` |
66
+ | | `githubSearchPullRequests` | Search pull requests `[EXTERNAL]` |
67
+ | | `githubGetFileContent` | Read file content (matchString, line ranges) `[EXTERNAL]` |
68
+ | | `githubViewRepoStructure` | List a repo's directory tree `[EXTERNAL]` |
69
+ | | `githubCloneRepo` | Clone a repo/subtree to disk for local + LSP analysis |
70
+ | **Local** | `localSearchCode` | Search code patterns with ripgrep (PCRE2) |
71
+ | | `localFindFiles` | Find files by name/metadata |
72
+ | | `localGetFileContent` | Read local file content |
73
+ | | `localViewStructure` | View a local directory tree |
74
+ | **LSP** | `lspGotoDefinition` | Navigate to a symbol's definition |
75
+ | | `lspFindReferences` | Find all usages of a symbol |
76
+ | | `lspCallHierarchy` | Trace function call relationships |
77
+ | **Package** | `packageSearch` | Resolve npm / PyPI packages to their source repo |
40
78
 
41
- | Command | What it does |
42
- |---------|--------------|
43
- | `install` | Configure octocode-mcp for an IDE |
44
- | `auth` / `login` / `logout` | GitHub authentication |
45
- | `token` / `status` | Token and auth info |
46
- | `sync` | Sync MCP configs across IDEs |
47
- | `skills` | Install/remove bundled skills |
48
- | `mcp` | Manage MCP marketplace |
49
- | `cache` | Inspect/clean cache and logs |
79
+ ```bash
80
+ # Discover
81
+ octocode tools # list all tools
82
+ octocode tools localSearchCode # show one tool's schema
83
+ octocode tools localSearchCode githubSearchCode # batch schemas
84
+ octocode instructions # full MCP instructions + all schemas
85
+
86
+ # Run
87
+ octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}'
88
+ octocode tools githubSearchCode --queries '{"keywordsToSearch":["useReducer"],"owner":"facebook","repo":"react"}'
89
+ octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}' --json # machine-readable
90
+ ```
50
91
 
51
- ## Supported Clients
92
+ The shared metadata fields (`id`, `researchGoal`, `reasoning`, `mainResearchGoal`) are auto-filled. Provide only tool-specific fields.
52
93
 
53
- `cursor`, `claude-desktop`, `claude-code`, `windsurf`, `zed`, `vscode-cline`, `vscode-roo`, `vscode-continue`, `opencode`, `trae`, `antigravity`, `codex`, `gemini-cli`, `goose`, `kiro`.
94
+ ---
54
95
 
55
- ## Docs
96
+ ## GitHub Token
56
97
 
57
- - [CLI Reference](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-cli/docs/CLI_REFERENCE.md) full command and tool syntax
58
- - [Skills Guide](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-cli/docs/SKILLS_GUIDE.md) — bundled skills installation
98
+ Octocode resolves a GitHub token in this order: **environment variable → Octocode-managed token (`octocode login`) `gh` CLI**.
99
+
100
+ For env-based setup, any of these are accepted (checked in this priority): `OCTOCODE_TOKEN`, `GH_TOKEN`, `GITHUB_TOKEN`.
101
+
102
+ ```bash
103
+ export GITHUB_TOKEN=ghp_xxx # or OCTOCODE_TOKEN / GH_TOKEN
104
+ octocode token --source # show which token & source is being used
105
+ octocode token --validate # ping the GitHub API to verify it
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Commands
111
+
112
+ | Command | Aliases | What it does |
113
+ |---------|---------|--------------|
114
+ | `install --ide <ide>` | `i`, `setup` | Configure octocode-mcp for an IDE |
115
+ | `install --ide <ide> --check` | | Pre-flight: verify config path is writable, show what would change |
116
+ | `install --ide <ide> -m <npx\|direct>` | | Choose install method (default `npx`; `direct` points at a local binary) |
117
+ | `install --ide <ide> --force` | | Overwrite an existing configuration |
118
+ | `install --ide <ide> --rollback` | | Restore the most recent backup configuration |
119
+ | `install --ide <ide> --rollback --backup-path <file>` | | Restore a specific backup file |
120
+ | `auth` / `login` / `logout` | `a`, `gh` / `l` / | GitHub authentication |
121
+ | `login --force` | | Log out the current session and re-authenticate in one step |
122
+ | `login --git-protocol <ssh\|https>` | | Set the git protocol used for clones |
123
+ | `login --hostname <host>` | | Target a GitHub Enterprise host |
124
+ | `logout --yes` | | Skip the confirmation prompt |
125
+ | `auth refresh` | | Refresh an Octocode-managed token (source-aware) |
126
+ | `token` | `t` | Print the resolved GitHub token |
127
+ | `token --type <auto\|octocode\|gh>` | | Force a specific token source instead of auto-resolution |
128
+ | `token --source` | | Show which source resolved the token |
129
+ | `token --validate` | | Ping the GitHub API to verify the token and show rate-limit |
130
+ | `status` | `s` | Full health check: auth + MCP clients + cache |
131
+ | `status --sync` | | Also include per-MCP sync analysis |
132
+ | `sync` | `sy` | Sync MCP configs across all IDEs |
133
+ | `sync --dry-run` | | Show what `sync` would do without writing anything |
134
+ | `sync --status` | | Show sync analysis without syncing |
135
+ | `sync --force` | | Auto-resolve conflicts (use first variant found) |
136
+ | `skills` | `sk` | Install / remove / list / search / read / sync skills |
137
+ | `skills search --direct` | | Search skills.sh directly (human-readable) |
138
+ | `skills search --direct --install` | | Fetch and install top result automatically |
139
+ | `skills read <path\|github:owner/repo/name>` | | Preview a SKILL.md from disk or GitHub (`--full` for untruncated) |
140
+ | `skills install --targets <t1,t2>` | | Install all bundled skills to targets |
141
+ | `skills install --skill <name> --targets <t>` | | Install one specific skill |
142
+ | `skills install --local <path> --targets <t>` | | Install a local skill folder |
143
+ | `skills install --dry-run` | | Preview installs without writing |
144
+ | `skills install --mode <copy\|symlink>` | | Symlink instead of copy (default `copy`) |
145
+ | `skills remove --skill <name> --targets <t>` | | Remove a skill |
146
+ | `skills list` / `skills list --target <t>` | | List installed skills (optionally filter to one target) |
147
+ | `skills sync <from> <to>` | | Copy skills between targets |
148
+ | `mcp list` | | Scan all OS MCP config files |
149
+ | `mcp list --client <id>` | | Search registry for a specific client |
150
+ | `mcp list --installed` | | List only installed MCPs with env-var status |
151
+ | `mcp list --search <text>` / `--category <name>` | | Filter the list |
152
+ | `mcp status --client <id>` | | Show servers in one config + env var status |
153
+ | `mcp install --id <id> --client <id>` | | Install one MCP server |
154
+ | `mcp install --id a,b,c` | | Batch-install MCPs (parallel preflight) |
155
+ | `mcp install --id <id> --config <path>` | | Install into a custom config file |
156
+ | `mcp install --id <id> --env K=V,K2=V2` | | Set env vars for the installed server |
157
+ | `mcp install --id <id> --force` | | Overwrite an existing entry |
158
+ | `mcp remove --id <id> --client <id>` | | Remove an MCP server |
159
+ | `cache status` | | Inspect cache sizes (repos, skills, logs) |
160
+ | `cache clean --all` | | Clean repos + skills + logs |
161
+ | `cache clean --repos` / `--skills` / `--logs` | | Clean specific targets |
162
+ | `cache clean --tools` | | Clean all tool caches (local + lsp + api) |
163
+ | `cache clean --local` / `--lsp` / `--api` | | Clean individual tool caches |
164
+ | `cache clean --all --dry-run` | | Show what would be freed without deleting |
165
+ | `cache clean --all --yes` | | Skip the confirmation prompt |
166
+ | `tools [name...]` | | List tools, show schema(s), or run with `--queries '<json>'` |
167
+ | `instructions` | | Print MCP instructions + every tool schema |
168
+
169
+ Most subcommands accept `--hostname <host>` for GitHub Enterprise.
170
+
171
+ ---
172
+
173
+ ## Global Flags
174
+
175
+ | Flag | Description |
176
+ |------|-------------|
177
+ | `--json`, `-j` | Raw JSON output (machine-readable) |
178
+ | `--version`, `-v` | Print the CLI version |
179
+ | `--help`, `-h` | Show help for the CLI or a command |
180
+
181
+ ## Environment
182
+
183
+ | Variable | Purpose |
184
+ |----------|---------|
185
+ | `OCTOCODE_TOKEN` | GitHub token (checked first) |
186
+ | `GH_TOKEN` | GitHub token (checked second) |
187
+ | `GITHUB_TOKEN` | GitHub token (checked third) |
188
+ | `OCTOCODE_HOME` | Override the data directory (default `~/.octocode`) |
189
+
190
+ ## Exit Codes
191
+
192
+ | Code | Meaning |
193
+ |------|---------|
194
+ | `0` | Success |
195
+ | `1` | Error |
196
+
197
+ ---
198
+
199
+ ## Supported Clients
200
+
201
+ `cursor`, `claude` / `claude-desktop`, `claude-code`, `windsurf`, `zed`, `vscode-cline`, `vscode-roo`, `vscode-continue`, `opencode`, `trae`, `antigravity`, `codex`, `gemini-cli`, `goose`, `kiro`
202
+
203
+ ---
59
204
 
60
205
  ## Troubleshooting
61
206
 
62
207
  ```bash
63
- octocode-cli status # Check auth
64
- octocode-cli token --source # Debug token resolution
65
- octocode-cli sync --status # Check config consistency
208
+ octocode status --sync # Full health check including sync analysis
209
+ octocode token --validate # Verify your GitHub token against the API
210
+ octocode token --source # Debug token resolution chain
211
+ octocode install --ide cursor --check # Pre-flight before installing
212
+ octocode sync --dry-run # Preview sync changes before applying
213
+ octocode cache clean --all --dry-run # See what cache clean would free
66
214
  ```
67
215
 
216
+ ---
217
+
218
+ ## Docs
219
+
220
+ - [CLI Reference](https://github.com/bgauryy/octocode-mcp/blob/main/docs/dev/reference/CLI_REFERENCE.md): full command and flag reference
221
+ - [Skills Guide](https://github.com/bgauryy/octocode-mcp/blob/main/docs/dev/SKILLS_GUIDE.md): bundled skills installation
222
+ - [Configuration Reference](https://github.com/bgauryy/octocode-mcp/blob/main/docs/configuration/CONFIGURATION_REFERENCE.md)
223
+ - [Troubleshooting](https://github.com/bgauryy/octocode-mcp/blob/main/docs/configuration/TROUBLESHOOTING.md)
224
+
225
+ ---
226
+
68
227
  ## Privacy & Telemetry
69
228
 
70
229
  De-identified telemetry (command usage, error rates) helps improve the CLI. Source code, env values, and repo contents are not collected.
71
230
 
72
- [Privacy Policy](https://github.com/bgauryy/octocode-mcp/blob/main/PRIVACY.md) | [Terms of Usage](https://github.com/bgauryy/octocode-mcp/blob/main/TERMS.md)
231
+ [Privacy Policy](https://github.com/bgauryy/octocode-mcp/blob/main/PRIVACY.md) · [Terms of Usage](https://github.com/bgauryy/octocode-mcp/blob/main/TERMS.md)
73
232
 
74
233
  MIT. Copyright 2026 Octocode AI.