Skip to content

Reference | Command Line

olegz edited this page Mar 16, 2026 · 3 revisions

Command-line interface

Xake scripts accept arguments after a double -- separator — once for dotnet fsi and once for Xake:

dotnet fsi build.fsx -- -- [options] [targets...]

Examples

# Run default target
dotnet fsi build.fsx

# Run specific targets sequentially
dotnet fsi build.fsx -- -- clean build test

# Run targets in parallel using semicolons
dotnet fsi build.fsx -- -- build;test

# Pass variables
dotnet fsi build.fsx -- -- build -d Version=1.2.3

# Dry run
dotnet fsi build.fsx -- -- build --dryrun

Options

Flag Description
-h, --help Display help screen including typed variable schema
-t <count> Number of parallel worker threads. Default: CPU core count
-r <path> Override the project root path. Default: current directory
-ll <level> Console log level
-fl <path> Log file path
-fll <level> Log file verbosity level
-d <name>=<value> Define a script variable
--dryrun Print dependency graph and time estimates without building
--dump Print recorded dependency graph from last build
--resetdb Reset the build database before starting
--progress, -p Display progress indicator
--noprogress, -p- Disable progress indicator
-nologo Suppress the version banner

Log levels

Silent, Quiet, Normal, Loud, Chatty, Diag

Target execution order

Targets listed as separate arguments run sequentially:

dotnet fsi build.fsx -- -- build test deploy

Use semicolons to run targets in parallel:

dotnet fsi build.fsx -- -- build;test deploy

Here build and test run in parallel, then deploy runs after both complete.

If parallel targets have dependencies between them, Xake serializes the dependent ones automatically.

Variables

Pass variables with -d:

dotnet fsi build.fsx -- -- build -d Version=1.2.3 -d Config=Release

Both = and : separators work: -d Version=1.2.3 and -d Version:1.2.3.

When a script uses typed variables with varschema, --help lists all declared variables:

Script variables:
  -d Config=<value> [string], default: "Debug" — Build configuration
  -d Version=<value> [string] (required)
  $NUGET_KEY [string] — NuGet API key

Build database

The .xake file in the project root stores the dependency graph and build state. It enables incremental builds by skipping targets whose dependencies have not changed.

  • --dryrun — shows what would be rebuilt based on current state
  • --dump — shows all recorded dependencies from the last build
  • --resetdb — clears the database, forcing a full rebuild

Delete .xake manually if you observe stale build behavior after changing your script.

Clone this wiki locally