Squirro Widget CLI Reference#
The squirro_widget
command line tool, part of the Squirro Toolbox, is used to manage custom widgets on a Squirro cluster.
You can use the Squirro asset tool to upload and list custom widgets consistently with other types of custom code “assets”.
Basic Usage#
The squirro_widget command is used on the command line. It takes many connection options first (--cluster
and --token
), followed by a command (list
in the example below) and depending on the command additional options after it.
squirro_widget \
--token SQUIRRO_TOKEN \
--cluster https://next.squirro.net \
list
Arguments#
The following table lists all the arguments.
Argument |
Mandatory |
Description |
General Options |
||
-h |
Show a help message and exit. |
|
–version |
Output the tool version and exit. |
|
–verbose, -v |
Increase log verbosity.
|
|
–log-file |
Path to a log file on disk, where the log output is to be stored. If this is not specified, the log messages are shown on the console. |
|
Connection Options |
||
–token TOKEN -t TOKEN |
Yes |
The Authenticating Token with which to authenticate.
If the token value starts with a dash, you need to use an equal sign to specify the value like this: |
–cluster URL
-c URL
|
The Squirro cluster into which to load the widget. |
Commands#
The command is given as an argument after all the previous options. There are two supported commands:
list:
Lists all the custom widgets that have been configured on the server.upload:
Uploads a new or modified custom widget.
List#
This command lists all the custom widgets that have been configured on the server.
The list
command does not take any additional options beyond the default arguments.
An example:
squirro_widget \
--token SQUIRRO_TOKEN \
--cluster https://next.squirro.net \
list
Upload#
The upload command uploads a custom widget from the local disk and uploads it to the Squirro cluster. This command takes additional options beyond the default arguments.
Argument |
Mandatory |
Description |
||||||||||||
–config |
Yes |
A JSON representation of the configuration for the widget. The following keys are possible:
|
An example:
squirro_widget \
--cluster https://next.squirro.net \
--token $TOKEN \
upload \
--config '{"directory": "clock", "title": "Clock", "baseWidget": "Base", "author": "Developer Name", "description": "Displays a clock"}'