npx and Azure Artifacts: the secret CLI delivery mechanism
The npx
command is a powerful tool for running CLI tools shipped as npm packages, without having to install them globally. npx
is typically used to run packages on the public npm registry. However, if you have a private npm feed, you can also use npx
to run packages available on that feed.
Azure Artifacts is a feature of Azure DevOps that supports publishing npm packages to a feed for consumption. (You might want to read this guide on publishing npm packages to Azure Artifacts.) By combining npx
and Azure Artifacts, you can deliver your CLI tool to consumers in a way that's easy to use and secure.
This post shows how to use npx
and Azure Artifacts to deliver your private CLI tool to consumers.