azdo-cli 0.2.0-develop.8 → 0.2.0-develop.89

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.
Files changed (3) hide show
  1. package/README.md +240 -51
  2. package/dist/index.js +1400 -2
  3. package/package.json +9 -7
package/README.md CHANGED
@@ -1,79 +1,268 @@
1
- # bd - Beads
1
+ # azdo-cli
2
2
 
3
- **Distributed, git-backed graph issue tracker for AI agents.**
3
+ Azure DevOps CLI focused on work item read/write workflows.
4
4
 
5
- **Platforms:** macOS, Linux, Windows, FreeBSD
5
+ [![npm version](https://img.shields.io/npm/v/azdo-cli)](https://www.npmjs.com/package/azdo-cli)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=alkampfergit_azdo-cli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=alkampfergit_azdo-cli)
6
8
 
7
- [![License](https://img.shields.io/github/license/steveyegge/beads)](LICENSE)
8
- [![Go Report Card](https://goreportcard.com/badge/github.com/steveyegge/beads)](https://goreportcard.com/report/github.com/steveyegge/beads)
9
- [![Release](https://img.shields.io/github/v/release/steveyegge/beads)](https://github.com/steveyegge/beads/releases)
10
- [![npm version](https://img.shields.io/npm/v/@beads/bd)](https://www.npmjs.com/package/@beads/bd)
11
- [![PyPI](https://img.shields.io/pypi/v/beads-mcp)](https://pypi.org/project/beads-mcp/)
9
+ ## Features
12
10
 
13
- Beads provides a persistent, structured memory for coding agents. It replaces messy markdown plans with a dependency-aware graph, allowing agents to handle long-horizon tasks without losing context.
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
- ## ⚡ Quick Start
21
+ ## Installation
16
22
 
17
23
  ```bash
18
- # Install beads CLI (system-wide - don't clone this repo into your project)
19
- curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
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
- # Initialize in YOUR project
22
- cd your-project
23
- bd init
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
- # Tell your agent
26
- echo "Use 'bd' for task tracking" >> AGENTS.md
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
- **Note:** Beads is a CLI tool you install once and use everywhere. You don't need to clone this repository into your project.
56
+ ## Command Cheat Sheet
30
57
 
31
- ## 🛠 Features
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
- * **Git as Database:** Issues stored as JSONL in `.beads/`. Versioned, branched, and merged like code.
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
- ## 📖 Essential Commands
72
+ ### Core
40
73
 
41
- | Command | Action |
42
- | --- | --- |
43
- | `bd ready` | List tasks with no open blockers. |
44
- | `bd create "Title" -p 0` | Create a P0 task. |
45
- | `bd update <id> --claim` | Atomically claim a task (sets assignee + in_progress). |
46
- | `bd dep add <child> <parent>` | Link tasks (blocks, related, parent-child). |
47
- | `bd show <id>` | View task details and audit trail. |
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
- ## 🔗 Hierarchy & Workflow
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
- Beads supports hierarchical IDs for epics:
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
- * `bd-a3f8` (Epic)
54
- * `bd-a3f8.1` (Task)
55
- * `bd-a3f8.1.1` (Sub-task)
142
+ The command requires exactly one source flag:
56
143
 
57
- **Stealth Mode:** Run `bd init --stealth` to use Beads locally without committing files to the main repo. Perfect for personal use on shared projects.
144
+ - `azdo upsert [id] --content <markdown>`
145
+ - `azdo upsert [id] --file <path>`
58
146
 
59
- **Contributor vs Maintainer:** When working on open-source projects:
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
- * **Contributors** (forked repos): Run `bd init --contributor` to route planning issues to a separate repo (e.g., `~/.beads-planning`). Keeps experimental work out of PRs.
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
- ## 📦 Installation
151
+ The document starts with YAML front matter for scalar fields, followed by optional `##` heading sections for markdown rich-text fields.
65
152
 
66
- * **npm:** `npm install -g @beads/bd`
67
- * **Homebrew:** `brew install beads`
68
- * **Go:** `go install github.com/steveyegge/beads/cmd/bd@latest`
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
- **Requirements:** Linux, FreeBSD, macOS, or Windows.
162
+ ## Description
71
163
 
72
- ## 🌐 Community Tools
164
+ Implement a single-command task import flow.
73
165
 
74
- See [docs/COMMUNITY_TOOLS.md](docs/COMMUNITY_TOOLS.md) for a curated list of community-built UIs, extensions, and integrations—including terminal interfaces, web UIs, editor extensions, and native apps.
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
- ## 📝 Documentation
266
+ ## License
77
267
 
78
- * [Installing](docs/INSTALLING.md) | [Agent Workflow](AGENT_INSTRUCTIONS.md) | [Copilot Setup](docs/COPILOT_INTEGRATION.md) | [Articles](ARTICLES.md) | [Sync Branch Mode](docs/PROTECTED_BRANCHES.md) | [Troubleshooting](docs/TROUBLESHOOTING.md) | [FAQ](docs/FAQ.md)
79
- * [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/steveyegge/beads)
268
+ [MIT](LICENSE)