Part of the ado-aw documentation.
Global flags (apply to all subcommands): --verbose, -v (enable info-level logging), --debug, -d (enable debug-level logging, implies verbose), --log-output-dir <path> (write ado-aw logs to a specific directory; overrides ADO_AW_LOG_DIR)
-
init- Initialize a repository for AI-first agentic pipeline authoring--path <path>- Target directory (defaults to current directory)--force- Bypass the GitHub-remote guard (use when running inside a GitHub-hosted repository likegithubnext/ado-awitself)- Creates
.github/agents/ado-aw.agent.md— a Copilot dispatcher agent that routes to specialized prompts for creating, updating, and debugging agentic pipelines - The agent auto-downloads the ado-aw compiler and handles the full lifecycle (create → compile → check)
-
compile [<path>]- Compile a markdown file to Azure DevOps pipeline YAML. If no path is given, auto-discovers and recompiles all detected agentic pipelines in the current directory.--output, -o <path>- Optional output path for the generated YAML (only valid when a path is provided). If the path is an existing directory, the compiled YAML is written inside that directory using the default filename derived from the markdown source (e.g.foo.md→<dir>/foo.lock.yml).--force- Bypass the GitHub-remote guard (use when running inside a GitHub-hosted repository likegithubnext/ado-awitself)--skip-integrity- (debug builds only) Omit the "Verify pipeline integrity" step from the generated pipeline. Useful during local development when the compiled output won't match a released compiler version. This flag is not available in release builds. OR-ed withado-aw-debug.skip-integrity:in front matter — either is sufficient. Seedocs/ado-aw-debug.md.--debug-pipeline- (debug builds only) Include MCPG debug diagnostics in the generated pipeline:DEBUG=*environment variable for verbose MCPG logging, stderr streaming to log files, and a "Verify MCP backends" step that probes each backend with MCP initialize + tools/list before the agent runs. This flag is not available in release builds.- For
target: jobandtarget: stage, the output is an ADO YAML template (not a complete pipeline). Job names are prefixed with the agent name for uniqueness. Triggers configured viaon:are ignored with a warning.
-
check <pipeline>- Verify that a compiled pipeline matches its source markdown<pipeline>- Path to the pipeline YAML file to verify- The source markdown path is auto-detected from the
@ado-awheader in the pipeline file - Useful for CI checks to ensure pipelines are regenerated after source changes
-
mcp <output_directory> <bounding_directory>- Run SafeOutputs as a stdio MCP server--enabled-tools <name>- Restrict available tools to those named (repeatable)
-
mcp-http <output_directory> <bounding_directory>- Run SafeOutputs as an HTTP MCP server (for MCPG integration)--port <port>- Port to listen on (default: 8100)--api-key <key>- API key for authentication (auto-generated if not provided)--enabled-tools <name>- Restrict available tools to those named (repeatable)
-
execute- Execute safe outputs from Stage 1 (Stage 3 of pipeline)--source, -s <path>- Path to source markdown file--safe-output-dir <path>- Directory containing safe output NDJSON (default: current directory)--output-dir <path>- Output directory for processed artifacts (e.g., agent memory)--ado-org-url <url>- Azure DevOps organization URL override--ado-project <name>- Azure DevOps project name override--dry-run- Validate inputs but skip ADO API calls (useful for local testing and QA review)
-
configure(deprecated; hidden in --help) - Alias forwarding tosecrets set GITHUB_TOKEN. Existing scripts keep working but get a stderr warning. -
secrets set <name> [<value>] [PATH]- Set a pipeline variable (withisSecret=true) on every matched ADO definition. Value resolution: positional<value>→--value-stdin(one line) → interactive tty prompt with echo off.--allow-override- ForceallowOverride=trueon the set variable. When omitted,allowOverrideis preserved on existing variables (so secret rotation does not silently downgrade an existingallowOverride=true) and defaults tofalsefor new variables.- When ado-aw round-trips a definition through the ADO GET→PUT API, unchanged secret siblings returned by ADO as masked
***are normalized tonullbefore the PUT so their stored values are preserved instead of being overwritten by the literal mask. --value-stdin- Read the value from a single line on stdin.--dry-run- Print the planned set without calling the ADO API.--org / --project / --pat- ADO context overrides (same semantics as the other lifecycle commands).--definition-ids <ids>- Explicit pipeline definition IDs (comma-separated; skips local-fixture auto-detection).--all-repos- Project-scope mode. Activates Preview-driven discovery and operates on every ado-aw pipeline ADO knows about in the project — direct ado-aw definitions and consumer pipelines that include ado-aw templates — regardless of which repo their root YAML lives in. Mutually exclusive with--definition-ids. Ignores local lock files for matching (uses ADO Pipeline Preview to find marker steps).--source <path>- Filter by template. Restricts to definitions whose# ado-aw-metadatamarker references the given source path (e.g.agents/security-scan.md). Activates the discovery code path; pairs with--all-reposto scope across the whole project. Mutually exclusive with--definition-ids.
-
secrets list [PATH]- List variable names and theirisSecret/allowOverrideflags on every matched definition. Never prints values.--json- Emit machine-readable JSON.--org / --project / --pat / --definition-ids- As above.--all-repos / --source <path>- As forsecrets set(project-scope discovery).
-
secrets delete <name> [PATH]- Delete the named variable from every matched definition. No-op when the variable is absent.--dry-run- Print the planned deletion plan without calling the ADO API.--org / --project / --pat / --definition-ids- As above.--all-repos / --source <path>- As forsecrets set(project-scope discovery).
secrets set / list / delete accept two opt-in flags that activate Preview-driven discovery instead of the default lexical local-fixture matching. They are the surface that solves token management for templates that get included by other pipelines.
--all-repos— search every definition in the ADO project. With it, you cansecrets set GITHUB_TOKEN --all-reposfrom anywhere; no local checkout of the consumer pipelines is needed.--source <path>— filter results to definitions whose# ado-aw-metadatamarker references that template. Useful for fan-out:secrets set GITHUB_TOKEN --source agents/security-scan.mdrotates the token on every consumer pipeline that includes that template.
Both flags route through ado-aw's discover_ado_aw_pipelines machinery, which calls ADO's Pipeline Preview API per definition and scans the expanded YAML for an ado-aw-marker step that every compiled pipeline now carries. --definition-ids remains the explicit-ID escape hatch and is mutually exclusive with these flags. enable, disable, and remove are not changed — they retain their source-scoped safety semantics.
-
enable [PATH]- Register an ADO build definition for each compiled pipeline discovered underPATH(or the current directory) and ensure it isenabled. For each fixture, matches against the existing ADO definitions byyamlFilenamefirst, then by sanitized display name; creates a new definition when neither matches, flipsqueueStatustoenabledwhen an existing definition isdisabled/paused, and skips when it is alreadyenabled. Fail-soft per fixture; exits non-zero if any fixture failed.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--folder <ado-folder>- ADO folder for newly-created definitions. Defaults to\(root). Only applied on create — existing definitions stay where they are.--default-branch <ref>- Default branch for newly-created definitions. Defaults torefs/heads/main.--dry-run- Print the planned actions (and the full POST body for creates) without calling the ADO API.--also-set-token- After creating a new definition, set itsGITHUB_TOKENvariable (as an ADO secret).--token <value>- The token value for--also-set-token. Falls back to$GITHUB_TOKEN, then to an interactive prompt. Requires--also-set-token.
Source-repo scope (Phase 1):
enablerequires the local git remote to be an Azure DevOps Git remote (the source repo is what gets registered as the definition's repository). GitHub-hosted source repos are gated on a follow-up. -
disable [PATH]- SetqueueStatustodisabled(default) orpausedon every ADO build definition that matches a local fixture underPATH. Refuses to touch any ADO definition that is not the target of a local fixture match — that safety property falls naturally out of the same yaml-path + name match used byconfigure. Skips definitions that are already at the requested status; fail-soft per fixture; exits non-zero if any patch failed or if zero local fixtures matched ADO definitions.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--paused- UsequeueStatus: pausedinstead ofdisabled. Paused definitions still queue scheduled runs but the queue is held; disabled definitions reject all queue requests.--dry-run- Print the plannedfrom → totransitions without calling the ADO API.
-
remove [PATH]- Destructive. Delete every ADO build definition that matches a local fixture underPATH. The samematch_definitionssafety property asdisableapplies: definitions without a local fixture are never in scope. Bulk deletes (>1match) require--yes; a single match on a tty prompts interactively (y/N); non-tty contexts always require--yes. Fail-soft per fixture; exits non-zero if any deletion failed or if zero local fixtures matched ADO definitions.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--yes- Required for bulk deletes (>1 match) and for any delete in a non-tty context. A single match on a tty otherwise prompts interactively.--dry-run- Print the planned deletions without calling the ADO API.
-
list [PATH]- Render every ADO build definition that matches a local fixture (underPATH) along with itsqueueStatus, ADO folder, and latest-run summary. Pass--allto also include definitions with no matching local fixture. Output defaults to a human-readable table;--jsonemits a stable JSON array suitable for scripting.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--all- Include ADO definitions that do not match any local fixture.--json- Emit machine-readable JSON.
-
status [PATH]- Per-pipeline status: name, id, folder,queueStatus, latest-run summary, and a deep link — one block per matched definition. Read-only.--jsonemits the same shape aslist --jsonso scripts can use either.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--json- Emit machine-readable JSON (same shape aslist --json).
-
run [PATH]- Queue an ADO build for every ADO definition that matches a local fixture (underPATH). With--wait, poll each queued build until completion and exit with an aggregate result — 0 only if every queued build succeeded.--org <url>- Override: Azure DevOps organization (URL or bare org name). Inferred from git remote by default.--project <name>- Override: Azure DevOps project name (inferred from git remote by default).--pat <pat>/AZURE_DEVOPS_EXT_PATenv var - PAT for ADO API authentication (Azure CLI fallback if omitted).--branch <ref>- Source branch to queue. Defaults to the definition'sdefaultBranch.--parameters <k=v[,k=v...]>- ADOtemplateParameters. Repeatable and/or comma-separated. All values are strings (ADO coerces as the definition requires). Rejects malformed pairs (missing=). Values must not contain commas — each raw argument is split on,before the=split, sokey=https://a,bis rejected. Use one--parametersflag per pair when values contain commas.--wait- Poll each queued build to completion before exiting.--poll-interval <secs>- Polling period when--waitis set (default 10).--timeout <secs>- Hard cap on the polling loop when--waitis set (default 1800).--dry-run- Print the plannedtemplateParametersbody without calling the ADO API.
-
export-gate-schema(hidden; build-time tool) - Export the gate spec JSON Schema used by thescripts/ado-scriptTypeScript workspace for type codegen. Outputs JSON to stdout or to a file.--output, -o <path>- Write the schema to a file instead of stdout. Parent directories are created automatically.- See
docs/ado-script.mdfor how this command fits into the ado-script build workflow (cargo run -- export-gate-schema --output schema/gate-spec.schema.json).