Command Summary
There are three categories of CLI Commands:
- Administrative and Template Management
- Core Element Commands
- Element-Specific Commands
note
You can type help to see a list of all commands. You can also type help {commandName} to see the syntax for that specific command.
template-cli:> help
AVAILABLE COMMANDS
Built-In Commands
help: Display help about available commands
stacktrace: Display the full stacktrace of the last error.
clear: Clear the shell screen.
quit, exit: Exit the shell.
history: Display or save the history of previously run commands
version: Show version info
script: Read and execute commands from a file.
.....
template-cli:> help add-element
NAME
add-element - Add Element
SYNOPSIS
add-element --type String --elementName String
OPTIONS
--type String
Element type e.g label, image, spinner etc
[Optional]
--elementName String
name of the newly created element
[Optional]
caution
This guide does not detail the built-in CLI commands as these are common to all CLI tools.
Command List
- Administrative
- Core
- Specific
These are commands used to manage templates, or to start the text editor.
| Command | Usage | Command | Usage |
|---|---|---|---|
add-template | Creates a new template | setup-cps-connection | |
show-template | Shows a specific template. | show-templates | Shows all templates |
select-template | Selects an existing template to edit. | load-template | Loads a previously saved template by filename or hex value. |
delete-all-templates | Deletes all template files in the directory. | delete-template | Deletes a specified template |
save-json | Saves the template as a JSON file. | save-template | Saves the current template, and outputs its Hex value. |
start-text-editing | Begins the text editor watcher in the specified or current folder. | stop-text-editing | Stops the text editor watcher |
| Command | Usage | Command | Usage |
|---|---|---|---|
add-element | Creates an element of the stated type and name. | delete-element | Deletes the named element. |
set-element-alignment | Sets the alignment of an element e.g. Left or Center. | disabled-element | Sets the disabled property. |
size-element | Sets the height and width of an element | rename-element | Changes an element name |
align-element | Aligns an element to another. | set-parent-element | Sets an elements Parent element. |
set-element-color-ref | Sets the main element color to a predefined theme color. | set-element-color | Sets the main element color to a specific color. |
set-element-background-color-ref | Sets the background element color to a predefined theme color. | set-element-background-color | Sets the background element color to a specific color. |
floating-element | Sets the floating property. | clickable-element | Sets the clickable property. |
hide-element | Sets the Hide property. | set-value | Sets the value property. |
move-element | Sets the X & Y position of the element. | swap-element-position | Exchanges position data with another template. |
move-element-back | Defines the order this element is rendered (last). | move-element-start | Defines the order this element is rendered (first). |
edit-style | Defines multiple element styling properties. | delete-style | Deletes an element style |
Several elements have specific commands that relate to them directly, as shown below.
Button
| Element | Command | Usage |
|---|---|---|
button | add-element-to-button | Adds an existing element to a button e.g. a label. |
Button Array
| Element | Command | Usage |
|---|---|---|
button-array | edit-button-array | Edits a button array element. |
Container
| Element | Command | Usage |
|---|---|---|
container | edit-container | Edits a container element. |
add-element-to-container | Adds an existing element to a container e.g. a label or button. | |
remove-element-from-container | Removes an element from a container e.g. a label or a button. |
Label
| Element | Command | Usage |
|---|---|---|
label | edit-label | Edits a label element. |
Progress Bar
| Element | Command | Usage |
|---|---|---|
progress | edit-progress | Edits a progress bar element. |
QR Code
| Element | Command | Usage |
|---|---|---|
qr | edit-qr | Edits a qr element. |
Spinner
| Element | Command | Usage |
|---|---|---|
spinner | edit-spinner | Edits a spinner element. |
Animation
| Element | Command | Usage |
|---|---|---|
animation | edit-animation | Edits or creates an animation for an element. |
delete-animation | Deletes a specified animation. | |
delete-all-animations | Deletes a sanimations for a specified element. |