Skip to content

hook

Description

Manage hooks. Hooks are commands that are executed before or after a specific command.

Usage

bash
buildcli hook [subcommands] <args>

Subcommands

OptionDescription
addAdd a hook to a command. Args: [before/after] "[command]" "[hookCommand]"
removeRemove a hook from a command. Args: [before/after] "[command]"
listRemove a hook from a command. No args are needed.

Examples

Example 1

This will execute 'project clean' before 'project build'. You can use b as an alias for before and a for after.

bash
buildcli hook add b "project build" "project

Example 2

This will remove any command that run after 'project build'

bash
buildcli hook remove a "project build"

Example 3

This will display all registered hooks and their associated commands.

bash
buildcli list

See Also