githubEdit

Commands

Commands

CommandBox uses its own command parser that should be similar to what you're used to in other shells. Commands are not case-sensitive and don't contain any special characters except an occasional dash (-). Each command and its parameters will be entered on a single line. Press enter when you are done typing to execute that command. If you ever need to include a line break in a parameter value, quote the value and use the \n escape sequence.

For a full list of all the commands that ship with CommandBox as well as all their parameters and samples, please visit our Command API docsarrow-up-right which are auto-generated each build.

Namespaces

To help organize our commands, we introduced the concept of namespaces. this means that commands can contain spaces and be comprised of more than one word. This is to keep things readable. Several commands that are all related will start with the same word, or namespace. An example of this is the artifactsarrow-up-right namespace. It contains several commands inside of it including listarrow-up-right, cleanarrow-up-right, and removearrow-up-right. Calling each of them would look like this:

artifacts list
artifacts clean
artifacts remove

Hint the text artifacts itself is not a command and you will receive an error if you hit enter after just typing that text. Context-specific help is available for all namespaces by typing help after the namespace.

artifacts help

Namespaces can be more than one level. Another example would be coldbox createarrow-up-right which contains commands such as apparrow-up-right, viewarrow-up-right, and handlerarrow-up-right.

coldbox create handler

Aliases

Commands can be aliased so you can call them more than one way, ever wanted to run an ls command in Windows or a dir command in Unix? . Check the Command API docsarrow-up-right or the CLI help command to see if a command has aliases. For instance, the quitarrow-up-right command is aliases as q for quick typing. Another example would be the package initarrow-up-right command that is aliased to just init.

Last updated

Was this helpful?