recipe

Parameters:
Name Type Required Default Hint
recipeFile string true The name of the recipe file to execute including extension. Alternatively, text commands to direct execute.

Command Usage

The recipe commands allows you to execute a collection of CommandBox commands
usually in a file.boxr recipe file. CommandBox will iterate and execute each
of the commands for you in succession. Lines that start with a # followed by whitespace will be ignored as comments.

recipe myRecipe.boxr
You can also bind the recipe with arguments that will be replaced inside of your recipe.
Pass any arguments as additional parameters to the recipe command.
Named arguments will be accessible inside the recipe as system settings ${arg1Name}, ${arg2Name}, etc.
Positional args will be available as ${1}, ${2}, etc.

Recipe will receive ${name} and ${action}
recipe recipeFile=buildSite.boxr name=luis action=create
Recipe will receive ${1} and ${2}
recipe buildSite.boxr luis create
System settings which are not found, are replaced with a space. Remember, you can default then as ${name:default}

You can use "echo on" and "echo off" in recipes to control whether the commands output to the console as they are executed.
This can be useful for debugging or confirming the success of commands with no output. Echo is on by default.
Note, "echo off" doesn't suppress the output of the commands, just the printing of the command and its arguments prior to execution.
This does not use the actual "echo" command and is a feature that only applies during the execution of recipes.
echo on

# Now you see me
echo off
# Now you don't
If you have one or more commands to execute which are not contained in a file, but are in a variable or being output
from another command, you can simply pass the commands in directly. The your input does not match a file on the
file system, the recipe command will attempt to execute your input directly as commands
set cmd="package show"

recipe ${cmd}
env show cmd | recipe