apm config
Read and write APM CLI configuration stored in ~/.apm/config.json.
Synopsis
Section titled “Synopsis”apm config # show current configurationapm config get [KEY] # print one key, or all keysapm config set KEY VALUE # write a keyapm config unset KEY # remove a keyDescription
Section titled “Description”apm config manages the user-level CLI configuration file at ~/.apm/config.json. It is independent of apm.yml, which describes a project. With no subcommand, apm config prints a table that combines:
- Project values from
apm.ymlin the current directory (when present): name, version, entrypoint, MCP dependency count, and compilation settings. - Global values from
~/.apm/config.json: CLI version,temp-dir, and any other set keys.
Use get/set/unset to manipulate individual keys. Boolean values accept true, false, yes, no, 1, or 0.
Subcommands
Section titled “Subcommands”apm config
Section titled “apm config”Show the merged project + global configuration as a table. Falls back to plain text if rich is unavailable.
apm config get [KEY]
Section titled “apm config get [KEY]”Print the value of KEY. With no argument, prints all user-settable keys with their effective values (defaults included).
apm config set KEY VALUE
Section titled “apm config set KEY VALUE”Write KEY to ~/.apm/config.json. Validates the value before writing:
temp-dirmust be an existing, writable directory. The path is expanded (~) and stored absolute.copilot-cowork-skills-dirmust be absolute after expansion; the directory itself does not need to exist.- Boolean keys reject anything outside the accepted truthy/falsy strings.
apm config unset KEY
Section titled “apm config unset KEY”Remove KEY from ~/.apm/config.json. No-op if the key is not set. Supported unset keys: temp-dir, copilot-cowork-skills-dir, prefer-ssh, allow-protocol-fallback, and registry.<name>.{url,token,default}. After unsetting a key the effective value falls back to the environment variable, then the built-in default. Other boolean keys are reset by set-ing them to their default.
Configuration keys
Section titled “Configuration keys”| Key | Type | Default | Description |
|---|---|---|---|
auto-integrate | boolean | true | Auto-discover .prompt.md files under .github/prompts/ and .apm/prompts/ and merge them into compiled AGENTS.md output. |
temp-dir | path | system temp | Directory used for clone and download operations. Useful when the OS temp directory is locked down (for example, corporate Windows endpoints rejecting %TEMP% with [WinError 5]). |
allow-protocol-fallback | boolean | false | Enable the legacy cross-protocol fallback chain. When true, APM retries a failed clone with the opposite protocol (SSH→HTTPS or HTTPS→SSH). Equivalent to --allow-protocol-fallback or APM_ALLOW_PROTOCOL_FALLBACK=1. |
prefer-ssh | boolean | false | Prefer SSH transport for shorthand (owner/repo) dependencies. Equivalent to --ssh or APM_GIT_PROTOCOL=ssh. |
copilot-cowork-skills-dir | absolute path | auto-detected | Override the resolved Cowork OneDrive skills directory. Requires the copilot-cowork experimental flag for set. |
registry.<name>.url | URL | — | Base URL for registry <name>. Requires registries experimental flag. |
registry.<name>.token | string | — | Bearer token for registry <name>. Stored in ~/.apm/config.json; never in repo-tracked files. Requires registries experimental flag. |
registry.<name>.default | boolean | false | Mark <name> as the user-scoped default registry. Only one registry may be default at a time; setting true clears any previous default. Requires registries experimental flag. |
Resolution order
Section titled “Resolution order”temp-dir and copilot-cowork-skills-dir are resolved at runtime as:
- Environment variable (
APM_TEMP_DIR,APM_COPILOT_COWORK_SKILLS_DIR) - Value in
~/.apm/config.json - Built-in default (system temp / platform auto-detection)
allow-protocol-fallback and prefer-ssh follow the layered transport precedence:
- CLI flag (
--allow-protocol-fallback,--ssh) — highest priority - Environment variable (
APM_ALLOW_PROTOCOL_FALLBACK=1,APM_GIT_PROTOCOL=ssh) - Value in
~/.apm/config.json(apm config set ...) - Built-in default (
false/ no preference)
Registry tokens are resolved as:
APM_REGISTRY_TOKEN_<NAME>environment variable (uppercase name,-/.->_)registry.<name>.tokenin~/.apm/config.json- Unauthenticated (APM surfaces a remediation hint on 401/403)
Registry URLs are merged at install time (highest wins):
apm-policy.yml- Project
apm.ymlregistries:block - Workspace
~/.apm/apm.yml registry.<name>.urlin~/.apm/config.json
Default registry selection (highest wins):
registries.defaultin projectapm.yml- The registry entry in
~/.apm/config.jsonwith"default": true(set viaregistry.<name>.default true)
Examples
Section titled “Examples”Show everything:
apm configRead and write auto-integrate:
apm config get auto-integrateapm config set auto-integrate falsePersist SSH transport preference (no more --ssh on every install):
apm config set prefer-ssh trueapm config get prefer-ssh# Remove the persisted preference:apm config unset prefer-sshPersist cross-protocol fallback (useful when migrating from SSH to HTTPS or vice versa):
apm config set allow-protocol-fallback trueapm config get allow-protocol-fallbackPin a writable temp directory on Windows:
apm config set temp-dir C:\apm-tempapm config get temp-dirUse the env var instead of persisting a value:
export APM_TEMP_DIR=/var/tmp/apm-workapm installOverride the Cowork skills directory (experimental):
apm experimental enable copilot-coworkapm config set copilot-cowork-skills-dir ~/Library/CloudStorage/OneDrive-Contoso/Cowork/skillsapm config unset copilot-cowork-skills-dirConfigure a private registry (experimental):
apm experimental enable registriesapm config set registry.corp-main.url https://artifactory.corp.example.com/artifactory/api/apm/corp-main-localapm config set registry.corp-main.token eyJ...apm config set registry.corp-main.default trueapm config get registry.corp-main.urlapm config get registry.corp-main.defaultapm config unset registry.corp-main.tokenWith URL, token, and default set in config.json, a project can omit the top-level registries: block from apm.yml and still route shorthand deps through corp-main. See Registries.
Configuration file
Section titled “Configuration file”- Location:
~/.apm/config.json - Format: JSON object, one entry per stored key.
- Created on first read with
{"default_client": "vscode"}. Hand-editing is supported butapm config setis preferred — it validates input and normalizes paths.
Internal JSON keys use snake_case (auto_integrate, temp_dir, allow_protocol_fallback, prefer_ssh, copilot_cowork_skills_dir); CLI keys use kebab-case. The CLI translates between the two.
Related
Section titled “Related”apm install— consumestemp-dirfor clone/download work andallow-protocol-fallback/prefer-sshfor transport selection.apm compile— affected byauto-integrate.apm experimental— gatescopilot-cowork-skills-dirandregistry.*keys.- Environment variables —
APM_ALLOW_PROTOCOL_FALLBACK,APM_GIT_PROTOCOLare the env-var equivalents of the transport keys. - Registries — full private registry setup guide.