azdo-cli 0.2.0-develop.8 → 0.2.0-develop.88
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.
- package/README.md +240 -51
- package/dist/index.js +1400 -2
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,79 +1,268 @@
|
|
|
1
|
-
#
|
|
1
|
+
# azdo-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Azure DevOps CLI focused on work item read/write workflows.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/azdo-cli)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://sonarcloud.io/summary/new_code?id=alkampfergit_azdo-cli)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
[](https://goreportcard.com/report/github.com/steveyegge/beads)
|
|
9
|
-
[](https://github.com/steveyegge/beads/releases)
|
|
10
|
-
[](https://www.npmjs.com/package/@beads/bd)
|
|
11
|
-
[](https://pypi.org/project/beads-mcp/)
|
|
9
|
+
## Features
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
- Retrieve work items with readable output (`get-item`)
|
|
12
|
+
- Update work item state (`set-state`)
|
|
13
|
+
- Assign and unassign work items (`assign`)
|
|
14
|
+
- Set any work item field by reference name (`set-field`)
|
|
15
|
+
- Create or update Tasks from markdown documents (`upsert`)
|
|
16
|
+
- Read rich-text fields as markdown (`get-md-field`)
|
|
17
|
+
- Set rich-text fields as markdown from inline text, file, or stdin (`set-md-field`)
|
|
18
|
+
- Persist org/project/default fields in local config (`config`)
|
|
19
|
+
- Store PAT in OS credential store (or use `AZDO_PAT`)
|
|
14
20
|
|
|
15
|
-
##
|
|
21
|
+
## Installation
|
|
16
22
|
|
|
17
23
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
npm install -g azdo-cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Authentication and Context Resolution
|
|
28
|
+
|
|
29
|
+
PAT resolution order:
|
|
30
|
+
1. `AZDO_PAT` environment variable
|
|
31
|
+
2. Stored credential from OS keyring
|
|
32
|
+
3. Interactive PAT prompt (then stored for next runs)
|
|
20
33
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
Org/project resolution order:
|
|
35
|
+
1. `--org` + `--project` flags
|
|
36
|
+
2. Saved config (`azdo config set org ...`, `azdo config set project ...`)
|
|
37
|
+
3. Azure DevOps `origin` git remote auto-detection
|
|
24
38
|
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# 1) Configure defaults once
|
|
43
|
+
azdo config set org myorg
|
|
44
|
+
azdo config set project myproject
|
|
45
|
+
|
|
46
|
+
# 2) Read a work item
|
|
47
|
+
azdo get-item 12345
|
|
48
|
+
|
|
49
|
+
# 3) Update state
|
|
50
|
+
azdo set-state 12345 "Active"
|
|
51
|
+
|
|
52
|
+
# 4) Create or update a Task from markdown
|
|
53
|
+
azdo upsert --content $'---\nTitle: Improve markdown import UX\nState: New\n---'
|
|
27
54
|
```
|
|
28
55
|
|
|
29
|
-
|
|
56
|
+
## Command Cheat Sheet
|
|
30
57
|
|
|
31
|
-
|
|
58
|
+
| Command | Purpose | Common Flags |
|
|
59
|
+
| --- | --- | --- |
|
|
60
|
+
| `azdo get-item <id>` | Read a work item | `--short`, `--fields`, `--markdown`, `--org`, `--project` |
|
|
61
|
+
| `azdo set-state <id> <state>` | Change work item state | `--json`, `--org`, `--project` |
|
|
62
|
+
| `azdo assign <id> [name]` | Assign or unassign owner | `--unassign`, `--json`, `--org`, `--project` |
|
|
63
|
+
| `azdo set-field <id> <field> <value>` | Update any field | `--json`, `--org`, `--project` |
|
|
64
|
+
| `azdo upsert [id]` | Create or update a Task from markdown | `--content`, `--file`, `--json`, `--org`, `--project` |
|
|
65
|
+
| `azdo get-md-field <id> <field>` | Get field as markdown | `--org`, `--project` |
|
|
66
|
+
| `azdo set-md-field <id> <field> [content]` | Set markdown field | `--file`, `--json`, `--org`, `--project` |
|
|
67
|
+
| `azdo config <subcommand>` | Manage saved settings | `set`, `get`, `list`, `unset`, `wizard`, `--json` |
|
|
68
|
+
| `azdo clear-pat` | Remove stored PAT | none |
|
|
32
69
|
|
|
33
|
-
|
|
34
|
-
* **Agent-Optimized:** JSON output, dependency tracking, and auto-ready task detection.
|
|
35
|
-
* **Zero Conflict:** Hash-based IDs (`bd-a1b2`) prevent merge collisions in multi-agent/multi-branch workflows.
|
|
36
|
-
* **Invisible Infrastructure:** SQLite local cache for speed; background daemon for auto-sync.
|
|
37
|
-
* **Compaction:** Semantic "memory decay" summarizes old closed tasks to save context window.
|
|
70
|
+
## Command Reference
|
|
38
71
|
|
|
39
|
-
|
|
72
|
+
### Core
|
|
40
73
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
74
|
+
```bash
|
|
75
|
+
# Get full work item
|
|
76
|
+
azdo get-item 12345
|
|
77
|
+
|
|
78
|
+
# Get short view
|
|
79
|
+
azdo get-item 12345 --short
|
|
80
|
+
|
|
81
|
+
# Include extra fields for this call
|
|
82
|
+
azdo get-item 12345 --fields "System.Tags,Microsoft.VSTS.Common.Priority"
|
|
48
83
|
|
|
49
|
-
|
|
84
|
+
# Convert rich text fields to markdown
|
|
85
|
+
azdo get-item 12345 --markdown
|
|
86
|
+
|
|
87
|
+
# Disable markdown even if config is on
|
|
88
|
+
azdo get-item 12345 --no-markdown
|
|
89
|
+
```
|
|
50
90
|
|
|
51
|
-
|
|
91
|
+
```bash
|
|
92
|
+
# Set state
|
|
93
|
+
azdo set-state 12345 "Closed"
|
|
94
|
+
|
|
95
|
+
# Assign / unassign
|
|
96
|
+
azdo assign 12345 "someone@company.com"
|
|
97
|
+
azdo assign 12345 --unassign
|
|
98
|
+
|
|
99
|
+
# Set generic field
|
|
100
|
+
azdo set-field 12345 System.Title "Updated title"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Markdown Display
|
|
104
|
+
|
|
105
|
+
The `get-item` command can convert HTML rich-text fields to readable markdown. Resolution order:
|
|
106
|
+
|
|
107
|
+
1. `--markdown` / `--no-markdown` flag (highest priority)
|
|
108
|
+
2. Config setting: `azdo config set markdown true`
|
|
109
|
+
3. Default: off (HTML stripped to plain text)
|
|
110
|
+
|
|
111
|
+
### Markdown Field Commands
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Read field and auto-convert HTML -> markdown
|
|
115
|
+
azdo get-md-field 12345 System.Description
|
|
116
|
+
|
|
117
|
+
# Set markdown inline
|
|
118
|
+
azdo set-md-field 12345 System.Description "# Title\n\nSome **bold** text"
|
|
119
|
+
|
|
120
|
+
# Set markdown from file
|
|
121
|
+
azdo set-md-field 12345 System.Description --file ./description.md
|
|
122
|
+
|
|
123
|
+
# Set markdown from stdin
|
|
124
|
+
cat description.md | azdo set-md-field 12345 System.Description
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## azdo upsert
|
|
128
|
+
|
|
129
|
+
`azdo upsert` accepts a single markdown task document and either creates a new Azure DevOps Task or updates an existing one. Omit `[id]` to create; pass `[id]` to update that work item in place.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Create from inline content
|
|
133
|
+
azdo upsert --content $'---\nTitle: Improve markdown import UX\nAssigned To: user@example.com\nState: New\n---'
|
|
134
|
+
|
|
135
|
+
# Update from a file
|
|
136
|
+
azdo upsert 12345 --file ./task-import.md
|
|
137
|
+
|
|
138
|
+
# JSON output
|
|
139
|
+
azdo upsert 12345 --content $'---\nSystem.Title: Improve markdown import UX\n---' --json
|
|
140
|
+
```
|
|
52
141
|
|
|
53
|
-
|
|
54
|
-
* `bd-a3f8.1` (Task)
|
|
55
|
-
* `bd-a3f8.1.1` (Sub-task)
|
|
142
|
+
The command requires exactly one source flag:
|
|
56
143
|
|
|
57
|
-
|
|
144
|
+
- `azdo upsert [id] --content <markdown>`
|
|
145
|
+
- `azdo upsert [id] --file <path>`
|
|
58
146
|
|
|
59
|
-
|
|
147
|
+
If `--file` succeeds, the source file is deleted after the Azure DevOps write completes. If parsing, validation, or the API call fails, the file is preserved. If deletion fails after a successful write, the command still succeeds and prints a warning.
|
|
60
148
|
|
|
61
|
-
|
|
62
|
-
* **Maintainers** (write access): Beads auto-detects maintainer role via SSH URLs or HTTPS with credentials. Only need `git config beads.role maintainer` if using GitHub HTTPS without credentials but you have write access.
|
|
149
|
+
### Task Document Format
|
|
63
150
|
|
|
64
|
-
|
|
151
|
+
The document starts with YAML front matter for scalar fields, followed by optional `##` heading sections for markdown rich-text fields.
|
|
65
152
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
153
|
+
```md
|
|
154
|
+
---
|
|
155
|
+
Title: Improve markdown import UX
|
|
156
|
+
Assigned To: user@example.com
|
|
157
|
+
State: New
|
|
158
|
+
Tags: cli; markdown
|
|
159
|
+
Priority: null
|
|
160
|
+
---
|
|
69
161
|
|
|
70
|
-
|
|
162
|
+
## Description
|
|
71
163
|
|
|
72
|
-
|
|
164
|
+
Implement a single-command task import flow.
|
|
73
165
|
|
|
74
|
-
|
|
166
|
+
## Acceptance Criteria
|
|
167
|
+
|
|
168
|
+
- Supports create when no ID is passed
|
|
169
|
+
- Supports update when an ID is passed
|
|
170
|
+
- Deletes imported files only after success
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Supported friendly field names:
|
|
174
|
+
|
|
175
|
+
- `Title`
|
|
176
|
+
- `Assigned To` / `assignedTo`
|
|
177
|
+
- `State`
|
|
178
|
+
- `Description`
|
|
179
|
+
- `Acceptance Criteria` / `acceptanceCriteria`
|
|
180
|
+
- `Tags`
|
|
181
|
+
- `Priority`
|
|
182
|
+
|
|
183
|
+
Raw Azure DevOps reference names are also accepted anywhere a field name is expected, for example `System.Title` or `Microsoft.VSTS.Common.AcceptanceCriteria`.
|
|
184
|
+
|
|
185
|
+
Clear semantics:
|
|
186
|
+
|
|
187
|
+
- Scalar YAML fields with `null` or an empty value are treated as clears on update.
|
|
188
|
+
- Rich-text heading sections with an empty body are treated as clears on update.
|
|
189
|
+
- Omitted fields are untouched on update.
|
|
190
|
+
|
|
191
|
+
`--json` output shape:
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"action": "created",
|
|
196
|
+
"id": 12345,
|
|
197
|
+
"fields": {
|
|
198
|
+
"System.Title": "Improve markdown import UX",
|
|
199
|
+
"System.Description": "Implement a single-command task import flow."
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Configuration
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# List settings
|
|
208
|
+
azdo config list
|
|
209
|
+
|
|
210
|
+
# Interactive setup
|
|
211
|
+
azdo config wizard
|
|
212
|
+
|
|
213
|
+
# Enable markdown display for all get-item calls
|
|
214
|
+
azdo config set markdown true
|
|
215
|
+
|
|
216
|
+
# Set/get/unset values
|
|
217
|
+
azdo config set fields "System.Tags,Custom.Priority"
|
|
218
|
+
azdo config get fields
|
|
219
|
+
azdo config unset fields
|
|
220
|
+
|
|
221
|
+
# JSON output
|
|
222
|
+
azdo config list --json
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Credential Management
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Remove stored PAT from keyring
|
|
229
|
+
azdo clear-pat
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## JSON Output
|
|
233
|
+
|
|
234
|
+
These commands support `--json` for machine-readable output:
|
|
235
|
+
- `set-state`
|
|
236
|
+
- `assign`
|
|
237
|
+
- `set-field`
|
|
238
|
+
- `set-md-field`
|
|
239
|
+
- `config set|get|list|unset`
|
|
240
|
+
|
|
241
|
+
## Development
|
|
242
|
+
|
|
243
|
+
### Prerequisites
|
|
244
|
+
|
|
245
|
+
- Node.js LTS (20+)
|
|
246
|
+
- npm
|
|
247
|
+
|
|
248
|
+
### Setup
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
git clone https://github.com/alkampfergit/azdo-cli.git
|
|
252
|
+
cd azdo-cli
|
|
253
|
+
npm install
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Scripts
|
|
257
|
+
|
|
258
|
+
| Command | Description |
|
|
259
|
+
| --- | --- |
|
|
260
|
+
| `npm run build` | Build the CLI with tsup |
|
|
261
|
+
| `npm test` | Build and run tests with vitest |
|
|
262
|
+
| `npm run lint` | Lint source files with ESLint |
|
|
263
|
+
| `npm run typecheck` | Type-check with tsc (no emit) |
|
|
264
|
+
| `npm run format` | Check formatting with Prettier |
|
|
75
265
|
|
|
76
|
-
##
|
|
266
|
+
## License
|
|
77
267
|
|
|
78
|
-
|
|
79
|
-
* [](https://deepwiki.com/steveyegge/beads)
|
|
268
|
+
[MIT](LICENSE)
|