Usage

Terrabuild interface is the CLI. If you need help, just append --help and more information will be provided.

> terrabuild --help
USAGE: terrabuild [--help] [version] [<subcommand> [<options>]]

SUBCOMMANDS:

    scaffold <options>    Scaffold workspace.
    logs <options>        dump logs.
    run <options>         Run specified targets.
    clear <options>       Clear specified caches.
    login <options>       Connect to backend.
    logout <options>      Disconnect from backend.

    Use 'terrabuild <subcommand> --help' for additional information.

OPTIONS:

    version               Show current Terrabuild version.
    --help                display this list of options.

Run target

Command to run one or more targets:

> terrabuild run --help
USAGE: terrabuild run [--help] [--workspace <path>] [--configuration <name>] [--variable <variable>=<value>] [--label [<labels>...]] [--parallel <max>]
                      [--nocontainer] [--force] [--retry] [--localonly] [--checkstate] [--note <note>] [--tag <tag>] [--logs] [--whatif] <target>...

TARGET:

    <target>...           Specify build target.

OPTIONS:

    --workspace, -w <path>
                          Root of workspace. If not specified, current directory is used.
    --configuration, -c <name>
                          Configuration to use.
    --variable, -v <variable>=<value>
                          Set variable.
    --label, -l [<labels>...]
                          Select projects based on labels.
    --parallel, -p <max>  Max parallel build concurrency (default to number of processors).
    --nocontainer, -nc    Ignore containers on extensions
    --force, -f           Ignore cache when building target.
    --retry, -r           Retry failed task.
    --localonly, -lo      Use local cache only.
    --checkstate, -cs     Ensure external state is valid.
    --note, -n <note>     Note for the build.
    --tag, -t <tag>       Tag for build.
    --logs                Output logs for impacted projects.
    --whatif              Prepare the action but do not apply.
    --help                display this list of options.

Clear local cache

Command clear allows one to clear local cache:

> terrabuild clear --help
USAGE: terrabuild clear [--help] [--cache] [--home] [--all]

OPTIONS:

    --cache               Clear build cache.
    --home                Clear home cache.
    --all                 Clear all caches.
    --help                display this list of options.

Connect to a shared cache

Command login allows one to connect to a shared cache - which tremendously accelerates build time.

> terrabuild login --help
USAGE: terrabuild login [--help] --space <space> --token <token>

OPTIONS:

    --space <space>       Slug of space to connect to
    --token <token>       Token to connect to space
    --help                display this list of options.
Last updated on