Build and deploy with a familiar syntax

From the Latin "andō" - to set in motion.

ANDO is a continous integration tool that runs your build and deployment workflow inside a Docker container. C# like syntax, support for .NET, Node, Npm, Cloudflare and more.

Getting started

Install as a dotnet tool.

shell
# Install ANDO
dotnet tool install -g ando

# Create a hello world build script
echo 'Log.Info("Hello, World!");' > build.csando

# Run the build script
ando run

ANDO commands

The CLI provides a small, focused surface area.

Command Description
ando Run the build script (same as 'ando run').
ando run Run the build script in a Docker container.
ando verify Check build script for errors without executing.
ando clean Remove artifacts, temp files, and containers.
ando help Show available commands and options.

See the CLI reference for all options.

Example build.csando

C# code defines projects, tools, workflow settings, and operations. Compose builds with nested scripts.

build.csando
// Project and directory references
var WebApi = Dotnet.Project("./src/WebApi/WebApi.csproj");
var Frontend = Directory("./frontend");

// Backend build and publish
Dotnet.Restore(WebApi);
Dotnet.Build(WebApi);
Dotnet.Test(WebApi);
Dotnet.Publish(WebApi, o => o.Output(Root / "dist" / "api"));

// Frontend build
Node.Install();
Npm.Ci(Frontend);
Npm.Run(Frontend, "build");

// Deploy frontend to Cloudflare Pages
Cloudflare.EnsureAuthenticated();
Cloudflare.PagesDeploy(Frontend / "dist", "my-frontend");
Cloudflare.PurgeCache("example.com");

All Operations

Each operation registers a deterministic step and runs inside the container.

Ando (12)

Root The root path of the project (where build.csando is located). Supports path combining with the / operator.
Temp Temporary files directory (root/.ando/tmp). Supports path combining with the / operator. Use for caches, intermediate files, etc.
Env Gets an environment variable. By default throws if not set. Pass required: false to return null instead.
Directory Creates a reference to a directory. Used with Npm and Cloudflare operations. Supports path combining with the / operator.
Ando.UseImage Set the Docker image for the current build container. Must be called before build steps execute.
Ando.CopyArtifactsToHost Register files to copy from the container to the host after the build completes. The first parameter is the path inside the container (relative to /workspace or absolute), and the second is the destination on the host (relative to project root or absolute).
Ando.CopyZippedArtifactsToHost Register files to be archived and copied from the container to the host after the build completes. Creates a single archive file for faster transfer of many small files. Supports .tar.gz (default) and .zip formats. If the destination is a directory, creates artifacts.tar.gz in that directory.
Ando.Build Run a nested build script. Accepts a directory (runs build.csando in that directory) or a specific .csando file path. The child build runs in its own isolated container with its own .env file and context.
Log.Info Logs an informational message. Visible at Normal and Detailed verbosity levels.
Log.Warning Logs a warning message. Visible at Minimal, Normal, and Detailed verbosity levels.
Log.Error Logs an error message. Always visible regardless of verbosity level.
Log.Debug Logs a debug message. Only visible at Detailed verbosity level.

App Service (9)

AppService.CreateSlot Create a new deployment slot.
AppService.DeleteSlot Delete a deployment slot.
AppService.DeployWithSwap Deploy to a slot then swap to production (zero-downtime).
AppService.DeployZip Deploy an app service using zip deploy.
AppService.ListSlots List deployment slots for an app service.
AppService.Restart Restart an app service.
AppService.Start Start an app service.
AppService.Stop Stop an app service.
AppService.SwapSlots Swap deployment slots.

Azure (8)

