Is your feature request related to a problem? Please describe.
Yes. APM has a strong enterprise story after the CLI is already installed: package dependency downloads can be routed through a registry proxy, direct fallback can be disabled, and internal marketplaces can be used for discovery.
The remaining gap is the bootstrap path for installing and updating the APM CLI itself.
In locked-down enterprise environments, developer workstations and CI runners often cannot reach public hosts directly. A company may require all third-party downloads to pass through approved Artifactory-compatible proxies for caching, audit, malware scanning, retention, and repeatable builds.
Today the documented install paths are split across public upstreams:
- shell installer via
aka.ms
- GitHub release metadata and release assets
- Homebrew tap and formula resolution
- Scoop bucket resolution
- PyPI package installation for
apm-cli
That makes initial rollout hard even when apm install itself can later use enterprise proxy settings. The first command a developer runs may still need public egress, or each organization has to create its own wrapper documentation and environment-specific workaround.
The problem is not that APM lacks package proxying. The problem is that APM does not appear to have one documented, testable, end-to-end enterprise bootstrap contract that says:
install and update the APM CLI, and then install packages, without any direct public-network dependency.
Describe the solution you'd like
Add a first-class enterprise bootstrap mirror mode for the APM CLI.
The desired outcome is a documented and tested path where an enterprise can install and update APM with every network request routed through approved mirrors/proxies.
Suggested shape:
-
Define a small set of installer/update override variables.
Example:
APM_RELEASE_BASE_URL
APM_RELEASE_METADATA_URL
APM_INSTALLER_BASE_URL
APM_PYPI_INDEX_URL
APM_BOOTSTRAP_ONLY=1 or APM_NO_DIRECT_FALLBACK=1
Exact names are flexible. The important contract is that the installer and apm self-update can be pointed at internal mirrors and can be told to fail closed instead of falling back to public hosts.
-
Make the Unix and Windows installers honor the mirror settings.
In enterprise mode, the installer should be able to fetch release metadata and release assets from an Artifactory-compatible generic repository or mirror endpoint instead of directly from public release hosts.
If APM_NO_DIRECT_FALLBACK=1 is set, the installer should fail with an actionable error rather than attempting a public fallback.
-
Make apm self-update use the same mirror contract.
A user should not need a separate mechanism for day-0 install and later upgrades. If the CLI was installed through a mirror, updates should be able to use the same mirror and the same fail-closed behavior.
-
Document the recommended enterprise paths.
The docs should include copy/pasteable examples for:
- binary installer through an internal generic mirror
pipx install apm-cli through an internal PyPI proxy
- Homebrew tap/formula mirroring guidance
- Scoop bucket mirroring guidance
- combining CLI bootstrap mirroring with
PROXY_REGISTRY_URL, PROXY_REGISTRY_ONLY, and internal marketplaces for package installs
-
Add a verification command or documented test.
It would be helpful to have either a command or a documented CI recipe that proves an environment is configured correctly.
Example intent:
- install APM from the internal mirror
- run
apm self-update --dry-run or equivalent
- run
apm install with PROXY_REGISTRY_ONLY=1
- fail if any request would go to public hosts such as GitHub,
aka.ms, PyPI, Homebrew, or Scoop upstreams
-
Keep this generic.
This should not be specific to any one company or one Artifactory path layout. A fictional example host like https://artifactory.mycorp.example/... is enough. The feature should work with Artifactory-compatible repositories, internal static mirrors, or other enterprise artifact gateways.
A possible end-state developer experience:
export APM_RELEASE_BASE_URL="https://artifactory.mycorp.example/generic/apm-releases"
export APM_RELEASE_METADATA_URL="https://artifactory.mycorp.example/generic/apm-releases/latest.json"
export APM_NO_DIRECT_FALLBACK=1
curl -sSL "https://artifactory.mycorp.example/generic/apm-install/install.sh" | sh
export PROXY_REGISTRY_URL="https://artifactory.mycorp.example/github-proxy"
export PROXY_REGISTRY_ONLY=1
apm install
For Python-based installs:
pipx install apm-cli \
--pip-args="--index-url https://artifactory.mycorp.example/api/pypi/python-proxy/simple"
This gives enterprises a single rollout story:
- bootstrap the CLI through approved infrastructure
- update the CLI through approved infrastructure
- install APM packages through approved infrastructure
- fail closed when the proxy/mirror is incomplete
Describe alternatives you've considered
-
Use pipx install apm-cli with a corporate PyPI proxy.
This works well for environments that permit Python tooling, and it should remain documented. It does not cover teams that prefer the native binary installer, Homebrew, Scoop, or a standardized CLI bootstrap flow.
-
Use the existing PROXY_REGISTRY_URL settings.
This solves package dependency downloads after APM is installed. It does not fully solve initial CLI installation or CLI self-update.
-
Mirror the GitHub release assets manually and write an internal wrapper script.
This is possible, but every enterprise has to rediscover the same URL override rules, failure modes, and validation checks. It also creates drift from the official install path.
-
Use Homebrew or Scoop with internal mirror configuration.
This may work in some environments, but it depends on package-manager-specific behavior and does not provide one APM-owned contract for fail-closed bootstrap and update behavior.
-
Allow direct public fallback.
That is convenient for open networks but not acceptable in stricter enterprise environments. The feature should support explicit fail-closed behavior so configuration gaps are visible.
Additional context
This request is meant to complement the existing enterprise registry proxy model, not replace it.
The current enterprise story is strong once APM is installed: dependency fetches can be routed through a proxy, direct fallback can be blocked, and internal marketplaces can be used. The missing piece is making the CLI bootstrap/update path equally governable.
A minimal acceptable version could be mostly documentation plus installer/self-update URL overrides:
- document pipx through a PyPI proxy
- document binary install through a mirrored release base URL
- document Homebrew/Scoop mirror expectations
- make direct fallback explicitly disableable
- add tests or a smoke-test recipe that proves no public egress is required
A more complete version could add a single command such as:
apm doctor enterprise-bootstrap
or:
apm doctor network --no-public-egress
that validates the configured bootstrap, update, registry proxy, and marketplace settings.
This would make APM easier to approve in companies where all third-party tooling must come through internal artifact infrastructure before it can be used by developers or CI.
Is your feature request related to a problem? Please describe.
Yes. APM has a strong enterprise story after the CLI is already installed: package dependency downloads can be routed through a registry proxy, direct fallback can be disabled, and internal marketplaces can be used for discovery.
The remaining gap is the bootstrap path for installing and updating the APM CLI itself.
In locked-down enterprise environments, developer workstations and CI runners often cannot reach public hosts directly. A company may require all third-party downloads to pass through approved Artifactory-compatible proxies for caching, audit, malware scanning, retention, and repeatable builds.
Today the documented install paths are split across public upstreams:
aka.msapm-cliThat makes initial rollout hard even when
apm installitself can later use enterprise proxy settings. The first command a developer runs may still need public egress, or each organization has to create its own wrapper documentation and environment-specific workaround.The problem is not that APM lacks package proxying. The problem is that APM does not appear to have one documented, testable, end-to-end enterprise bootstrap contract that says:
Describe the solution you'd like
Add a first-class enterprise bootstrap mirror mode for the APM CLI.
The desired outcome is a documented and tested path where an enterprise can install and update APM with every network request routed through approved mirrors/proxies.
Suggested shape:
Define a small set of installer/update override variables.
Example:
APM_RELEASE_BASE_URLAPM_RELEASE_METADATA_URLAPM_INSTALLER_BASE_URLAPM_PYPI_INDEX_URLAPM_BOOTSTRAP_ONLY=1orAPM_NO_DIRECT_FALLBACK=1Exact names are flexible. The important contract is that the installer and
apm self-updatecan be pointed at internal mirrors and can be told to fail closed instead of falling back to public hosts.Make the Unix and Windows installers honor the mirror settings.
In enterprise mode, the installer should be able to fetch release metadata and release assets from an Artifactory-compatible generic repository or mirror endpoint instead of directly from public release hosts.
If
APM_NO_DIRECT_FALLBACK=1is set, the installer should fail with an actionable error rather than attempting a public fallback.Make
apm self-updateuse the same mirror contract.A user should not need a separate mechanism for day-0 install and later upgrades. If the CLI was installed through a mirror, updates should be able to use the same mirror and the same fail-closed behavior.
Document the recommended enterprise paths.
The docs should include copy/pasteable examples for:
pipx install apm-clithrough an internal PyPI proxyPROXY_REGISTRY_URL,PROXY_REGISTRY_ONLY, and internal marketplaces for package installsAdd a verification command or documented test.
It would be helpful to have either a command or a documented CI recipe that proves an environment is configured correctly.
Example intent:
apm self-update --dry-runor equivalentapm installwithPROXY_REGISTRY_ONLY=1aka.ms, PyPI, Homebrew, or Scoop upstreamsKeep this generic.
This should not be specific to any one company or one Artifactory path layout. A fictional example host like
https://artifactory.mycorp.example/...is enough. The feature should work with Artifactory-compatible repositories, internal static mirrors, or other enterprise artifact gateways.A possible end-state developer experience:
For Python-based installs:
pipx install apm-cli \ --pip-args="--index-url https://artifactory.mycorp.example/api/pypi/python-proxy/simple"This gives enterprises a single rollout story:
Describe alternatives you've considered
Use
pipx install apm-cliwith a corporate PyPI proxy.This works well for environments that permit Python tooling, and it should remain documented. It does not cover teams that prefer the native binary installer, Homebrew, Scoop, or a standardized CLI bootstrap flow.
Use the existing
PROXY_REGISTRY_URLsettings.This solves package dependency downloads after APM is installed. It does not fully solve initial CLI installation or CLI self-update.
Mirror the GitHub release assets manually and write an internal wrapper script.
This is possible, but every enterprise has to rediscover the same URL override rules, failure modes, and validation checks. It also creates drift from the official install path.
Use Homebrew or Scoop with internal mirror configuration.
This may work in some environments, but it depends on package-manager-specific behavior and does not provide one APM-owned contract for fail-closed bootstrap and update behavior.
Allow direct public fallback.
That is convenient for open networks but not acceptable in stricter enterprise environments. The feature should support explicit fail-closed behavior so configuration gaps are visible.
Additional context
This request is meant to complement the existing enterprise registry proxy model, not replace it.
The current enterprise story is strong once APM is installed: dependency fetches can be routed through a proxy, direct fallback can be blocked, and internal marketplaces can be used. The missing piece is making the CLI bootstrap/update path equally governable.
A minimal acceptable version could be mostly documentation plus installer/self-update URL overrides:
A more complete version could add a single command such as:
or:
that validates the configured bootstrap, update, registry proxy, and marketplace settings.
This would make APM easier to approve in companies where all third-party tooling must come through internal artifact infrastructure before it can be used by developers or CI.