diff --git a/CHANGELOG.md b/CHANGELOG.md index 06a341e8..3f9ae011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 7ced1019..5167618a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/src/content/docs/getting-started/installation.md b/docs/src/content/docs/getting-started/installation.md index 92451cb6..6d68ecfb 100644 --- a/docs/src/content/docs/getting-started/installation.md +++ b/docs/src/content/docs/getting-started/installation.md @@ -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`. diff --git a/docs/src/content/docs/getting-started/quick-start.md b/docs/src/content/docs/getting-started/quick-start.md index 80da34f6..1fa009f6 100644 --- a/docs/src/content/docs/getting-started/quick-start.md +++ b/docs/src/content/docs/getting-started/quick-start.md @@ -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: diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index f7abe885..fe30e34e 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -44,12 +44,12 @@ APM fixes this. You declare your project's agent configuration once in `apm.yml` ```bash - curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh + curl -sSL https://aka.ms/apm-unix | sh ``` ```powershell - irm https://raw.githubusercontent.com/microsoft/apm/main/install.ps1 | iex + irm https://aka.ms/apm-windows | iex ``` diff --git a/docs/src/content/docs/integrations/ci-cd.md b/docs/src/content/docs/integrations/ci-cd.md index e5da790b..886668e7 100644 --- a/docs/src/content/docs/integrations/ci-cd.md +++ b/docs/src/content/docs/integrations/ci-cd.md @@ -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 diff --git a/docs/src/content/docs/integrations/runtime-compatibility.md b/docs/src/content/docs/integrations/runtime-compatibility.md index 2352175f..fd3d0550 100644 --- a/docs/src/content/docs/integrations/runtime-compatibility.md +++ b/docs/src/content/docs/integrations/runtime-compatibility.md @@ -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 diff --git a/docs/src/content/docs/reference/cli-commands.md b/docs/src/content/docs/reference/cli-commands.md index f5a0a66c..1ad67622 100644 --- a/docs/src/content/docs/reference/cli-commands.md +++ b/docs/src/content/docs/reference/cli-commands.md @@ -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 diff --git a/install.sh b/install.sh index 94823c8c..fdf165ba 100755 --- a/install.sh +++ b/install.sh @@ -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 | \ diff --git a/src/apm_cli/commands/update.py b/src/apm_cli/commands/update.py index 9cd29052..7bfcf632 100644 --- a/src/apm_cli/commands/update.py +++ b/src/apm_cli/commands/update.py @@ -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: @@ -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]: diff --git a/tests/unit/test_update_command.py b/tests/unit/test_update_command.py index 5a204524..ac951120 100644 --- a/tests/unit/test_update_command.py +++ b/tests/unit/test_update_command.py @@ -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") @@ -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"]) @@ -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")