feat(install): add --local flag to install from local build - #81
Merged
ArtyETH06 merged 9 commits intoMay 30, 2026
Conversation
…f npx For development testing: install the current checkout into Claude Desktop / Claude Code without publishing to npm. # auto-resolves to packages/mcp/dist/bin.js node packages/mcp/dist/bin.js install --oauth --local # or pin an explicit path node packages/mcp/dist/bin.js install --oauth --local=/abs/path/to/dist/bin.js The flag threads through installInClaudeCode (writes `node <path>` into claude mcp add) and installInJsonConfig (writes command:node into Claude Desktop / Cursor claude_desktop_config.json). Codex config unchanged for now.
1. Bare flag parsing: replace parseFlag("local") with hasFlag + explicit
--local= check so `--local` (no value) works and `--local --target x`
doesn't misread --target as the bin path.
2. Absolute paths: resolve explicit --local=some/rel/path against cwd
before storing in client configs; clients launch from their own
working directory, so relative paths break on next launch.
3. Codex support: thread localBinPath through installInCodexConfig and
buildCodexConfigBlock so Codex gets `node <path>` instead of npx
when --local is active.
…l resolver; resolve explicit paths to absolute
…-local works out of the box
…BuiltDependencies to auto-approve postinstall devDependencies are stripped from the published npm package — published npx installs would miss Electron entirely, hitting the browser-fallback path instead of the GUI wizard. Fix: restore electron to optionalDependencies (included in the tarball) and add pnpm.onlyBuiltDependencies so its postinstall script runs automatically on local dev without requiring pnpm approve-builds.
pnpm ignores this field in workspace package package.json files — it only takes effect at the workspace root. Moving it there ensures electron and esbuild postinstall scripts run automatically on pnpm install in a fresh checkout, without requiring pnpm approve-builds.
ArtyETH06
merged commit May 30, 2026
fc899b0
into
ArtyETH06/https-github.com-leadbay-product-issues-3651
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--localflag to both the CLI installer and the Electron GUI wizard so developers can test local changes without publishing to npm.Usage
What it does
Without
--local, the wizard writes this into every client config:{ "command": "npx", "args": ["-y", "@leadbay/mcp@latest"] }With
--local, it writes:{ "command": "node", "args": ["/absolute/path/to/packages/mcp/dist/bin.js"] }After each
pnpm --filter @leadbay/mcp build, the next MCP session picks up changes automatically — no reinstall needed.Changes
install-claude-code.ts—buildClaudeCodeAddArgsaccepts optionallocalBinPathinstall-json-config.ts—installInJsonConfigaccepts optionallocalBinPathinstaller-gui.ts— reads--localfromprocess.argvat startup, threads throughinstallIntobin.ts— parses--local[=PATH]inrunInstall, resolves absolute path, threads throughBase branch
Targets PR #69 (
feat(mcp): add hosted HTTP server and installer wizard).🤖 Generated with Claude Code