Skip to main content

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.

Python 3.10+ License

azwork demo

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 .md file
  • 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

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

azwork-0.1.4.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azwork-0.1.4-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file azwork-0.1.4.tar.gz.

File metadata

  • Download URL: azwork-0.1.4.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for azwork-0.1.4.tar.gz
Algorithm Hash digest
SHA256 852c998038ae88a7bea9cd2166eb96de3e491260ee02771d3eec3300a8ec2b57
MD5 f310213add3cb57e7b1a29890eb6c690
BLAKE2b-256 3eb4431c8d033965e8572b7181c3f397ee28440fdc654c43237f630e075d9189

See more details on using hashes here.

Provenance

The following attestation bundles were made for azwork-0.1.4.tar.gz:

Publisher: publish.yml on andou/azwork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file azwork-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: azwork-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for azwork-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 688b4073ce993d5e2ccb95506634caa56a27ff314535b5bba872be1b387c9981
MD5 8b586353a4f6c90f0ec43e507e3d752c
BLAKE2b-256 71af3ac790f83d75d248c535c7c845fac7e0f982adfd4df771d32d488fb4ab90

See more details on using hashes here.

Provenance

The following attestation bundles were made for azwork-0.1.4-py3-none-any.whl:

Publisher: publish.yml on andou/azwork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page