tfx-cli: Azure DevOps CLI
raw JSON → 0.23.1 verified Sat Apr 25 auth: no javascript
CLI for managing Azure DevOps Services (formerly VSTS) and Team Foundation Server extensions, builds, and releases. Current stable version 0.23.1 (2025). Infrequent releases, focused on security updates and Azure DevOps API changes. Unlike azure-devops-cli (az devops), this is a standalone Node.js CLI with no Azure CLI dependency, geared towards extension developers who need to publish, install, and manage marketplace extensions without installing the full Azure CLI.
Common errors
error TypeError: Cannot read property 'success' of undefined ↓
cause Error-handling code missing in tfx login in versions 0.7.10 and earlier.
fix
Upgrade to tfx-cli@0.7.11 or later.
error Error: Manifest validation: 'public' is not allowed ↓
cause Manifest contains a property 'public' which is invalid in later versions.
fix
Remove 'public' from vss-extension.json; use 'public' flag in tfx extension publish command instead.
error Error: Failed to read extension manifest: ENOENT: no such file or directory ↓
cause Missing manifest file specified with --manifest.
fix
Ensure the path to vss-extension.json is correct, or check current working directory.
Warnings
breaking From 0.9.0, publisher creation is removed. API backing removed by Azure DevOps. ↓
fix Use Azure DevOps web UI to create publisher, then use tfx to manage extensions.
gotcha Engine requirement: Node >= 20.0.0. Older Node versions cause runtime errors. ↓
fix Update Node to 20 or later.
deprecated Using --manifest with extension install is deprecated. Use --publisher-id and --extension-id. ↓
fix Replace --manifest with --publisher-id and --extension-id.
gotcha Login token must be a PAT, not a personal access token with wrong scope. Ensure scope includes 'Marketplace (Publish)'. ↓
fix Create a PAT with at least 'Marketplace (Publish)' scope.
gotcha tfx login no longer uses --url or --pat; use --service-url and --token. ↓
fix See correct login command in imports.
Install
npm install tfx-cli yarn add tfx-cli pnpm add tfx-cli Imports
- CLI command wrong
tfx extension install --ids my-extensioncorrectnpx tfx-cli extension install --extension-id my-extension --publisher publisher-name --vsix ./my-extension.vsix - login wrong
tfx login --url https://dev.azure.com/{organization} --pat $(System.AccessToken)correcttfx login --service-url https://dev.azure.com/{organization} --token $(System.AccessToken) - extension install wrong
tfx extension install --manifest vss-extension.jsoncorrecttfx extension install --publisher-id publisher-name --extension-id extension-id --vsix ./extension.vsix --service-url https://dev.azure.com/{organization}
Quickstart
npm install -g tfx-cli
# Login to Azure DevOps
tfx login --service-url https://dev.azure.com/myorg --token $(echo $AZURE_DEVOPS_PAT)
# Publish an extension from a manifest
tfx extension create --manifest vss-extension.json --rev-version
tfx extension publish --publisher my-publisher --vsix my-extension-1.0.0.vsix --service-url https://dev.azure.com/myorg
# Install an extension
tfx extension install --publisher-id my-publisher --extension-id my-extension --vsix my-extension-1.0.0.vsix --service-url https://dev.azure.com/myorg