Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- `apm install` now automatically discovers and deploys local `.apm/` primitives (skills, instructions, agents, prompts, hooks, commands) to target directories, with local content taking priority over dependencies on collision (#626, #644)
- `install.sh` supports `APM_INSTALL_DIR`, `GITHUB_URL`, `APM_REPO`, and `VERSION` env vars for air-gapped, GHE, and custom install-path scenarios; `VERSION` (or `@vX.Y.Z` arg) skips the GitHub API entirely (#660)
- Add `temp-dir` configuration key (`apm config set temp-dir PATH`) to override the system temporary directory, resolving `[WinError 5] Access is denied` in corporate Windows environments (#629)

### Fixed
Expand Down
32 changes: 28 additions & 4 deletions docs/src/content/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ irm https://aka.ms/apm-windows | iex

The installer automatically detects your platform (macOS/Linux/Windows, Intel/ARM), downloads the latest binary, and adds `apm` to your `PATH`.

### Installer options

The Unix installer supports environment variables for custom environments:

```bash
# Install a specific version
curl -sSL https://aka.ms/apm-unix | sh -s -- @v1.2.3

# Custom install directory
curl -sSL https://aka.ms/apm-unix | APM_INSTALL_DIR=$HOME/.local/bin sh

# Air-gapped / GitHub Enterprise mirror
GITHUB_URL=https://github.corp.com VERSION=v1.2.3 sh install.sh
```

| Variable | Default | Description |
|----------|---------|-------------|
| `APM_INSTALL_DIR` | `/usr/local/bin` | Directory for the `apm` symlink |
| `APM_LIB_DIR` | `$(dirname APM_INSTALL_DIR)/lib/apm` | Directory for the full binary bundle |
| `GITHUB_URL` | `https://github.com` | Base URL for downloads (mirrors, GHE) |
| `APM_REPO` | `microsoft/apm` | GitHub repository |
| `VERSION` | *(latest)* | Pin a specific release (skips GitHub API) |

> **Note:** When using `GITHUB_URL` for a GitHub Enterprise or air-gapped mirror, set `VERSION` as well. The GitHub API call for latest-release discovery still targets `api.github.com`; `VERSION` bypasses it entirely.

## Package managers

**Homebrew (macOS/Linux):**
Expand Down Expand Up @@ -124,7 +149,7 @@ apm --version

### `apm: command not found` (macOS / Linux)

Ensure `/usr/local/bin` is in your `PATH`:
Ensure your install directory is in your `PATH`. The default is `/usr/local/bin`:

```bash
echo $PATH | tr ':' '\n' | grep /usr/local/bin
Expand All @@ -138,11 +163,10 @@ export PATH="/usr/local/bin:$PATH"

### Permission denied during install (macOS / Linux)

Use `sudo` for system-wide installation, or install to a user-writable directory instead:
Use `sudo` for system-wide installation, or install to a user-writable directory:

```bash
mkdir -p ~/bin
# then install the binary to ~/bin/apm and add ~/bin to PATH
curl -sSL https://aka.ms/apm-unix | APM_INSTALL_DIR=$HOME/.local/bin sh
```

### Authentication errors when installing packages
Expand Down
Loading
Loading