Azure.CreateResourceGroup Create a resource group if it doesn't exist.
Azure.DeleteResourceGroup Delete a resource group and all its resources.
Azure.EnsureAuthenticated Authenticate to Azure using the best available method. Checks for service principal credentials (AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID), then falls back to existing CLI session or interactive login. Prompts to install Azure CLI if not available.
Azure.EnsureLoggedIn Verify the user is logged in to Azure CLI. Fails if not authenticated.
Azure.LoginWithManagedIdentity Login with Managed Identity (for Azure-hosted environments).
Azure.LoginWithServicePrincipal Login with a Service Principal (for CI/CD).
Azure.SetSubscription Set the active Azure subscription.
Azure.ShowAccount Display current Azure account information.

Bicep (4)

Bicep.Build Compile a Bicep file to ARM JSON template.
Bicep.DeployToResourceGroup Deploy a Bicep template to a resource group. Returns a BicepDeployment with typed access to outputs via deployment.Output("name").
Bicep.DeployToSubscription Deploy a Bicep template at subscription scope. Returns a BicepDeployment with typed access to outputs via deployment.Output("name").
Bicep.WhatIf Preview what would be deployed (what-if analysis).

Cloudflare (6)

Cloudflare.EnsureAuthenticated Verify Cloudflare credentials. Prompts interactively if environment variables are not set. See authentication for setup.
Cloudflare.PagesCreateProject Create a new Cloudflare Pages project.
Cloudflare.PagesDeploy Deploy a directory to Cloudflare Pages. The directory should be the build output folder.
Cloudflare.PagesListDeployments List deployments for a Cloudflare Pages project.
Cloudflare.PagesListProjects List all Cloudflare Pages projects.
Cloudflare.PurgeCache Purge the entire Cloudflare cache for a zone. Accepts either a Zone ID or domain name (domain is resolved automatically). Useful after deployments to ensure visitors see the latest content.

Dotnet (7)

Dotnet.Build Compile a project with optional configuration.
Dotnet.Project Creates a reference to a .NET project file (.csproj). Used with Dotnet and Ef operations.
Dotnet.Publish Create deployment artifacts with full publish options.
Dotnet.Restore Restore NuGet packages for a project.
Dotnet.SdkInstall Install .NET SDK globally in the container. Skips installation if already present (for warm containers). Use when building on base images like Ubuntu that don't have .NET pre-installed.
Dotnet.Test Run unit tests for a project.
Dotnet.Tool Create a reference to a .NET CLI tool for installation.

EF Core (5)

Ef.AddMigration Create a new EF Core migration.
Ef.DatabaseUpdate Apply pending EF Core migrations to the database. Can accept a connection string or an OutputRef from a Bicep deployment.
Ef.DbContextFrom Create a reference to a DbContext in a project.
Ef.RemoveMigration Remove the last migration.
Ef.Script Generate an idempotent SQL migration script.

Functions (7)

Functions.DeployWithSwap Deploy to a slot then swap to production (zero-downtime).
Functions.DeployZip Deploy a function app using zip deploy.
Functions.Publish Publish using Azure Functions Core Tools.
Functions.Restart Restart a function app.
Functions.Start Start a function app.
Functions.Stop Stop a function app.
Functions.SwapSlots Swap deployment slots.

Node (1)

Node.Install Install Node.js globally in the container. Skips installation if already present (for warm containers).

Npm (5)

Npm.Build Run 'npm run build'.
Npm.Ci Run 'npm ci' for clean, reproducible installs (preferred for CI).
Npm.Install Run 'npm install' to install dependencies.
Npm.Run Run an npm script from package.json.
Npm.Test Run 'npm test'.

NuGet (3)

Nuget.EnsureAuthenticated Ensures NuGet API key is available for publishing. Prompts interactively if NUGET_API_KEY environment variable is not set. Call before Push.
Nuget.Pack Create a NuGet package from a project. Defaults: Release config, output to bin/Release.
Nuget.Push Push packages to a feed. Pass a ProjectRef to push from bin/Release/*.nupkg, or a path/glob. Defaults: NuGet.org, skip duplicates (won't fail if version already exists).

67 operations