CLI Productivity Tools
Once you're comfortable with CLI basics, these commands help you work faster: shortcuts for commands you type often, searching for the right command, generating example syntax, watching output live, and running batches of commands from a file. All of these are CLI/API concepts with no web interface equivalent.
Aliases
An alias is your own shortcut for a longer command. A plain alias is just a nickname — typing myalias runs whatever full command it's set to. An alias can also take variables: prefix a word with $ in both the alias and the command it runs, and whatever you type in that position at the alias's call site is substituted into the real command.
Creating an alias
Using the CLI
aliases create --alias=<text> --command=<text>
| Option | Description |
|---|---|
--alias=<text> |
The alias text. Prefix a word with $ to declare it as a variable. |
--command=<text> |
The command the alias runs. Must use the same $ variables as --alias. |
Examples
A plain alias with no variables:
aliases create --alias "myvols" --command "applications volumes list"
A parameterized alias — list-app $app becomes applications volumes list --application $app, so typing list-app training runs applications volumes list --application training:
aliases create --alias "list-app $app" --command "applications volumes list --application $app"
Listing aliases
Using the CLI
aliases list
This command takes no parameters — it shows every alias currently defined.
Deleting an alias
Using the CLI
aliases delete --all|--alias=<text>
| Option | Description |
|---|---|
--all |
Delete all aliases. |
--alias=<text> |
The alias to delete. |
Example
aliases delete --alias "myvols"
Exporting and importing aliases
Export writes your current alias set to a fixed file, Aliases.JSON in an Aliases folder alongside the CLI; import reads that same file back in, adding its aliases to whatever you currently have defined. Use these to back up your aliases before an upgrade, or to carry the same shortcuts to another CLI installation by copying that file across.
Using the CLI
aliases export
aliases import
Neither command takes parameters.
Searching for commands
If you're not sure of a command's exact path or options, search across every command's path, usage syntax, and options text at once, rather than hunting through documentation.
Using the CLI
search <text> [--beforeContext=<numbers> --afterContext=<numbers>]
| Option | Description |
|---|---|
<text> |
Search this text across all commands. |
--beforeContext=<numbers> |
Number of characters to include before the match. Default 10. |
--afterContext=<numbers> |
Number of characters to include after the match. Default 10. |
Example
search capacity
Generating command examples
Rather than working out a command's syntax from scratch, generate a realistic, valid example invocation for it — useful while learning a new command, or as a starting point you can edit. You can also convert the generated example into its REST API equivalent, which is a quick way to see how a CLI command you already know translates into an API call.
Using the CLI
examples generate --command=<text>|--all [--count=<numbers>] [--convertToRest]
| Option | Description |
|---|---|
--command=<text> |
Generate examples for this command. |
--all |
Generate examples for all commands. |
--count=<numbers> |
Number of examples to generate per command. |
--convertToRest |
Convert examples to REST requests. |
Examples
Generate one example for a specific command:
examples generate --command "applications volumes create"
Generate the REST API equivalent of that same command:
examples generate --command "applications volumes create" --convertToRest
Watching a command's output
Re-runs a Get (read-only) command repeatedly at a fixed interval, printing the latest output each time — a lightweight way to keep an eye on something changing in real time (job progress, capacity climbing during a large copy, and so on) without re-typing the command yourself.
Using the CLI
watch --command=<text> [--interval=<numbers>]
| Option | Description |
|---|---|
--command=<text> |
The get command to run. |
--interval=<numbers> |
Seconds to wait between iterations. Default: 1. |
Example — check job status every 5 seconds:
watch --command "configurations session list" --interval 5
Running commands from a script
Runs a text file of CLI commands, one per line, in order — the same as typing them in one after another. This is the basis for batch automation and repeatable runbooks: build up a sequence of commands once, save it as a file, and run the whole thing with one command.
Scripts can also be templated: reference a token as $TOKEN_NAME or @TOKEN_NAME@ in the script file, then supply the actual values at run time with --tokensToValues, so the same script file can be reused against different systems, names, or environments. If the script's first lines document a token with #$TOKEN_NAME:Some description (or #@TOKEN_NAME@:Some description), that description is shown if you forget to supply a value for it.
Using the CLI
scripts --path=<path> [--ignoreErrors] [--captureOutput] [--tokensToValues=<text...>]
| Option | Description |
|---|---|
--path=<path> |
Absolute path to the command script to be executed. |
--ignoreErrors |
Execute all commands, ignoring errors. If omitted, abort on the first command error. |
--captureOutput |
Capture and return all output after completion of all commands. Do not write output to the console as commands are executed. |
--tokensToValues=<text...> |
Specify tokens in the script file and their replacement values using the syntax TOKEN1::VALUE. For example: SYSTEM1_NAME::7241,SYSTEM2_NAME::7242. In the script, refer to a token as $TOKEN_NAME or @TOKEN_NAME@. |
Examples
Run a script, stopping at the first error:
scripts --path "C:\scripts\provision-app.s1"
Run a templated script, substituting values for two tokens it references:
scripts --path "C:\scripts\provision-app.s1" --tokensToValues "APP_NAME::sales,POOL_NAME::HDD-1"
See also: CLI Basics · Configurations — checking on the jobs a script submits.
No comments to display
No comments to display