Repository navigation
Description
Problem
Several apm install behaviours are controlled by environment variables (e.g. APM_ALLOW_PROTOCOL_FALLBACK=1) or CLI flags (--ssh, --allow-protocol-fallback). These cannot be persisted via apm config — today the only valid config keys are auto-integrate, temp-dir, and copilot-cowork-skills-dir.
This creates friction for users who rely on SSH-based authentication to GitHub rather than PAT tokens. Every apm install invocation requires either:
- Passing
--allow-protocol-fallbackor--sshon every command, or - Setting
APM_ALLOW_PROTOCOL_FALLBACK=1in a shell profile (.zshrc,.bashrc, etc.)
Neither option is ideal:
- Windows users (PowerShell, cmd) have a very different mechanism for persisting environment variables, making cross-platform instructions inconsistent.
- Users who prefer not to modify rc files have no persistent configuration path at all.
- Teams sharing APM setups cannot standardise transport preferences without documenting shell-specific workarounds per OS.
Example scenario
A contributor authenticates to GitHub via SSH keys (no PAT configured). When they run:
apm install my-package@my-marketplaceThe install fails because the default HTTPS clone cannot authenticate. The workaround is:
APM_ALLOW_PROTOCOL_FALLBACK=1 apm install my-package@my-marketplace
# or
apm install --allow-protocol-fallback my-package@my-marketplaceThis must be repeated for every install, update, or marketplace operation. There is no way to persist this preference.
Proposed solution
Extend apm config set to accept keys that mirror existing environment variables and CLI flags. For example:
# Persist protocol fallback preference
apm config set allow-protocol-fallback true
# Persist SSH transport preference
apm config set ssh trueOnce set, these would be read automatically by all apm commands — no environment variable or CLI flag needed.
Suggested scope
At minimum, the following should be configurable via apm config:
| Config key | Env var | CLI flag |
|---|---|---|
allow-protocol-fallback |
APM_ALLOW_PROTOCOL_FALLBACK |
--allow-protocol-fallback |
ssh |
(none) | --ssh |
More broadly, any behaviour currently controlled by an environment variable should have a corresponding apm config key, so the configuration surface is unified and discoverable.
Additional context
- Current valid config keys:
auto-integrate,temp-dir,copilot-cowork-skills-dir - Precedence suggestion: CLI flag > env var >
apm config> default
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
sergio-sisternes-epam commentedon May 10, 2026
This review could be extended to all environment variables APM currently supports — not just
APM_ALLOW_PROTOCOL_FALLBACK. Auditing the full set of env vars and ensuring each one has a correspondingapm configkey would create a consistent, smooth experience across:apm config— for persistent, cross-platform user/project preferencesThis way, every user gets the same capability regardless of platform (macOS, Linux, Windows) or preferred configuration style, and the configuration surface becomes fully discoverable via
apm config --help.github-actions commentedon May 10, 2026
Triage decision
accept
Proposed labels
Milestone
null (open milestones could not be verified -- maintainer should assign to next minor, likely v0.13.0)
Suggested next action
Implement
apm config set allow-protocol-fallbackandapm config set sshwith user-scoped persistence, wiring the precedence chain (CLI > env > config > default) into the install and marketplace commands, and update the config reference docs.Suggested issue comment
Per-lens notes (collapsed)
DevX UX Expert -- User-Need Reviewer
The request addresses a real and well-understood user-surface gap: package manager users expect a persistent config layer (
npm config set,pip config set) and APM's current 3-key surface leaves transport preferences stranded in either one-off CLI flags or shell profile environment variables. The latter is especially painful on Windows where env var persistence differs across PowerShell and cmd. The proposed CLI > env > config > default precedence chain matches the industry convention exactly. The two proposed keys map 1:1 to existing CLI flags, minimising the cognitive surface. The author's broader suggestion (audit all env vars) is a well-motivated extension that would makeapm config --helpauthoritative -- recommended as a follow-up issue rather than scope-creep here.Supply Chain Security Expert -- Risk-Surface Reviewer
This issue touches transport-layer auth selection, which is a security-adjacent surface. The
allow-protocol-fallbackkey is the more sensitive of the two: if it were persisted at project scope (inapm.yml), it could silently enable HTTPS fallback for all contributors of a repo, potentially downgrading transport security without per-user awareness. The recommended mitigation is to restrictallow-protocol-fallbackto user-scoped config only. Thesshkey carries lower risk since SSH is typically more secure. Notheme/securitylabel is required -- the feature itself does not weaken any existing integrity guarantee -- but the design must document config scope boundaries. Primary theme istheme/portability(cross-platform config surface).OSS Growth Hacker -- Contributor-Tone Reviewer
Not activated -- author is a COLLABORATOR with established engagement history; first-time contributor tone-tuning is not applicable.
Python Architect -- Architecture Reviewer
Feasibility is high: the existing
apm configmachinery demonstrates the pattern. The key cross-cutting consideration is that every command using--sshor--allow-protocol-fallback(install, update, and marketplace operations) must fall through to the config reader when the flag is absent. This is a moderate, well-scoped change -- not a rearchitecture. The minimal 2-key scope in the issue is implementable without a design doc. The broader env-var audit suggested in the follow-up comment should be a separate issue to keep scope reviewable. One design call that must be documented in the PR: whetherallow-protocol-fallbackis user-scoped only (recommended) or also project-scopeable.Doc Writer -- Documentation Reviewer
Docs work is clearly implied. The implementing PR should update: (1) the
apm configreference page to listallow-protocol-fallbackandsshas valid keys with defaults and the precedence chain explanation; (2) the install or auth guide with a section on persisting transport preferences. Thearea/docs-sitelabel rides as a secondary area so the implementing PR is reminded. The suggested comment wording is precise and preserves the author's key/env-var/flag table pattern, which is good documentation hygiene.APM CEO -- Triage Arbiter
Decision: accept. This is a clear portability gap aligned with APM's cross-platform mission. The 2-key minimal scope is well-specified with a concrete precedence model, no design blocker, and an obvious implementation path. The Supply Chain Security note on
allow-protocol-fallbackbeing user-scoped only is a practical constraint, not a blocker. Priority/low reflects that workarounds exist (env vars, repeated flags) and no security path is blocked. Milestone null because open milestones could not be verified in this run; maintainer should assign to the next minor release.{ "decision": "accept", "decision_detail": "", "theme": "theme/portability", "areas": ["area/cli", "area/distribution", "area/docs-site"], "type": "type/feature", "status": "status/accepted", "priority": "priority/low", "preserved_labels": [], "milestone": null, "next_action": "Implement apm config set allow-protocol-fallback and apm config set ssh with user-scoped persistence, wiring the precedence chain into install and marketplace commands, and update the config reference docs.", "comment_markdown": "Thanks for this well-structured proposal -- the friction you describe is real and the cross-platform angle (Windows vs. shell profiles) makes it a genuine portability gap." }feat: persist transport flags via apm config
feat: persist transport flags via apm config
feat: persist transport flags via apm config
feat: persist transport flags via apm config (#1308)
chore: cut 0.15.0 (#1493)