context-mode icon indicating copy to clipboard operation
context-mode copied to clipboard

ctx_upgrade requires npm, breaking for npx/bunx users

Open ofrik opened this issue 6 months ago • 1 comments

The ctx_upgrade tool calls npm install -g context-mode to upgrade the package. This fails silently or errors for users who installed via npx, bunx, or a standalone binary download — they don't have a global npm environment to upgrade into.

Suggested fix: Detect the installation method and upgrade accordingly:

  • If installed globally via npm: npm install -g context-mode
  • If installed via bunx: bun add -g context-mode
  • If installed as a standalone binary: download the latest release binary directly from the release URL and atomically replace the current executable

The third option (direct binary download + atomic rename) works for all installation methods and removes the npm/bun dependency entirely from the upgrade path.

Affected users: Anyone who installs via npx context-mode or bunx context-mode — which is the recommended quick-start method in the README.

ofrik avatar May 23 '26 00:05 ofrik

Hey saw context-mode #623, where v1.0.137 shipped with the ctx_* tools silently missing and OpenCode users found it before you did. That one stuck with me because it's un-catchable by normal tests: nothing failed, tools just weren't there.

We built an open-source tool that gates exactly this: reelier (github.com/seldonframe/reelier) snapshots your MCP tool manifest and diffs it in CI/release, so a build whose tool surface shrank fails closed before publish instead of after users hit it. Disclosure: I maintain it but it's free and OSS, and I'm happy to send a PR adding the release gate so #623 structurally can't recur. If it's not useful, no worries at all.

fixlyai avatar Jul 23 '26 20:07 fixlyai