CLI reference¶
Note
This documentation is auto-generated from the command line.
now¶
now - Nix-based distributed command runner. Examples: # Initialize a basic workflow in ./now.nix now init # Load envvars from a dotenv file and run the default job(s) now run --env-file .env # Run the "deploy" job (and all dependencies) from the specified workflow, # and specify a remote builder for the run now run deploy \ --builders "ssh://mac aarch64-darwin" \ --workflow .now/remote.nix # Abort immediately on the first failing job, # and don't checkout the current directory now run --abort --checkout none Usage: now <COMMAND> Commands: init Initialize a basic workflow list List the jobs available in the workflow eval Evaluate a workflow, printing its JSON representation run Run one or more jobs help Print this message or the help of the given subcommand(s) Options: -h, --help Print help (see a summary with '-h') -V, --version Print version
now init¶
Initialize a basic workflow Usage: now init [WORKFLOW] Arguments: [WORKFLOW] Path to the workflow Options: -h, --help Print help
now list¶
List the jobs available in the workflow
Usage: now list [OPTIONS]
Options:
-w, --workflow <FILE>
Path to the workflow.
Cannot be used together with the `--flake` option.
-f, --flake <FLAKE[#ATTR]>
Path to the flake and an optional attribute (defaults to the `now` output).
Cannot be used together with the `--workflow` option.
-e, --env-file <FILE>
Optional dotenv file to read environment variables from
-c, --cwdir <CWDIR>
In which directory to evaluate the workflow
-t, --tree
Whether to print jobs as a graphviz-compatible .dot tree graph
-h, --help
Print help (see a summary with '-h')
now eval¶
Evaluate a workflow, printing its JSON representation
Usage: now eval [OPTIONS]
Options:
-w, --workflow <FILE>
Path to the workflow.
Cannot be used together with the `--flake` option.
-f, --flake <FLAKE[#ATTR]>
Path to the flake and an optional attribute (defaults to the `now` output).
Cannot be used together with the `--workflow` option.
-e, --env-file <FILE>
Optional dotenv file to read environment variables from
-c, --cwdir <CWDIR>
In which directory to evaluate the workflow
-h, --help
Print help (see a summary with '-h')
now run¶
Run one or more jobs
Usage: now run [OPTIONS] [JOB]...
Arguments:
[JOB]...
Jobs to target in this run. Unix-style globs are supported.
If unspecified, the default jobs of the workflow are run.
Cannot be used together with the `--all-jobs` option.
Options:
-w, --workflow <FILE>
Path to the workflow.
Cannot be used together with the `--flake` option.
-f, --flake <FLAKE[#ATTR]>
Path to the flake and an optional attribute (defaults to the `now` output).
Cannot be used together with the `--workflow` option.
--dry-run
Don't realize derivations or run jobs.
Useful for debugging workflows before running them.
--all-jobs
Run all jobs in the workflow.
Cannot be used together with any `[JOB]` arguments.
-e, --env-file <FILE>
Optional dotenv file to read environment variables from
--gcroot-dir <DIR>
Directory where Nix GC roots for realized steps are kept.
Defaults to a temporary directory removed when `now` exits.
--abort
Immediately abort on the first job failure
--timeout <DURATION>
Timeout for the entire workflow, eg. `1h`
-c, --cwdir <CWDIR>
In which directory to run the workflow.
Defaults to the current directory if --workflow is set, and the directory that `now.nix` is in otherwise
--builders <BUILDERS>
A semicolon-separated list of build machines. When specified, overrides the remote builders configuration of the host.
Cannot be used together with the `--local-only` option.
For more information on the syntax, see: <https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-builders>
--cores <CORES>
How many simultaneous jobs to use for local builds.
Defaults to the number of physical cores in the current machine.
Cannot be used together with the `--remote-only` option.
--local-only
When specified, ignores the remote builders configuration of the host, running all jobs in the local builder.
Jobs that cannot run in the local builder will fail.
Cannot be used together with either the `--builders` or `--remote-only` options.
--remote-only
When specified, runs all jobs in remote builders, only using the local runner for job orchestration.
Cannot be used together with either the `--cores` or `--local-only` options.
--skip
When specified, skips jobs that don't match any builders or runners and their dependencies, instead of failing
--tracing
Whether to emit traces in Duper instead of colored logs.
For more information on Duper: <https://duper.dev.br>
-h, --help
Print help (see a summary with '-h')