Prerequisites
ANDO requires Docker to run builds in isolated containers. If Docker is not available, ANDO shows specific error messages:
- Docker not installed - Shows installation instructions for your platform with a link to the Docker website.
- Docker daemon not running - Shows platform-specific instructions to start Docker Desktop (Windows/macOS) or the Docker daemon (Linux).
Commands
Listed in the order of ando help. Commands marked AI need Claude and are not deterministic; see Optional AI-assisted commands.
| Command | Description |
|---|---|
ando run | Run the build script in a Docker container (the default command, also plain ando). |
ando verify | Check build script for errors without executing. |
ando commit | AI. Commit all changes with an AI-generated message. |
ando bump | Bump version across all projects. Deterministic with changelog: template; --changelog claude is AI. |
ando docs | AI. Update documentation using Claude. |
ando release | AI. Interactive release workflow (commit, bump, docs, push, publish). |
ando ship | AI. Ship workflow (release without publish). |
ando clean | Remove artifacts, temp files, and containers. |
ando help, -h, --help | Show available commands and options. |
ando -v, --version | Show the version number. |
Run Options
| Flag | Description |
|---|---|
-f, --file <file> | Use a specific build file instead of build.csando. |
-p, --profile <profiles> | Activate build profiles (comma-separated). |
--read-env | Load environment file without prompting. |
--no-env | Do not load the environment file for this run, even with readEnv: true in ando.config. Cannot be combined with --read-env. |
--verbosity <level> | Set output verbosity (quiet|minimal|normal|detailed). |
--no-color | Disable colored output. |
--cold | Use a fresh container and remove it when the run ends. |
--image <image> | Use a custom Docker image. |
--dind | Mount Docker socket for Docker-in-Docker builds. |
--ref <commit|tag> | Build that commit from a clean temporary checkout instead of the working tree. Ando.Build child builds get the same --ref. |
--yes | Accept every Ando.Confirm prompt (also in Ando.Build child builds). |
--dry-run | Evaluate the script and print the step tree without running anything. |
--record-path-file <file> | Write the absolute path of the run record (one line) to <file>, relative to the invocation directory (the folder of the build script). An existing file at that path is deleted when the run starts, so a failed run, an early exit or --dry-run never leaves an old path behind; nothing is written if the record could not be written. |
Building a specific commit (--ref)
ando run --ref v1.4.0 builds exactly that commit. ANDO checks it out into a temporary detached git worktree under the system temp directory, evaluates the build script from there, and copies only those files into the container. Edits in your working tree cannot change what is built. The worktree is removed when the run ends.
What still uses the directory you ran ando from:
- Environment files (
.env.ando,.env) and the gitignore check for them. - Host paths of
Ando.CopyToContainerandAndo.ImportArtifacts(andAndo.InvocationRoot), so gitignored files such as local certificates stay available. - Artifact copies to the host (
Ando.CopyArtifactsToHost). - Run records (
.ando/runs/). - The build container, which is named after your project, so
--refruns reuse it.
Git.Commit, Git.ShortCommit, Git.LastTag and Git.ChangedSince refer to the checked-out commit, and Git.RequireClean always passes. --ref needs a git repository, a commit that exists, and a build script that exists in that commit.
The build container never contains .git, in --ref runs and normal runs alike (ANDO copies the project without it). So SourceLink, git describe and any git command inside the container do not work; ANDO’s Git.* operations run on the host and do work. Dotnet.Build, Dotnet.Publish, Dotnet.Test (when it builds) and Nuget.Pack therefore pass -p:SourceRevisionId=<full commit> automatically (the value of Git.Commit, HEAD of the source root, the --ref commit with --ref), so InformationalVersion gets +<sha>. Outside a git repository nothing is added. Use WithSourceRevision(sha) to set it yourself.
Confirmations (--yes)
Ando.Confirm(message) asks [y/N] and fails the build if you decline. --yes accepts every confirmation. Without --yes, a run with no interactive console fails at the first Ando.Confirm.
Previewing a run (--dry-run)
ando run -p deploy --dry-run evaluates the build script (profiles and environment files apply as usual) and prints the registered steps, with nested Ando.Block steps indented, their on failure: steps and the finally (runs last-registered first): steps. Nothing is executed and no container is created or started; the exit code is 0. The bodies of Ando.When and Ando.Defer are C# that only runs during the build, so each shows as one line. ando run rejects options it does not know, so a typo such as --dry-rn fails instead of starting a real run.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | The build workflow failed (a step failed, or an artifact copy failed). |
| 2 | Build script not found or invalid file. |
| 3 | Docker is not available. |
| 4 | Profile validation failed (an undefined profile was requested). |
| 5 | Generic error (script compile errors, exceptions). |
| 6 | .env.ando is not gitignored and you declined to continue. |
| 7 | GitHub OAuth scope check failed. |
| 8 | Docker-in-Docker check cancelled. |
| 9 | Another run holds the container lock or an Ando.Lock name. |
| 130 | Interrupted with Ctrl+C. |
Run locks
Only one run can use a build container at a time. A run takes an exclusive lock on ~/.ando/locks/container-<container-name>.lock (Ando.Lock names use name-<name>.lock) before it removes the container (--cold) or clears its Azure profile; a second run of the same script fails at once with exit code 9 and names the container. The container name comes from the folder and the script, so a --ref run and a plain run of the same script exclude each other, and so does a child build that runs the same script from the same folder as its parent. Set ANDO_LOCK_DIR to use another lock folder (the test suite does). --dry-run takes no lock. The operating system releases the lock when the process ends, even after a crash. Builds on the ANDO server run in their own containers and are not affected.
Ando.Lock("name") adds a named lock, for example so only one release runs at a time (see Ando.Lock).
Artifact copy failures
Ando.CopyArtifactsToHost and Ando.CopyZippedArtifactsToHost copy after the last step. If a copy fails (a refused destination, a destination that cannot be deleted, a failed docker cp), the error is logged, the run exits with 1 and the run record has "success": false and an artifact-copy-failed entry under reports. Earlier versions logged a warning and exited with 0. To copy in step order and fail that step, use Ando.CopyToHost.
Run records
Every ando run writes .ando/runs/<utc-time>.json in the directory you ran from. It lists the steps that ran (including steps in blocks and on-failure and finally steps) with start, end, result, error, nesting depth and a cleanup flag, plus the values added with Ando.Report. .ando/runs/ has its own .gitignore. Values of environment variables whose names look secret (SECRET, PASSWORD, TOKEN, KEY, and similar) are redacted in console output, the build log and run records.
Docker-in-Docker (DIND)
ANDO automatically detects when your build script uses operations that require Docker-in-Docker mode (such as Docker.Build, Docker.Install, GitHub.PushImage, or Playwright.Test). This detection also scans child builds invoked via Ando.Build(). If DIND is needed but not enabled, ANDO prompts you:
- (Y)es - Enable DIND for this run only
- (A)lways - Enable DIND and save the setting to
ando.config - Esc - Cancel the build
To skip the prompt, use the --dind flag, add dind: true to your ando.config file, or set the ANDO_DIND=1 environment variable.
Child build inheritance: When a parent build enables DIND, child builds invoked via Ando.Build() automatically inherit the DIND setting. The parent passes ANDO_DIND=1 to both the container environment and the host process environment, so child builds won’t prompt again for DIND mode. (The host process environment is needed because Ando.Build spawns child ando processes on the host.)
CI Server: When running on the ANDO CI Server, the Docker CLI is automatically installed in the build container for DIND builds. You do not need to call Docker.Install() in your build script — though it is harmless to include.
Project File Copying
When ANDO starts a build, it copies your project files into the Docker container. If your project is a git repository and git is available, ANDO uses git ls-files to determine which files to copy. This respects your .gitignore rules, so ignored files (build outputs, node_modules, etc.) are automatically excluded.
If the project is not a git repository (or git is unavailable), ANDO falls back to excluding a fixed set of directories: .git, node_modules, bin, obj, and .ando/cache.
Configuration File
ANDO supports an optional ando.config file in the project root for persisting settings.
# ando.config
dind: true
readEnv: true
allowClaude: true
| Setting | Description |
|---|---|
dind | Enable Docker-in-Docker mode by default. |
readEnv | Automatically load environment files without prompting. |
allowClaude | Allow Claude CLI to run with elevated permissions without prompting. |
Environment Files
ANDO looks for environment files in the project root: .env.ando (preferred) or .env (fallback).
Security check: If .env.ando exists but is not in .gitignore, ANDO warns that the file may contain secrets and prompts you:
- (A)dd to .gitignore (default) - Automatically appends
.env.andoto your.gitignorefile - (C)ontinue anyway - Proceed without adding to
.gitignore - Esc - Abort the build
Loading prompt: When environment variables are found, ANDO prompts:
- (Y)es - Load for this run only
- (n)o - Skip loading
- for this (r)un - Load for this run and all sub-builds
- (a)lways - Load and save
readEnv: truetoando.config
Use --read-env or set readEnv: true in ando.config to skip the prompt and load automatically. Use --no-env to skip the file entirely for one run: nothing is loaded or forwarded to the container, the .env.ando gitignore check is skipped, there is no prompt, and the flag is forwarded to Ando.Build child builds, whatever ando.config says. --no-env together with --read-env is an error.
Optional AI-assisted commands
ando commit, ando docs, ando release, ando ship and the --changelog claude mode of ando bump call the Claude CLI. They need Claude installed, and their output is not deterministic: the same repository can produce different commit messages, documentation edits and changelog entries on each run. Review what they write.
| Command | Claude Usage |
|---|---|
ando commit | Generates commit messages from diffs |
ando docs | Reviews code changes and updates documentation |
ando release, ando ship | Run ando commit and ando docs as workflow steps |
ando bump --changelog claude | Generates changelog entries and updates changelog files |
The deterministic, AI-free path: ando bump with changelog: template in ando.config (or --changelog template) builds the changelog from commit messages with no AI, and ando run never uses Claude. See Release mode for the template mode, which also makes ando release and ando ship refuse a dirty tree instead of committing with Claude.
Requirements: Claude CLI must be installed (npm install -g @anthropic-ai/claude-code)
Permissions: Claude runs with --dangerously-skip-permissions to allow file edits without interactive prompts. On first use, ANDO prompts you to confirm:
- (Y)es - Allow Claude for this run only
- (n)o - Cancel the command
- (A)lways - Allow Claude and save
allowClaude: truetoando.config
To skip the prompt, add allowClaude: true to your ando.config file.
Commit Command
Commits all changes with an AI-generated message using Claude.
$ ando commit
Analyzing changes...
src/Ando/Operations/GitHubOperations.cs
website/src/content/providers/github.md
Generated commit message:
────────────────────────────────────────
docs: add options reference to GitHub provider
────────────────────────────────────────
Commit with this message? [Y/n] y
Bump Command
Bumps the version of all projects detected in build.csando.
ando bump [patch|minor|major] [--changelog template|claude|none] [--set <version>]
[--suggest] [--dry-run] [--no-commit] [--tag]
What it does:
- Detects projects from
build.csando(Dotnet.Project, Npm directories) - Validates all versions match (prompts if mismatched)
- Updates all project files (.csproj, package.json)
- Generates changelog entry using Claude from commit history since the last tag
- Updates CHANGELOG.md and version badges
- Commits the changes
Tag resolution for changelog: The bump command looks for a git tag matching the current version (vX.Y.Z or X.Y.Z). If no exact match is found, it falls back to the most recent git tag. This ensures changelogs are generated even when exact version tags are missing.
Supported projects:
.csprojfiles viaDotnet.Project("path")package.jsonin directories used withNpm.*operations
Release mode (opt-in, no AI)
Everything below is opt-in. Without these settings and flags, ando bump, ando release and ando ship behave as described above.
Flags (unknown flags are rejected):
| Flag | Effect |
|---|---|
--changelog template|claude|none | Changelog source. template builds it from commits (no AI), none skips it. Default: changelog setting, else claude. |
--set <version> | Set an explicit version instead of bumping. Semver must parse; year-minor-patch must be YYYY.MINOR.PATCH, a plausible year, and greater than the current version. |
--suggest | Print minor if a feat commit exists since the last tag, else patch (last output line), after listing the commits considered. Changes nothing. |
--dry-run | Print the new version, files that would change, the changelog entry, commit message and tag. Changes nothing. |
--no-commit | Write the files and stop. |
--tag | Create the annotated tag <tagPrefix><version> on the release commit (message = commit message). Refused, before anything is written, if the tag already exists (at HEAD or anywhere else). Never pushes. Cannot be combined with --no-commit. |
ando.config settings:
| Setting | Default | Meaning |
|---|---|---|
versionFiles | (detect from build.csando) | Files relative to the repo root holding the version: the single <Version> that is a direct child of a <PropertyGroup> in .props/.csproj/.targets (attributes such as Condition are fine; <PackageReference><Version> children are ignored and kept; zero or several such elements are refused, naming the file), or "version" in package.json. Only the value is rewritten (line endings and a UTF-8 BOM are kept). Files are validated before hooks or the dirty-tree check. Each file must have a version and all must match. build.csando is not required. Version badges are not touched. |
versionScheme | semver | semver or year-minor-patch (YYYY.MINOR.PATCH). Minor in the same year: 2026.13.1 to 2026.14.0; patch: 2026.13.2. In a new year minor and patch both give <year>.1.0 (UTC date). major is rejected. |
changelog | claude | template, claude or none. |
changelogPaths | whole repo | Only commits touching these paths feed the template changelog. Entries are git pathspecs passed after -- to git log, so exclusions work, e.g. ":!src/website". |
unreleasedHeading | Unreleased | Heading of the hand-written section that becomes the release (case-insensitive; ## [Unreleased] also matches). |
keepUnreleased | false | Leave a new empty Unreleased heading above the release section. |
changelogFile | CHANGELOG.md | File that receives the template section (created with # Changelog if missing). |
commitMessage | Bump version to {version} | Release commit message; {version} is replaced. |
tagPrefix | v | Prefix of the tag created by --tag. |
tagPattern | v* | Glob for the last release tag (git describe --tags --abbrev=0 --match). No tag: all history is used. |
requireClean | false | Refuse to run with uncommitted changes instead of running ando commit. |
Template changelog: commits since the last matching tag (--no-merges, limited to changelogPaths) are grouped into ### Features (feat), ### Fixes (fix) and ### Other (everything else), newest first, each as - <subject> (<sha7>). chore(release) commits and commits matching the configured commitMessage ({version} is a wildcard) are skipped. The section ## <version> (<yyyy-MM-dd>) (Gregorian, culture-independent) ends with <!-- edit before committing --> and is inserted immediately before the first ## heading (headings inside fenced code blocks are ignored), so the title and any intro text stay above it; with no ## heading it is appended after the existing content. A file that starts with YAML frontmatter keeps it on top. If a ## <unreleasedHeading> section exists, it is converted instead: its heading is replaced by ## <version> (<yyyy-MM-dd>), its hand-written lines stay first, followed by the generated groups and the review marker; with keepUnreleased a new empty Unreleased heading (as originally written) stays above the release. --dry-run prints exactly that section. changelogPaths entries are git pathspecs, so "changelogPaths": ["src", "services", "infra", ":!src/website"] includes those folders but excludes src/website. Dry runs and --suggest never ask for Claude permission.
Safe commits: with changelog set to template or none (flag or config), or requireClean: true, bump refuses a dirty working tree (ANDO’s own build.csando.log and .ando/ are ignored), never starts ando commit or Claude, and commits only the files it changed, by explicit path. ando release and ando ship apply the same guard: in safe mode they print the uncommitted files and exit with code 1 before any step (so they never run the AI commit), and they show the current and next version using versionFiles and versionScheme.
Example ando.config:
{
"versionFiles": ["Directory.Build.props"],
"versionScheme": "year-minor-patch",
"changelog": "template",
"changelogPaths": ["src", "services", "infra"],
"commitMessage": "chore(release): {version}",
"tagPrefix": "v",
"tagPattern": "v*"
}
ando bump "$(ando bump --suggest | tail -n 1)" --dry-run
ando bump minor --tag
Docs Command
Uses Claude to review code changes and update documentation.
ando docs
What it does:
- Syncs version badges in documentation files (
index.astro,README.md) to the current project version - Gets commits since last git tag (or recent commits if no tag)
- Analyzes each commit to understand what changed
- Finds and updates relevant documentation files
- Changes are left uncommitted for you to review
Files Searched and Updated
Claude searches for and updates these file types:
| Pattern | Location | Description |
|---|---|---|
*.md | Anywhere | Markdown documentation files |
*.astro | website/ | Astro page components |
*.js | website/ | JavaScript data files (operations, providers) |
llms.txt | public/ | LLM-friendly documentation (must stay in sync) |
Files Skipped
| File | Reason |
|---|---|
CHANGELOG.md | Handled separately by ando bump |
| Internal refactoring | Only user-facing changes need docs |
What Triggers Updates
Claude looks for commits that affect:
- New features - Operations, commands, or capabilities
- Changed behavior - Modified functionality that affects users
- New options - Parameters, flags, or configuration settings
- Examples - New use cases or updated patterns
- CLI help - Command descriptions or usage
Example Output
$ ando docs
Analyzing 5 commit(s) since v0.9.58...
Claude is reviewing documentation...
Reading website/src/data/operations.js...
Updating Docker.Build options documentation...
Reading website/public/llms.txt...
Adding new --platform flag to llms.txt...
Documentation updated. Review changes and commit when ready.
Requirements: Claude CLI must be installed (npm install -g @anthropic-ai/claude-code)
Release Command
Interactive release workflow that orchestrates: commit, documentation, bump, push, and publish.
ando release # Interactive checklist
ando release --all # Skip checklist, run all steps
ando release --dry-run # Preview without executing
ando release --minor # Specify bump type (default: patch)
Steps:
- Build Verification - Runs
ando run --read-envfirst - Commit - Commit uncommitted changes (uses
ando commit) - skipped if no uncommitted changes - Docs - Update documentation (uses
ando docs) - Bump - Bump version across all projects (uses
ando bump) - skipped if no changes since last tag - Push - Push to remote repository - skipped if no remote tracking
- Publish - Run
ando run -p publish --dind --read-env
Steps are contextually enabled/disabled based on repository state.
Ship Command
Ship workflow — same as release but without the publish step. Use when you want to commit, bump, update docs, and push without building/publishing artifacts.
ando ship # Interactive checklist
ando ship --all # Skip checklist, run all steps
ando ship --dry-run # Preview without executing
ando ship minor # Specify bump type (default: patch)
Steps:
- Build Verification - Runs
ando run --read-envfirst - Commit - Commit uncommitted changes (uses
ando commit) - skipped if no uncommitted changes - Bump - Bump version across all projects (uses
ando bump) - skipped if no changes since last tag - Docs - Update documentation (uses
ando docs) - Push - Push to remote repository - skipped if no remote tracking
Steps are contextually enabled/disabled based on repository state. Hooks use the command name ship (e.g., ando-pre-ship.csando).
Hooks
ANDO supports pre-build and post-build hooks that run before and after CLI commands. Hooks are .csando scripts that execute on the host machine.
| Hook | When it runs |
|---|---|
ando-pre.csando | Before ANY command |
ando-pre-{cmd}.csando | Before specific command |
ando-post-{cmd}.csando | After specific command |
ando-post.csando | After ANY command |
Quick example:
// scripts/ando-pre-bump.csando
var result = await Shell.RunAsync("dotnet", "test", "--no-build");
if (result.ExitCode != 0) throw new Exception("Tests failed");
👉 See full Hooks documentation for file locations, available APIs, environment variables, and more examples.
Cancellation (Ctrl+C)
ANDO handles Ctrl+C in three stages:
- First Ctrl+C - Stops the running step (it is marked cancelled) and any command it left running in the build container, then runs the on-failure and finally steps. Commands started from then on ignore further Ctrl+C presses.
- Second Ctrl+C - Prints a warning. Cleanup keeps running.
- Third Ctrl+C - Exits immediately (exit code 130) and skips the remaining cleanup. Before exiting, ANDO makes a best-effort attempt (at most 5 seconds) to remove the
--refworktree and writes the run record with"aborted": true(the step that was running is recorded with the erroraborted). The run’s temporary Azure profile is removed with the container for--coldruns, and at the start of the next run for warm containers. - Exit code - A run interrupted with Ctrl+C exits with 130, whether the cleanup finished or the third press forced the exit, so scripts can tell an abort from a failure (exit 1).
Clean Options
| Flag | Description |
|---|---|
--artifacts | Remove the artifacts directory. |
--temp | Remove temp directory. |
--container | Remove the project’s warm container (clears package caches). |
--all | Remove all of the above. |
When to clean
ANDO reuses a warm container between runs for speed, so the build environment persists across runs. Clean it whenever you change something that the warm container would otherwise keep stale:
- After changing the build image (
Ando.UseImage/--image), upgrading ANDO itself, or changing container-affecting config — runando clean --container(or--all), or use--coldfor a single fresh-container run. - If a build gets into a bad container state.
Note: a build that fails at “Copying project files to container” with
Error response from daemon: mkdirat var/run: file exists is a separate,
Docker 29+ specific issue caused by an old warm container whose Docker socket
was mounted onto the /var/run symlink. ANDO 0.9.148+ detects these legacy
warm containers and automatically recreates them with the corrected socket
mount before the build runs. If you still hit the error on an older warm
container, run ando clean --all and retry the build.
Project Files
ANDO uses and creates various files in your project directory:
Environment Files
| File | Description |
|---|---|
.env.ando | Preferred - Project-specific environment variables. Takes priority over .env. |
.env | Fallback - Standard environment file, used if .env.ando doesn’t exist. |
ANDO prompts before loading environment files (unless --read-env flag or readEnv: true in config).
Configuration Files
| File | Description |
|---|---|
ando.config | YAML configuration file for persistent settings (dind, readEnv). |
build.csando | Build script (C# with Roslyn scripting). |
Generated Files & Directories
| Path | Description |
|---|---|
build.csando.log | Plain-text log of the last build run. Overwrites on each run. |
.ando/cache/ | Package caches persist inside warm containers (not on host). |
.ando/tmp/ | Temporary files used during builds. |
artifacts/ | Default output directory for build artifacts. |
Hook Scripts
| File | Description |
|---|---|
ando-pre.csando | Runs before any command. |
ando-pre-{cmd}.csando | Runs before a specific command. |
ando-post-{cmd}.csando | Runs after a specific command. |
ando-post.csando | Runs after any command. |
Hook scripts are searched in ./scripts/ first, then ./.
Logging
ANDO writes a plain-text log to build.csando.log in the project root. This file:
- Is overwritten on each build run (not appended)
- Contains the same output as the console (without ANSI color codes)
- Includes timestamps, step names, and command output
- Is useful for debugging failed builds or reviewing build history
Suggested .gitignore
Add these patterns to your .gitignore to exclude ANDO-generated files:
# ANDO build system
.env.ando
build.csando.log
.ando/
artifacts/
Explanation:
| Pattern | Why ignore |
|---|---|
.env.ando | Contains secrets (API keys, tokens, passwords). ANDO warns if not gitignored. |
build.csando.log | Build output log, regenerated on each run. |
.ando/ | Cache directories (NuGet, npm) and temp files. Large and machine-specific. |
artifacts/ | Build outputs. Should be regenerated, not committed. |
Optional:
# Optional: exclude config if it contains machine-specific settings
# ando.config
Most teams commit ando.config since it contains project-wide settings like dind: true.