Usage
Usage
Terrabuild’s interface is the CLI (Command Line Interface). If you need help with any command, just append --help and detailed 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.
serve <options> Serve 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. This is the primary command for building your workspace:
> terrabuild run --help
USAGE: terrabuild run [--help] [--workspace <path>] [--configuration <name>] [--environment <name>] [--variable <variable>=<value>] [--label [<labels>...]]
[--project [<projects>...]] [--force] [--retry] [--parallel <max>] [--local-only] [--note <note>] [--tag <tag>] [--container <tool>] [--what-if] <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.
--environment, -e <name>
Environment to use.
--variable, -v <variable>=<value>
Set variable.
--label, -l [<labels>...]
Select projects based on labels.
--project, -p [<projects>...]
Select projects based on id.
--force, -f Ignore cache when building target.
--retry, -r Retry failed task.
--parallel <max> Max parallel build concurrency (default to number of processors).
--local-only Use local cache only.
--note <note> Note for the build.
--tag <tag> Tag for build.
--container <tool> Container Tool to use (docker or podman).
--what-if Prepare the action but do not apply.
--help display this list of options.Clear Local Cache
Command clear allows you to clear local cache. This is useful when you want to force a complete build or free up disk space:
> 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 you to connect to a shared cache (Insights workspace) - which tremendously accelerates build time by sharing build artifacts across machines and CI/CD pipelines.
> terrabuild login --help
USAGE: terrabuild login [--help] --workspace <id> --token <token>
OPTIONS:
--workspace <id> Workspace Id to connect to
--token <token> Token to connect to space
--help display this list of options.Last updated on