[FEATURE]: Respect NPM_CONFIG_REGISTRY when installing the CLI · Issue #57797 · anomalyco/opencode · GitHub
Skip to content

[FEATURE]: Respect NPM_CONFIG_REGISTRY when installing the CLI #57797

Open

Description

@LLukas22

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Installing the CLI always downloads from a hard-coded https://registry.npmjs.org/:

install: line 195, 199, 212
packages/gui-extensions/src/ssh/remote-cli.ts: line 79 (archiveUrl), 129 and 133 (latestBeta)

Behind a corporate firewall that only allows an internal mirror (Nexus, Artifactory, ...), Desktop can't install its CLI on SSH hosts: both the remote download and the upload fallback fail, so after every Desktop update the host shows as incompatible. The mirror serves the same tarball at the same path.

Proposal: use NPM_CONFIG_REGISTRY / npm_config_registry (trailing slash removed) as the base URL, falling back to https://registry.npmjs.org/:

  • install: registry="${NPM_CONFIG_REGISTRY:-${npm_config_registry:-https://registry.npmjs.org}}"; registry="${registry%/}", then use $registry in place of the hard-coded URL.
  • Desktop SSH bootstrap: build the download URL inside the remote script from the remote host's environment, the same way install does, since the remote host can reach a different registry than the Desktop machine. For the upload fallback and latestBeta, use the Desktop machine's registry via NpmConfig.registry(), which plugin installs already use.

Activity

  1. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up, @LLukas22!

    To restate: you'd like the install script and the Desktop SSH CLI bootstrap to honour NPM_CONFIG_REGISTRY / npm_config_registry, falling back to https://registry.npmjs.org. That way the CLI can be installed through an internal mirror (Nexus, Artifactory, …) behind a corporate firewall. In the bootstrap, the download URL would be built from the remote host's environment. The upload fallback and latestBeta would use the Desktop machine's registry via NpmConfig.registry().

    The hard-coded URLs are where you point: install lines 195, 199 and 212, and lines 79 and 129–133 of packages/gui-extensions/src/ssh/remote-cli.ts. This can't be done as a plugin, because the change is in the installer and the Desktop SSH bootstrap.

    Maintainers will consider this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions