You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/ado_cli/cli/agent_pools.ex
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -16,28 +16,35 @@ defmodule AdoCli.CLI.AgentPools do
16
16
defcommanddo
17
17
[
18
18
name: "ado agent-pools",
19
-
doc: "Manage Azure DevOps agent pools and queues.",
19
+
doc:
20
+
"Manage Azure DevOps agent pools and queues. Pools host agents; queues are project-scoped views into pools used for pipeline runs.",
20
21
subcommands: [
21
22
list: [
22
23
name: "ado agent-pools list",
23
-
doc: "List agent pools in the organization.",
24
+
doc:
25
+
"List every agent pool in the organization. Output is a table by default (ID, Name, Auto-provision, Type); pass --json for a machine-readable array. Use this to discover pool IDs for use with `pipelines-builds queue --pool` or for agent management.",
24
26
execute: &list_pools/1
25
27
],
26
28
show: [
27
29
name: "ado agent-pools show",
28
-
doc: "Show details of an agent pool, including agents.",
29
-
arguments: [pool_id: [type: :integer,doc: "Agent pool ID"]],
30
+
doc:
31
+
"Show details of an agent pool, including its agents and their status. The pool ID is an integer (not a name); use `ado agent-pools list` to look it up.",
32
+
arguments: [pool_id: [type: :integer,doc: "Numeric agent pool ID"]],
30
33
execute: &show_pool/1
31
34
],
32
35
queues: [
33
36
name: "ado agent-pools queues",
34
-
doc: "Manage agent queues.",
37
+
doc:
38
+
"Manage agent queues. A queue is a project-scoped alias for a pool — pipelines run on a queue, not a pool directly.",
35
39
subcommands: [
36
40
list: [
37
41
name: "ado agent-pools queues list",
38
-
doc: "List agent queues.",
42
+
doc:
43
+
"List agent queues in a project. Output is a table (ID, Name, Pool); pass --json for raw data. Use --pool to filter by a specific pool's queues.",
39
44
arguments: [project: [type: :string,doc: "Project name or ID"]],
40
-
options: [pool: [type: :integer,doc: "Filter by pool ID",doc_arg: "POOL_ID"]],
45
+
options: [
46
+
pool: [type: :integer,doc: "Filter by numeric agent pool ID",doc_arg: "POOL_ID"]
Copy file name to clipboardExpand all lines: lib/ado_cli/cli/areas.ex
+46-13Lines changed: 46 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -11,50 +11,83 @@ defmodule AdoCli.CLI.Areas do
11
11
defcommanddo
12
12
[
13
13
name: "ado areas",
14
-
doc: "Manage Azure DevOps area paths (classification nodes).",
14
+
doc:
15
+
"Manage Azure DevOps area paths (classification nodes). Areas organize work items into a hierarchy (e.g. 'Project\\Team\\Feature') for filtering and reporting.",
15
16
subcommands: [
16
17
list: [
17
18
name: "ado areas list",
18
-
doc: "List area paths in a project.",
19
+
doc:
20
+
"List area paths in a project as a tree (default: only top-level; use --depth for children). Output is a hierarchical tree by default; pass --json for the raw root node with nested children.",
19
21
arguments: [project: [type: :string,doc: "Project name or ID"]],
20
-
options: [depth: [type: :integer,doc: "Depth of children to retrieve",doc_arg: "N"]],
22
+
options: [
23
+
depth: [
24
+
type: :integer,
25
+
doc: "Depth of children to retrieve (1 = top-level only, 2 = includes sub-areas)",
26
+
doc_arg: "N"
27
+
]
28
+
],
21
29
execute: &list_areas/1
22
30
],
23
31
show: [
24
32
name: "ado areas show",
25
-
doc: "Show details of an area path.",
33
+
doc:
34
+
"Show details of a single area path (ID, name, full path, structure type). Returns 404 if the path does not exist.",
26
35
arguments: [
27
36
project: [type: :string,doc: "Project name or ID"],
Copy file name to clipboardExpand all lines: lib/ado_cli/cli/auth_commands.ex
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -20,26 +20,31 @@ defmodule AdoCli.CLI.AuthCommands do
20
20
defcommanddo
21
21
[
22
22
name: "ado login",
23
-
doc: "Authenticate with Azure DevOps.",
23
+
doc:
24
+
"Authenticate with Azure DevOps. Default (no --method) opens your browser for interactive OAuth sign-in. For CI or headless environments, use --method pat with a Personal Access Token. Use --method device to print a code+URL for signing in on any device. After login, credentials are stored in ~/.ado_cli/config.json with 0600 permissions.",
24
25
options: [
25
26
method: [
26
27
type: :string,
27
-
doc: "Auth method: browser (default), pat, device",
28
+
doc:
29
+
"Auth method. Valid: browser (default — interactive OAuth, supports AAD and MSA orgs), pat (Personal Access Token; required for CI), device (device code flow; visit URL on any device).",
"Azure DevOps organization name. Optional for browser/device login (the org is auto-detected from the token). Required for PAT login. Can also be set via ADO_ORG env var.",
33
36
doc_arg: "ORG"
34
37
],
35
38
server: [
36
39
type: :string,
37
-
doc: "Server URL for self-hosted Azure DevOps Server",
40
+
doc:
41
+
"Server URL for self-hosted Azure DevOps Server (e.g. https://ado.example.com). Cloud users can omit this. Can also be set via ADO_SERVER env var.",
38
42
doc_arg: "URL"
39
43
],
40
44
pat: [
41
45
type: :string,
42
-
doc: "Personal Access Token (for method=pat)",
46
+
doc:
47
+
"Personal Access Token. Only used with --method pat. Generate at https://dev.azure.com/{org}/_usersSettings/tokens. Required scopes depend on usage: vso.work (work items), vso.code (repos, PRs), vso.project (projects/teams), vso.build (pipelines), vso.release (releases). Use 'Full access' for broadest coverage.",
"Manage the organization-wide notification banner that appears at the top of the Azure DevOps web UI for every user. Useful for maintenance windows or org-wide announcements.",
15
16
subcommands: [
16
17
show: [
17
18
name: "ado banners show",
18
-
doc: "Show the current organization banner.",
19
+
doc:
20
+
"Show the current organization banner. Prints 'No banner configured.' if no banner is set, or the message, type, and audience level otherwise. Pass --json for raw output.",
19
21
execute: &show_banner/1
20
22
],
21
23
set: [
22
24
name: "ado banners set",
23
-
doc: "Set or update the organization banner.",
25
+
doc:
26
+
"Set or update the organization banner. The banner appears immediately for all users in the org (or for the chosen audience level). Replaces any existing banner.",
"Banner text shown to users. Markdown is not supported; the text is rendered as plain text. Multi-word values do not need quoting (joined until next flag). Use @<file> or - to read from a file/stdin.",
"Manage branch policies that gate pull requests (build validation, required reviewers, status checks, etc.). A policy is a configuration object scoped to a specific branch and repository.",
16
17
subcommands: [
17
18
list: [
18
19
name: "ado repos policies list",
19
-
doc: "List branch policies in a repository.",
20
+
doc:
21
+
"List branch policies in a repository as a table (ID, Type, Branch, Blocking, Enabled). Use --branch to filter to a single branch (e.g. main). Pass --json for the raw array.",
20
22
arguments: [
21
23
project: [type: :string,doc: "Project name or ID"],
22
24
repo_id: [type: :string,doc: "Repository name or ID"]
23
25
],
24
-
options: [branch: [type: :string,doc: "Filter by branch name",doc_arg: "BRANCH"]],
26
+
options: [
27
+
branch: [
28
+
type: :string,
29
+
doc:
30
+
"Filter by branch name. Pass the full ref like 'refs/heads/main', or just 'main' (substring match)",
31
+
doc_arg: "BRANCH"
32
+
]
33
+
],
25
34
execute: &list_policies/1
26
35
],
27
36
show: [
28
37
name: "ado repos policies show",
29
-
doc: "Show details of a policy.",
38
+
doc:
39
+
"Show details of a single policy (ID, type, branch, repo, blocking, enabled, created date). Use `list` first to discover the policy ID.",
30
40
arguments: [
31
41
project: [type: :string,doc: "Project name or ID"],
32
42
repo_id: [type: :string,doc: "Repository name or ID"],
policy_id: [type: :integer,doc: "Numeric policy configuration ID (from `list`)"]
34
44
],
35
45
execute: &show_policy/1
36
46
],
37
47
create: [
38
48
name: "ado repos policies create",
39
-
doc: "Create a branch policy.",
49
+
doc:
50
+
"Create a new branch policy. The policy type is identified by a UUID; common ones are: fa4e907d-c16b-4a4c-9dfa-4906e5d171dd (Build validation), fd2167ab-9d2a-4d8b-b2c9-1cdfbb6d4c34 (Required reviewers), 0609b952-1397-4640-95ec-e121a052fb4b (Status check).",
40
51
arguments: [
41
52
project: [type: :string,doc: "Project name or ID"],
42
53
repo_id: [type: :string,doc: "Repository name or ID"]
@@ -45,40 +56,55 @@ defmodule AdoCli.CLI.BranchPolicies do
45
56
type: [
46
57
type: :string,
47
58
required: true,
48
-
doc: "Policy type id (UUID)",
59
+
doc:
60
+
"Policy type UUID. Find these in the Azure DevOps UI under Project Settings > Repos > Policies > any policy > URL contains 'policyType='.",
49
61
doc_arg: "TYPE_ID"
50
62
],
51
63
branch: [
52
64
type: :string,
53
65
required: true,
54
-
doc: "Target branch (e.g. refs/heads/main)",
66
+
doc:
67
+
"Target branch as a ref (e.g. 'refs/heads/main', 'refs/heads/feature/*' for wildcards)",
55
68
doc_arg: "BRANCH"
56
69
],
57
-
blocking: [type: :boolean,default: true,doc: "Block pull request on policy failure"]
70
+
blocking: [
71
+
type: :boolean,
72
+
default: true,
73
+
doc:
74
+
"When true (default), PRs cannot be completed until the policy passes. When false, the policy is informational only."
75
+
]
58
76
],
59
77
execute: &create_policy/1
60
78
],
61
79
update: [
62
80
name: "ado repos policies update",
63
-
doc: "Update a branch policy.",
81
+
doc:
82
+
"Modify an existing policy's blocking flag or enabled state. The policy type and scope are preserved from the existing policy.",
64
83
arguments: [
65
84
project: [type: :string,doc: "Project name or ID"],
66
85
repo_id: [type: :string,doc: "Repository name or ID"],
0 commit comments