Azure DevOps extension that provides a pipeline task to download and install the Rearm CLI.
Listing on Azure DevOps Marketplace is here.
- Downloads the Rearm CLI from CloudFront CDN
- Supports both Windows and Linux agents
- Automatically detects the agent OS and downloads the appropriate binary
- Sets the
RearmClivariable for use in subsequent pipeline steps - Adds Rearm CLI to PATH
- Node.js 16+
- npm
- tfx-cli for packaging
# Install root dependencies
npm install
# Build the task
npm run build
# Package the extension
npm run packageThis will create a .vsix file that can be uploaded to the Visual Studio Marketplace.
steps:
- task: RearmCliInstall@1
inputs:
rearmCliVersion: '26.04.3'
- script: |
$(RearmCli) --version
displayName: 'Run Rearm CLI'| Input | Required | Default | Description |
|---|---|---|---|
rearmCliVersion |
Yes | 26.04.3 |
Version of the Rearm CLI to install |
| Variable | Description |
|---|---|
RearmCli |
Full path to the Rearm CLI executable (also available as output variable for cross-job use) |
# Login to your publisher
tfx extension publish --manifest-globs vss-extension.json --token <your-pat>├── vss-extension.json # Extension manifest
├── package.json # Root package.json
├── images/
│ └── icon.png # Extension icon (128x128)
└── tasks/
└── RearmCliInstall/
├── task.json # Task manifest
├── index.ts # Task implementation
├── package.json # Task dependencies
└── tsconfig.json # TypeScript config
You can test the task locally using the tfx CLI:
tfx build tasks upload --task-path tasks/RearmCliInstallThis requires a Personal Access Token (PAT) with the correct scopes. When you run tfx for the first time (or without a cached token) it will prompt you interactively, but you can also pass it explicitly via --token.
- Go to your Azure DevOps organization:
https://dev.azure.com/<your-org> - Click your profile avatar (top-right, "User Settings") → Personal access tokens
- Click New Token
- Set the following:
- Name: anything descriptive (e.g.
tfx-local-dev) - Organization: your target org
- Expiration: as needed
- Scopes: select Custom defined, then enable:
- Agent Pools → Read & manage
- Build → Read & execute
- Extensions → Read & manage (required for publishing/uploading)
- Name: anything descriptive (e.g.
- Click Create and copy the token — it is only shown once
Option 1 — pass inline (one-off):
tfx build tasks upload --task-path tasks/RearmCliInstall \
--service-url https://dev.azure.com/<your-org> \
--token <your-pat>Option 2 — login once and cache credentials:
tfx login --service-url https://dev.azure.com/<your-org> --token <your-pat>
# subsequent tfx commands in the same directory will reuse the cached token
tfx build tasks upload --task-path tasks/RearmCliInstallOption 3 — environment variable (useful in CI or shell profiles):
export TFX_TOKEN=<your-pat>
export TFX_SERVICE_URL=https://dev.azure.com/<your-org>
tfx build tasks upload --task-path tasks/RearmCliInstallThe same token and setup applies to tfx extension publish used in the Publishing to Marketplace section.