Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Install URLs now use short `aka.ms/apm-unix` and `aka.ms/apm-windows` redirects across README, docs, CLI output, and install script

### Fixed

- CLI docs now document the `apm compile --target opencode` option, align `apm audit --dry-run` wording with actual behavior, and mark planned `apm audit --drift` examples as not yet available (#366)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ apm install # every agent is configured
#### Linux / macOS

```bash
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
```

#### Windows

```powershell
irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex
irm https://aka.ms/apm-windows | iex
```

Native release binaries are published for macOS, Linux, and Windows x86_64. `apm update` reuses the matching platform installer.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ sidebar:
**macOS / Linux:**

```bash
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
```

**Windows (PowerShell):**

```powershell
irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex
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`.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Three commands. Three minutes. Your AI agent learns your project's standards aut
**macOS / Linux:**

```bash
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
```

**Windows (PowerShell):**

```powershell
irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex
irm https://aka.ms/apm-windows | iex
```

Verify it worked:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ APM fixes this. You declare your project's agent configuration once in `apm.yml`
<Tabs>
<TabItem label="macOS / Linux">
```bash
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
```
</TabItem>
<TabItem label="Windows">
```powershell
irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex
irm https://aka.ms/apm-windows | iex
```
</TabItem>
</Tabs>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/integrations/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This catches cases where a developer updates `apm.yml` but forgets to re-run `ap
```yaml
steps:
- script: |
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
apm install
# Optional: only if targeting Codex, Gemini, or similar tools
# apm compile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ APM acts as a runtime package manager, downloading and configuring LLM runtimes
### Install APM and Setup Runtime
```bash
# 1. Install APM
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh

# 2. Setup AI runtime (downloads and configures automatically)
apm runtime setup copilot
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/reference/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,12 @@ If the automatic update fails, you can always update manually:

#### Linux / macOS
```bash
curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
curl -sSL https://aka.ms/apm-unix | sh
```

#### Windows
```powershell
powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex"
powershell -ExecutionPolicy Bypass -c "irm https://aka.ms/apm-windows | iex"
```

### `apm deps` - Manage APM package dependencies
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# APM CLI Installer Script
# Usage: curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
# Usage: curl -sSL https://aka.ms/apm-unix | sh
# For private repositories, use with authentication:
# curl -sSL -H "Authorization: token $GITHUB_APM_PAT" \
# https://raw.githubusercontent.com/microsoft/apm/main/install.sh | \
Expand Down
7 changes: 3 additions & 4 deletions src/apm_cli/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def _is_windows_platform() -> bool:

def _get_update_installer_url() -> str:
"""Return the official installer URL for the current platform."""
installer_name = "install.ps1" if _is_windows_platform() else "install.sh"
return f"https://raw.githubusercontent.com/microsoft/apm/main/{installer_name}"
return "https://aka.ms/apm-windows" if _is_windows_platform() else "https://aka.ms/apm-unix"


def _get_update_installer_suffix() -> str:
Expand All @@ -31,9 +30,9 @@ def _get_manual_update_command() -> str:
if _is_windows_platform():
return (
'powershell -ExecutionPolicy Bypass -c '
'"irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex"'
'"irm https://aka.ms/apm-windows | iex"'
)
return "curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh"
return "curl -sSL https://aka.ms/apm-unix | sh"


def _get_installer_run_command(script_path: str) -> list[str]:
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_update_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def setUp(self):
self.runner = CliRunner()

def test_manual_update_command_uses_windows_installer(self):
"""Windows manual update instructions should point to install.ps1."""
"""Windows manual update instructions should point to aka.ms/apm-windows."""
with patch.object(update_module.sys, "platform", "win32"):
command = update_module._get_manual_update_command()

self.assertIn("install.ps1", command)
self.assertIn("aka.ms/apm-windows", command)
self.assertIn("powershell", command.lower())

@patch("requests.get")
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_update_uses_powershell_installer_on_windows(
self.assertEqual(result.exit_code, 0)
self.assertIn("Successfully updated to version 0.7.0", result.output)
mock_get.assert_called_once()
self.assertTrue(mock_get.call_args.args[0].endswith("install.ps1"))
self.assertTrue(mock_get.call_args.args[0].endswith("apm-windows"))
mock_run.assert_called_once()
run_command = mock_run.call_args.args[0]
self.assertEqual(run_command[:3], ["powershell.exe", "-ExecutionPolicy", "Bypass"])
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_update_uses_shell_installer_on_unix(
self.assertEqual(result.exit_code, 0)
self.assertIn("Successfully updated to version 0.7.0", result.output)
mock_get.assert_called_once()
self.assertTrue(mock_get.call_args.args[0].endswith("install.sh"))
self.assertTrue(mock_get.call_args.args[0].endswith("apm-unix"))
mock_run.assert_called_once()
run_command = mock_run.call_args.args[0]
self.assertEqual(run_command[0], "/bin/sh")
Expand Down
Loading