TUI tool for triaging Azure DevOps work items
Project description
azwork
A terminal UI for triaging Azure DevOps work items. Browse, inspect, and export work items as Markdown — optimized for use as context in Claude Code sessions.
Features
- Interactive TUI — browse work items in a filterable, sortable table
- Detail view — inspect description, repro steps, comments, relations, and custom fields
- Markdown export — export any work item to a clean
.mdfile - Claude Code prompt export — generate a ready-to-use prompt wrapping the work item
- Clipboard support — copy Markdown to clipboard with a single keystroke
- Smart caching — fetched work items are cached in memory to keep navigation fast
- HTML → Markdown — Azure DevOps HTML content is automatically converted
Installation
pip install azwork
Or install from source:
git clone https://github.com/andou/azwork.git
cd azwork
pip install .
For development:
pip install -e ".[dev]"
Quick start
1. Create a Personal Access Token
Go to https://dev.azure.com/{your-org}/_usersSettings/tokens and create a token with the Work Items → Read scope.
Export it as an environment variable:
export AZURE_DEVOPS_PAT="your-token-here"
2. Run the setup wizard
azwork --setup
This creates ~/.azwork.yml interactively.
3. Launch
azwork
Usage
# Use defaults from ~/.azwork.yml
azwork
# Override org and project
azwork --org myorg --project myproject
# Custom export directory
azwork --output-dir ./sprint-bugs
# Re-run setup
azwork --setup
Configuration
azwork reads its configuration from ~/.azwork.yml. CLI arguments always take priority.
~/.azwork.yml anatomy
# Azure DevOps organization name (the {org} part of dev.azure.com/{org})
org: myorg
# Project name within the organization
project: myproject
# Default directory where exported Markdown files are saved.
# Can be an absolute path or relative to where you run azwork.
# Created automatically on first export if it doesn't exist.
default_output_dir: ./bugs
# Work item types to include in queries.
# These are used both as WIQL filter and as options in the Type dropdown.
# Common values: Bug, Task, User Story, Epic, Feature, Issue, Test Case
work_item_types:
- Bug
- Task
- User Story
All fields are optional when using CLI overrides. The PAT is never stored in the config file — it is always read from the AZURE_DEVOPS_PAT environment variable.
Minimal example
org: contoso
project: webapp
Full example
org: contoso
project: webapp
default_output_dir: ~/work/bugs
work_item_types:
- Bug
- Task
- User Story
- Feature
- Epic
Keybindings
List screen
| Key | Action |
|---|---|
↑ ↓ |
Navigate rows |
Enter |
Open detail view |
E |
Export highlighted item to Markdown |
R |
Refresh (re-fetch from API) |
Q |
Quit |
? |
Show help |
Column headers are clickable to sort by that column.
Detail screen
| Key | Action |
|---|---|
Esc |
Back to list |
E |
Export as Markdown |
P |
Export as Claude Code prompt |
C |
Copy Markdown to clipboard |
O |
Open in browser |
? |
Show help |
Export formats
Markdown
A structured Markdown file with metadata table, description, repro steps, acceptance criteria, discussion thread, related items, and custom fields.
bugs/1234-login-fails-special-chars.md
Claude Code prompt
Same Markdown content wrapped in a prompt template that instructs Claude Code to analyze and resolve the work item:
# Task: Resolve the following work item
Analyze the work item described below and take the necessary actions to resolve it.
The project context is described in the CLAUDE.md file at the repository root.
## Work Item
[... full work item markdown ...]
## Instructions
1. Analyze the work item and identify the affected files
2. Implement the fix or the requested feature
3. Write or update tests to cover the case
4. Verify that existing tests are not broken
5. Briefly describe the changes you made
Project structure
azwork/
├── __main__.py # CLI entry point (argparse)
├── config.py # YAML config loading + CLI merge
├── utils.py # HTML→Markdown conversion
├── api/
│ ├── client.py # Azure DevOps REST client (auth, batching, cache)
│ ├── wiql.py # WIQL query builder
│ └── models.py # WorkItem, Comment, Relation dataclasses
├── tui/
│ ├── app.py # Textual App
│ ├── screens/
│ │ ├── list_screen.py # Work item list with filters
│ │ └── detail_screen.py # Single item detail + export dialog
│ └── widgets/
│ ├── filter_bar.py # Type / State / Iteration / Search filters
│ └── item_table.py # Sortable DataTable for work items
└── export/
├── markdown.py # Markdown generation
└── prompt.py # Claude Code prompt wrapper
Running tests
pytest
Tests mock all API calls and cover:
- API client (pagination, HTTP errors, caching, response parsing)
- WIQL query construction with various filter combinations
- Markdown export (formatting, edge cases, empty fields)
- HTML → Markdown conversion (all supported tags)
Requirements
- Python 3.10+
- An Azure DevOps organization with work items
- A PAT with Work Items → Read scope
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azwork-0.1.1.tar.gz.
File metadata
- Download URL: azwork-0.1.1.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d5f57e7eb2b107573ad4902fbd686b46abf44a0e661b053daa11a3b1ac25cc2
|
|
| MD5 |
cacb8369f0608c7065b5dec79f59c714
|
|
| BLAKE2b-256 |
7964be4bd0541d319c84464005b352e3103b29fb6102b4e11670e4f762e5b79e
|
File details
Details for the file azwork-0.1.1-py3-none-any.whl.
File metadata
- Download URL: azwork-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e4dde6913dbebd6d8e80b7b98703c3cce3556e3a67793788445dc4d049a8b65
|
|
| MD5 |
1104000b531e9792c712342c81c33047
|
|
| BLAKE2b-256 |
3ae176e28d965c106341030ddc87df001c1e7a4c8ff55a93294f5a113225f10b
|