azwi 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azwi-0.9.1/LICENSE +21 -0
- azwi-0.9.1/PKG-INFO +186 -0
- azwi-0.9.1/README.md +167 -0
- azwi-0.9.1/pyproject.toml +32 -0
- azwi-0.9.1/setup.cfg +4 -0
- azwi-0.9.1/src/azwi/__init__.py +3 -0
- azwi-0.9.1/src/azwi/__main__.py +5 -0
- azwi-0.9.1/src/azwi/cli.py +397 -0
- azwi-0.9.1/src/azwi/client.py +151 -0
- azwi-0.9.1/src/azwi/config.py +293 -0
- azwi-0.9.1/src/azwi/errors.py +29 -0
- azwi-0.9.1/src/azwi/models.py +50 -0
- azwi-0.9.1/src/azwi/render.py +509 -0
- azwi-0.9.1/src/azwi.egg-info/PKG-INFO +186 -0
- azwi-0.9.1/src/azwi.egg-info/SOURCES.txt +19 -0
- azwi-0.9.1/src/azwi.egg-info/dependency_links.txt +1 -0
- azwi-0.9.1/src/azwi.egg-info/entry_points.txt +2 -0
- azwi-0.9.1/src/azwi.egg-info/top_level.txt +1 -0
- azwi-0.9.1/tests/test_cli.py +249 -0
- azwi-0.9.1/tests/test_config.py +83 -0
- azwi-0.9.1/tests/test_render.py +166 -0
azwi-0.9.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 John Paul Ellis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
azwi-0.9.1/PKG-INFO
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: azwi
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: Azure DevOps work item fetcher for agentic coding tools
|
|
5
|
+
Author: John Paul Ellis
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Topic :: Software Development :: Version Control
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# azwi
|
|
21
|
+
|
|
22
|
+
`azwi` fetches Azure DevOps work item context for agentic coding tools such as Codex CLI and Claude Code.
|
|
23
|
+
|
|
24
|
+
The tool is designed for deterministic, machine-friendly Markdown or JSON output with clean stdout on success and stderr-only logging.
|
|
25
|
+
|
|
26
|
+
## Install and run
|
|
27
|
+
|
|
28
|
+
Local checkout:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
uv run ./azwi.py --help
|
|
32
|
+
uv run ./azwi.py 2195 --org my-org
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Packaged command:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
uvx azwi --help
|
|
39
|
+
azwi 2195 --org my-org
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Authentication
|
|
43
|
+
|
|
44
|
+
`azwi` reads an Azure DevOps PAT from:
|
|
45
|
+
|
|
46
|
+
- `AZWI_PAT`
|
|
47
|
+
|
|
48
|
+
Required PAT scopes:
|
|
49
|
+
|
|
50
|
+
- Work Items: Read
|
|
51
|
+
- Code: Read
|
|
52
|
+
|
|
53
|
+
The PAT is not stored in `~/.azwi/config.toml`.
|
|
54
|
+
|
|
55
|
+
## Primary usage
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
azwi <work_item_id> [--org ORG] [--section SECTION ...] [--format {markdown,json}]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
azwi 2195
|
|
65
|
+
azwi 2195 --section acceptance
|
|
66
|
+
azwi 2195 --section metadata --section comments --comment-limit 20
|
|
67
|
+
azwi 2195 --format markdown
|
|
68
|
+
azwi 2195 --output wi-2195.md
|
|
69
|
+
azwi 2195 --output wi-2195.md --download-images assets
|
|
70
|
+
azwi 2195 --field-acceptance Custom.Acceptance
|
|
71
|
+
azwi 2195 --extra-field Custom.DevNotes
|
|
72
|
+
azwi fields --type Bug --project Payments
|
|
73
|
+
azwi config show
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Commands
|
|
77
|
+
|
|
78
|
+
Fetch a work item:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
azwi <work_item_id> [options]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
List fields for a work item type:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
azwi fields --type Bug [--project PROJECT] [--org ORG]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Manage config:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
azwi config show
|
|
94
|
+
azwi config set-defaults --org my-org --project Payments
|
|
95
|
+
azwi config set-field --global --acceptance Microsoft.VSTS.Common.AcceptanceCriteria
|
|
96
|
+
azwi config set-field --project Payments --description Custom.DevDescription
|
|
97
|
+
azwi config add-extra-field --project Payments Custom.ReleaseNotes
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Output
|
|
101
|
+
|
|
102
|
+
Default sections:
|
|
103
|
+
|
|
104
|
+
- metadata
|
|
105
|
+
- description
|
|
106
|
+
- acceptance
|
|
107
|
+
- comments
|
|
108
|
+
- prs
|
|
109
|
+
|
|
110
|
+
Formats:
|
|
111
|
+
|
|
112
|
+
- `json`
|
|
113
|
+
- `markdown`
|
|
114
|
+
|
|
115
|
+
Default format:
|
|
116
|
+
|
|
117
|
+
- `json`
|
|
118
|
+
|
|
119
|
+
JSON includes stable top-level `work_item` metadata plus a `sections` object containing rendered Markdown text and source field reference names for text fields. Markdown remains available as an explicit render mode for prompt-friendly output.
|
|
120
|
+
|
|
121
|
+
## Configuration
|
|
122
|
+
|
|
123
|
+
`azwi` uses `~/.azwi/config.toml` for non-secret defaults and field mappings.
|
|
124
|
+
|
|
125
|
+
Supported config layers:
|
|
126
|
+
|
|
127
|
+
- top-level defaults
|
|
128
|
+
- top-level project overrides
|
|
129
|
+
- org-specific defaults
|
|
130
|
+
- org-specific project overrides
|
|
131
|
+
- per-invocation CLI overrides
|
|
132
|
+
|
|
133
|
+
Example:
|
|
134
|
+
|
|
135
|
+
```toml
|
|
136
|
+
[defaults]
|
|
137
|
+
org = "my-org"
|
|
138
|
+
project = "ProjectA"
|
|
139
|
+
|
|
140
|
+
[defaults.fields]
|
|
141
|
+
description = "System.Description"
|
|
142
|
+
acceptance = "Microsoft.VSTS.Common.AcceptanceCriteria"
|
|
143
|
+
repro_steps = "Microsoft.VSTS.TCM.ReproSteps"
|
|
144
|
+
system_info = "Microsoft.VSTS.TCM.SystemInfo"
|
|
145
|
+
|
|
146
|
+
[projects."ProjectB".fields]
|
|
147
|
+
acceptance = "Custom.AcceptanceNotes"
|
|
148
|
+
extra_fields = ["Custom.ReleaseNotes"]
|
|
149
|
+
|
|
150
|
+
[orgs."other-org".defaults]
|
|
151
|
+
project = "ProjectX"
|
|
152
|
+
|
|
153
|
+
[orgs."other-org".defaults.fields]
|
|
154
|
+
acceptance = "Custom.Acceptance"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`azwi config show` renders the effective resolved config. PATs are never written to the config file.
|
|
158
|
+
|
|
159
|
+
## Image download behavior
|
|
160
|
+
|
|
161
|
+
Use `--download-images DIR` together with `--output` to download remote Markdown image URLs and rewrite them to local relative paths.
|
|
162
|
+
|
|
163
|
+
Relative `DIR` paths resolve from the current working directory, not from the output file location.
|
|
164
|
+
|
|
165
|
+
## Packaging and publishing
|
|
166
|
+
|
|
167
|
+
This repo supports both:
|
|
168
|
+
|
|
169
|
+
- `uv run ./azwi.py ...` via the PEP 723 metadata block in the root wrapper
|
|
170
|
+
- `uvx azwi ...` via the package defined in `pyproject.toml`
|
|
171
|
+
|
|
172
|
+
Build:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
uv build --no-sources
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Release workflow:
|
|
179
|
+
|
|
180
|
+
- tag a release such as `v0.9.1`
|
|
181
|
+
- GitHub Actions builds the package
|
|
182
|
+
- publish to PyPI using Trusted Publishing
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
MIT
|
azwi-0.9.1/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# azwi
|
|
2
|
+
|
|
3
|
+
`azwi` fetches Azure DevOps work item context for agentic coding tools such as Codex CLI and Claude Code.
|
|
4
|
+
|
|
5
|
+
The tool is designed for deterministic, machine-friendly Markdown or JSON output with clean stdout on success and stderr-only logging.
|
|
6
|
+
|
|
7
|
+
## Install and run
|
|
8
|
+
|
|
9
|
+
Local checkout:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
uv run ./azwi.py --help
|
|
13
|
+
uv run ./azwi.py 2195 --org my-org
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Packaged command:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
uvx azwi --help
|
|
20
|
+
azwi 2195 --org my-org
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Authentication
|
|
24
|
+
|
|
25
|
+
`azwi` reads an Azure DevOps PAT from:
|
|
26
|
+
|
|
27
|
+
- `AZWI_PAT`
|
|
28
|
+
|
|
29
|
+
Required PAT scopes:
|
|
30
|
+
|
|
31
|
+
- Work Items: Read
|
|
32
|
+
- Code: Read
|
|
33
|
+
|
|
34
|
+
The PAT is not stored in `~/.azwi/config.toml`.
|
|
35
|
+
|
|
36
|
+
## Primary usage
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
azwi <work_item_id> [--org ORG] [--section SECTION ...] [--format {markdown,json}]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
azwi 2195
|
|
46
|
+
azwi 2195 --section acceptance
|
|
47
|
+
azwi 2195 --section metadata --section comments --comment-limit 20
|
|
48
|
+
azwi 2195 --format markdown
|
|
49
|
+
azwi 2195 --output wi-2195.md
|
|
50
|
+
azwi 2195 --output wi-2195.md --download-images assets
|
|
51
|
+
azwi 2195 --field-acceptance Custom.Acceptance
|
|
52
|
+
azwi 2195 --extra-field Custom.DevNotes
|
|
53
|
+
azwi fields --type Bug --project Payments
|
|
54
|
+
azwi config show
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Commands
|
|
58
|
+
|
|
59
|
+
Fetch a work item:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
azwi <work_item_id> [options]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
List fields for a work item type:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
azwi fields --type Bug [--project PROJECT] [--org ORG]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Manage config:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
azwi config show
|
|
75
|
+
azwi config set-defaults --org my-org --project Payments
|
|
76
|
+
azwi config set-field --global --acceptance Microsoft.VSTS.Common.AcceptanceCriteria
|
|
77
|
+
azwi config set-field --project Payments --description Custom.DevDescription
|
|
78
|
+
azwi config add-extra-field --project Payments Custom.ReleaseNotes
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Output
|
|
82
|
+
|
|
83
|
+
Default sections:
|
|
84
|
+
|
|
85
|
+
- metadata
|
|
86
|
+
- description
|
|
87
|
+
- acceptance
|
|
88
|
+
- comments
|
|
89
|
+
- prs
|
|
90
|
+
|
|
91
|
+
Formats:
|
|
92
|
+
|
|
93
|
+
- `json`
|
|
94
|
+
- `markdown`
|
|
95
|
+
|
|
96
|
+
Default format:
|
|
97
|
+
|
|
98
|
+
- `json`
|
|
99
|
+
|
|
100
|
+
JSON includes stable top-level `work_item` metadata plus a `sections` object containing rendered Markdown text and source field reference names for text fields. Markdown remains available as an explicit render mode for prompt-friendly output.
|
|
101
|
+
|
|
102
|
+
## Configuration
|
|
103
|
+
|
|
104
|
+
`azwi` uses `~/.azwi/config.toml` for non-secret defaults and field mappings.
|
|
105
|
+
|
|
106
|
+
Supported config layers:
|
|
107
|
+
|
|
108
|
+
- top-level defaults
|
|
109
|
+
- top-level project overrides
|
|
110
|
+
- org-specific defaults
|
|
111
|
+
- org-specific project overrides
|
|
112
|
+
- per-invocation CLI overrides
|
|
113
|
+
|
|
114
|
+
Example:
|
|
115
|
+
|
|
116
|
+
```toml
|
|
117
|
+
[defaults]
|
|
118
|
+
org = "my-org"
|
|
119
|
+
project = "ProjectA"
|
|
120
|
+
|
|
121
|
+
[defaults.fields]
|
|
122
|
+
description = "System.Description"
|
|
123
|
+
acceptance = "Microsoft.VSTS.Common.AcceptanceCriteria"
|
|
124
|
+
repro_steps = "Microsoft.VSTS.TCM.ReproSteps"
|
|
125
|
+
system_info = "Microsoft.VSTS.TCM.SystemInfo"
|
|
126
|
+
|
|
127
|
+
[projects."ProjectB".fields]
|
|
128
|
+
acceptance = "Custom.AcceptanceNotes"
|
|
129
|
+
extra_fields = ["Custom.ReleaseNotes"]
|
|
130
|
+
|
|
131
|
+
[orgs."other-org".defaults]
|
|
132
|
+
project = "ProjectX"
|
|
133
|
+
|
|
134
|
+
[orgs."other-org".defaults.fields]
|
|
135
|
+
acceptance = "Custom.Acceptance"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`azwi config show` renders the effective resolved config. PATs are never written to the config file.
|
|
139
|
+
|
|
140
|
+
## Image download behavior
|
|
141
|
+
|
|
142
|
+
Use `--download-images DIR` together with `--output` to download remote Markdown image URLs and rewrite them to local relative paths.
|
|
143
|
+
|
|
144
|
+
Relative `DIR` paths resolve from the current working directory, not from the output file location.
|
|
145
|
+
|
|
146
|
+
## Packaging and publishing
|
|
147
|
+
|
|
148
|
+
This repo supports both:
|
|
149
|
+
|
|
150
|
+
- `uv run ./azwi.py ...` via the PEP 723 metadata block in the root wrapper
|
|
151
|
+
- `uvx azwi ...` via the package defined in `pyproject.toml`
|
|
152
|
+
|
|
153
|
+
Build:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
uv build --no-sources
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Release workflow:
|
|
160
|
+
|
|
161
|
+
- tag a release such as `v0.9.1`
|
|
162
|
+
- GitHub Actions builds the package
|
|
163
|
+
- publish to PyPI using Trusted Publishing
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
MIT
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "azwi"
|
|
7
|
+
version = "0.9.1"
|
|
8
|
+
description = "Azure DevOps work item fetcher for agentic coding tools"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "John Paul Ellis" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 3 - Alpha",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Topic :: Software Development :: Version Control",
|
|
22
|
+
]
|
|
23
|
+
dependencies = []
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
azwi = "azwi.cli:main"
|
|
27
|
+
|
|
28
|
+
[tool.setuptools]
|
|
29
|
+
package-dir = { "" = "src" }
|
|
30
|
+
|
|
31
|
+
[tool.setuptools.packages.find]
|
|
32
|
+
where = ["src"]
|
azwi-0.9.1/setup.cfg
ADDED