@thanaen/ado-cli 0.1.0
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 +174 -0
- package/dist/cli.js +57827 -0
- package/package.json +47 -0
- package/skills/ado-workflows/SKILL.md +43 -0
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thanaen/ado-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Lightweight Azure DevOps CLI for repos, work items, pull requests, and builds",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Thanaen/azure-devops-cli.git"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"ado": "dist/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"skills"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"ado": "bun src/cli.ts",
|
|
23
|
+
"check": "bun src/cli.ts smoke",
|
|
24
|
+
"help": "bun src/cli.ts help",
|
|
25
|
+
"test": "bun test",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"build": "bun build src/cli.ts --compile --outfile ado",
|
|
28
|
+
"build:dist": "bun build src/cli.ts --target=node --outfile dist/cli.js",
|
|
29
|
+
"prepack": "bun run build:dist",
|
|
30
|
+
"lint": "oxlint --type-aware --type-check",
|
|
31
|
+
"lint:fix": "oxlint --type-aware --type-check --fix",
|
|
32
|
+
"fmt": "oxfmt",
|
|
33
|
+
"fmt:check": "oxfmt --check",
|
|
34
|
+
"prepare": "lefthook install"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"azure-devops-node-api": "^15.1.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"bun-types": "^1.3.9",
|
|
41
|
+
"lefthook": "^2.1.1",
|
|
42
|
+
"oxfmt": "^0.35.0",
|
|
43
|
+
"oxlint": "^1.50.0",
|
|
44
|
+
"oxlint-tsgolint": "^0.14.2",
|
|
45
|
+
"typescript": "^5"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ado-workflows
|
|
3
|
+
description: Use the local Azure DevOps CLI for day-to-day workflows (work items, PRs, repos, branches, builds). Trigger when a task mentions Azure DevOps REST API actions, PR management, work item lookup, or CI/build validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ADO Workflows
|
|
7
|
+
|
|
8
|
+
Use the `ado` CLI instead of ad-hoc curl commands.
|
|
9
|
+
|
|
10
|
+
## Preflight
|
|
11
|
+
|
|
12
|
+
1. Verify auth is available:
|
|
13
|
+
- `test -n "$DEVOPS_PAT" && echo OK || echo MISSING`
|
|
14
|
+
2. Verify connectivity:
|
|
15
|
+
- `ado smoke`
|
|
16
|
+
- If needed, run an independent host check (outside the CLI) to distinguish network issues from ADO config issues.
|
|
17
|
+
|
|
18
|
+
If auth is missing, stop and ask for `DEVOPS_PAT`.
|
|
19
|
+
|
|
20
|
+
## Core commands
|
|
21
|
+
|
|
22
|
+
- List repos: `ado repos`
|
|
23
|
+
- List branches: `ado branches "MyRepo"`
|
|
24
|
+
- Get work item: `ado workitem-get <id>`
|
|
25
|
+
- Get full raw work item payload: `ado workitem-get <id> --raw --expand=all`
|
|
26
|
+
- List recent work items: `ado workitems-recent 10`
|
|
27
|
+
- List recent work items filtered by tag/type/state: `ado workitems-recent 20 --type=Bug --tag=bot --state=New`
|
|
28
|
+
- List comments on a work item: `ado workitem-comments <id> --top=100 --order=desc`
|
|
29
|
+
- Add a comment on a work item: `ado workitem-comment-add <id> --text="..."`
|
|
30
|
+
- Update an existing comment on a work item: `ado workitem-comment-update <id> <commentId> --text="..."`
|
|
31
|
+
- List PRs: `ado prs active 10 "MyRepo"`
|
|
32
|
+
- Get PR: `ado pr-get <id> "MyRepo"`
|
|
33
|
+
- Create PR: `ado pr-create --title="..." --source="feature/x" --target="develop" --description="..." --repo="MyRepo" --work-items=123,456`
|
|
34
|
+
- Update PR: `ado pr-update <id> --title="..." --description="..." --repo="MyRepo" --work-items=123,456`
|
|
35
|
+
- Approve PR: `ado pr-approve <id> "MyRepo"`
|
|
36
|
+
- Enable auto-complete: `ado pr-autocomplete <id> "MyRepo"`
|
|
37
|
+
- List builds: `ado builds 10`
|
|
38
|
+
|
|
39
|
+
## Safety rules
|
|
40
|
+
|
|
41
|
+
- Never print `DEVOPS_PAT`.
|
|
42
|
+
- Prefer CLI commands over direct API calls.
|
|
43
|
+
- Use `ADO_INSECURE=1` only when needed for trusted self-signed endpoints.
|