Basic Usage
The BRICK CLI provides a simple and intuitive interface for building and managing your projects. All commands follow a consistent pattern.
brick [GLOBAL_OPTIONS] <COMMAND> [COMMAND_OPTIONS] [ARGUMENTS]
Get help for any command by using the --help
flag:
# Examples
brick --help # General help
brick run --help # Help for the 'run' command
brick gen --help # Help for the 'gen' command
Global Options
These options can be used with any BRICK command and must appear before the command name.
--version, -V
Display the BRICK version and exit.
brick --version
--help, -h
Display help information and exit.
brick --help
Commands
run
Executes a build target, downloading sources, installing dependencies, and compiling the program.
brick run [OPTIONS] [TARGET]
Arguments
TARGET
- The target to build. If omitted, builds all targets.
Options
-o, --output <DIR>
- Output directory for build artifacts
# Examples
brick run hello # Build 'hello' target
brick run hello -o ./dist # Build to specific directory
gen
Generates build scripts without executing them. Useful for debugging or when you want to review the generated build process.
brick gen [OPTIONS] [TARGET]
Arguments
TARGET
- The target to generate scripts for. If omitted, generates for all targets.
# Examples
brick gen hello # Generate scripts for 'hello'
brick gen hello -o ./scripts # Generate to specific directory
init
Creates a new BRICK project in the specified directory with template files to get you started.
brick init [OPTIONS] [DIRECTORY]
Arguments
DIRECTORY
- Directory to create project in (default: current directory)
# Examples
brick init my-project # Create basic project