Registry / devops / azdo-cli

azdo-cli

JSON →
library0.8.1jsnpmunverified

The `azdo-cli` package provides a command-line interface for interacting with Azure DevOps services. It allows users to manage various Azure DevOps resources, such as work items, pull requests, and comments, directly from their terminal. The current stable version, as indicated by the latest release, is v0.9.0. The project exhibits an active development cadence, with frequent minor feature releases and dependency updates, suggesting ongoing maintenance and expansion of its capabilities. It serves as a lightweight alternative for automating Azure DevOps tasks and integrating them into scripts, potentially offering a more streamlined experience for specific use cases compared to the broader `az devops` extension for the Azure CLI, focusing on developer-centric operations.

npm install azdo-cli
INSTALL
IMPORT
SIG · AZDO-CLI
A
azdo-cli
devopsjavascriptv0.8.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart demonstrates how to install `azdo-cli`, configure it with your Azure DevOps organization and a Personal Access Token (PAT), and then provides examples for listing work items, creating a new bug, and adding a comment to a pull request using the command-line interface.

# Install globally (recommended for CLI tools) npm install -g azdo-cli # Alternatively, use npx for single execution without global install # npx azdo-cli --version # Configure authentication using a Personal Access Token (PAT) # Set your Azure DevOps organization and project # Replace 'your-organization' and 'your-project' with actual values # The PAT can be set as an environment variable (AZDO_PAT) for security export AZDO_PAT="YOUR_AZURE_DEVOPS_PAT" azdo-cli config set organization "your-organization" azdo-cli config set project "your-project" # Example: List all work items in the configured project azdo-cli work-item list # Example: Create a new bug work item azdo-cli work-item create --type "Bug" --title "Broken user profile image upload" --description "Users are reporting issues when trying to upload new profile pictures after the last deployment." --assigned-to "developer@example.com" # Example: Add a comment to an existing pull request (replace 123 and repo-name) azdo-cli pr comment add --id 123 --repository "your-repo-name" --comment "Initial review complete. Looks good, minor stylistic changes suggested."
azdo --version
Debug
Known issues
breakingThe `better-secret` feature introduced in v0.4.0 might have changed how secrets are managed or stored. Users upgrading from versions prior to v0.4.0 may need to re-configure their Personal Access Tokens (PATs) or other sensitive credentials.
fix
After upgrading to v0.4.0 or newer, explicitly re-run `azdo-cli config set` for any sensitive configurations like `AZDO_PAT` or ensure they are correctly set via environment variables.
affects: <0.4.0
gotchaPersonal Access Tokens (PATs) used for authentication must have the correct scopes enabled in Azure DevOps (e.g., 'Work Items (Read & Write)', 'Code (Read & Write)') for `azdo-cli` commands to function properly. Insufficient scopes will lead to authorization errors.
fix
Verify and update the scopes of your Personal Access Token in Azure DevOps under 'User settings' -> 'Personal access tokens' to match the permissions required by the commands you intend to use.
affects: >=0.1.0
gotchaMany commands require explicit `--organization` and `--project` flags if they are not set globally via `azdo-cli config set` or through environment variables. Failure to specify these can result in 'resource not found' or 'command scope' errors.
fix
Ensure that `azdo-cli config set organization "your-org"` and `azdo-cli config set project "your-project"` have been executed, or include `--organization "your-org" --project "your-project"` with relevant commands.
affects: >=0.1.0
gotchaSensitive data like Personal Access Tokens (PATs) should ideally be managed via environment variables (e.g., `AZDO_PAT`) rather than storing them directly in shell history or less secure configuration files, especially in shared environments.
fix
Set `export AZDO_PAT="YOUR_PAT_HERE"` in your shell profile or use a secret management system, then `azdo-cli` will automatically pick it up without needing `config set` for the PAT.
affects: >=0.1.0
Errors
Common errors & fixes
azdo-cli: command not found
The `azdo-cli` package is not installed globally or is not in your system's PATH.
fix
Run `npm install -g azdo-cli` to install it globally, or use `npx azdo-cli [command]` to execute it without a global installation.
Error: Failed to authenticate. Please check your PAT or organization/project settings.
The provided Personal Access Token (PAT) is invalid, expired, has incorrect scopes, or the Azure DevOps organization/project is misspelled or inaccessible.
fix
Verify your `AZDO_PAT` environment variable or the PAT configured via `azdo-cli config set`, ensure it's not expired and has the necessary scopes. Double-check the spelling of your organization and project names.
Error: Missing required argument: --title
A command like `work-item create` requires specific arguments that were not provided.
fix
Consult the command's help (`azdo-cli work-item create --help`) and provide all mandatory arguments, such as `--title` for creating a work item.
Error: Resource '123' not found in repository 'my-repo'.
The specified resource (e.g., work item ID, pull request ID, repository name) does not exist or is inaccessible within the configured project/organization.
fix
Verify the ID and name of the resource you are trying to access. Ensure you are operating within the correct Azure DevOps organization and project context.
Upgrade
Version history
0.8.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
30
OpenAI (training)
1
Resources