Basic Usage
Basic usage of the CLI application
Authentication
The first time the cuica
CLI application is run, the config
subcommand is used
to configure the initial connection parameters:
$ cuica config --reset
Config file not found, please enter the following details:
◦ Hostname: my-cuica
◦ Have Root CA (no): yes
◦ Root CA Path: /home/you/cert-bundle.pem
◦ Username: someone
◦ Password:
Connected to cuica, version: 1.2.3
These configuration settings are stored in the ~/.cufig
file by default. When
using the interactive configuration method, the cuica
CLI application will log
into the Cuica using the provided credentials and obtain a one-hour token. To
use a longer-lasting token, use the web interface to generate one and store that
in the configuration. Note that neither the username nor the password is stored
in the cufig file.
cuica config
default to 1 hour expirationScripting
For non-interactive use, e.g. from a CI/CD pipeline, the following environment
variables can be used to override the values found in the cufig
file.
CUICA_API_TOKEN
- API token generated manually via web interfaceCUICA_API_HOSTNAME
- Default hostname of the CuicaCUICA_CONFIG_PATH
- Where the configuration data will be stored (default: ~/.cufig)
Usage
The cuica
CLI application has integrated help:
Since it's in its early stages, the Cuica CLI Application and its subcommands closely follow the REST API, so refer to that for additional information.
Further Examples
Read Current GPIO State
This command reads the current GPIO state:
Show Test Script Info
These commands retrieve all the Test Scripts in the Test Script Bank, and then retrieves the details of one of them:
Run Test Script One-Liner
This illustrates running a Test Script on the Fixture right from the command-line. This lights the debug LED on the Squeak Board:
Run Test Script File
This example shows running a Test Script on the Fixture directly from a file containing a divide-by-zero error: