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
# Custom prompt template for Claude Code prompt export.
# Use {work_item} as a placeholder for the work item Markdown.
# If omitted, a default template is used.
prompt_template: |
# Fix this
{work_item}
## Rules
- Do not break existing tests
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
prompt_template: |
# Resolve this work item
{work_item}
## Instructions
- Follow the coding style in CLAUDE.md
- Write tests for any changes
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
Metadata
Release files for azwork 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| azwork-0.1.4.tar.gz | 28.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azwork-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.2 kB
Release files / azwork-0.1.4.tar.gz
| Download URL | azwork-0.1.4.tar.gz |
|---|---|
| Size | 28.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
852c998038ae88a7bea9cd2166eb96de3e491260ee02771d3eec3300a8ec2b57
|
|
BLAKE2b-256 checksum How to use checksums |
3eb4431c8d033965e8572b7181c3f397ee28440fdc654c43237f630e075d9189
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logRelease files / azwork-0.1.4-py3-none-any.whl
| Download URL | azwork-0.1.4-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
688b4073ce993d5e2ccb95506634caa56a27ff314535b5bba872be1b387c9981
|
|
BLAKE2b-256 checksum How to use checksums |
71af3ac790f83d75d248c535c7c845fac7e0f982adfd4df771d32d488fb4ab90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency log