A command-line interface to use Azure DevOps that mirrors the GitHub CLI (gh) experience.
# Install globally
npm install -g ado-cli
# Or use with npx (no installation required)
npx ado-cli --help# Clone the repository
git clone https://github.com/sivori/ado-cli.git
cd ado-cli
# Install dependencies and build
npm install
npm run build
# Link for global use
npm link- Node.js 17 or higher
- npm 7 or higher
-
Authenticate with Azure DevOps
ado auth login
The CLI will guide you through setting up your organization, project, and Personal Access Token.
-
List work items
ado workitem list
-
Create a work item
ado workitem create
-
Check your authentication status
ado auth status
The CLI uses Azure DevOps Personal Access Tokens (PAT) for authentication:
- Go to https://dev.azure.com
- Click User Settings > Personal Access Tokens
- Create a new token with Work Items: Read & Write permissions
- Run
ado auth loginand paste your token
ado auth login- Authenticate with Azure DevOpsado auth status- Check authentication statusado auth logout- Remove stored credentials
ado repo set-default <org/project>- Set default organization/projectado repo view- View current repository settings
ado workitem list- List work itemsado workitem create- Create a new work itemado workitem view <id>- View detailed work item informationado workitem edit <id>- Edit a work item (interactive or direct)ado workitem close <id>- Close a work itemado workitem reopen <id>- Reopen a work itemado workitem comment <id>- List or add comments on a work item
ado pr list --repository <repo>- List pull requestsado pr view <id> --repository <repo>- View a pull requestado pr create --repository <repo> --source <branch> --target <branch> --title "My PR"- Create a pull request
ado workitem list --assignee @me # Items assigned to you
ado workitem list --state Active # Active work items
ado workitem list --type Bug # Only bugs
ado workitem list --search "login" # Search titles/descriptions
ado workitem list --limit 10 # Limit resultsado workitem create --title "Fix bug" --type Bug --assignee @me
ado workitem create --title "New feature" --body "Description here"
ado workitem create --priority 1 --area "MyTeam\\Backend"# View detailed work item information in terminal
ado workitem view 123
# View and open in browser
ado workitem view 123 --web
# Interactive editing (guided menu)
ado workitem edit 123
# Direct field updates via flags
ado workitem edit 123 --assignee @me --priority 2
ado workitem edit 123 --title "New title" --state "In Progress"
ado workitem edit 123 --add-label "urgent,frontend" --area "MyTeam\\UI"-R, --repo <org/project>- Target specific organization/project--help- Show help information--version- Show version information
# List your assigned work items
ado workitem list --assignee @me
# Create a bug with high priority
ado workitem create --title "Critical login issue" --type Bug --priority 1 --assignee @me
# View a work item with rich terminal display
ado workitem view 123
# Quick edit: assign to yourself and set high priority
ado workitem edit 123 --assignee @me --priority 1 --add-label "urgent"
# Interactive editing with guided prompts
ado workitem edit 123
# Close a work item with a comment
ado workitem close 123 --comment "Fixed in latest deployment"
# List and add comments on a work item
ado workitem comment 123
ado workitem comment 123 --body "Looks good"
# Work with a different project temporarily
ado workitem list -R myorg/otherproject --state Active
# List pull requests in a repository
ado pr list --repository MyRepo
# View a pull request
ado pr view 42 --repository MyRepo
# Create a pull request
ado pr create --repository MyRepo --source feature --target main --title "Add feature"# Install dependencies
npm install
# Run in development mode
npm run dev
# Build the project
npm run build
# Run tests
npm test
# Lint code
npm run lintsrc/
├── api/ # Azure DevOps API client
├── auth/ # Authentication management
├── commands/ # CLI command implementations
├── config/ # Configuration and storage
├── types/ # TypeScript type definitions
└── index.ts # Main CLI entry point
We welcome contributions! Please see our Contributing Guide for details on:
- How to report issues
- How to suggest features
- How to submit pull requests
- Development setup and guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
See project-plan.md for detailed feature tracking and implementation status.
- Inspired by the GitHub CLI (
gh) for its excellent user experience - Built with Commander.js for CLI framework
- Uses Keytar for secure credential storage
Note: This tool is not officially affiliated with Microsoft or Azure DevOps.