Command Line Interface for interaction with a Simvue v3 server
Project description
Simvue CLI
Simvue CLI is a command line interface for interacting with a Simvue server instance. The tool is designed to aid in performing more basic operations compared to the Simvue Python API which should be used instead for more complicated parsing of data and execution of simulations.
- Modifying Simvue configuration
- Retrieving and creating runs
- Retrieving folders
- Monitoring stdout
- Creating user alerts
- Clearing local files
- Version information
- Plain output
- Checking server status
- Citation
Modifying Simvue configuration
You can use Simvue CLI to simplify modification of the Simvue configuration files, to set the server URL:
simvue config server.url <server-url>
and to update the token for this server:
simvue config server.token <server-token>
By default these settings are applied a configuration file located within the current working directory. To instead set these settings globally use the --global flag.
Retrieving and creating runs
Run interaction is performed using the run subcommand.
Listing runs
To list all runs on the server use:
simvue run list
By default this will be limited to 20 runs, this behaviour can be changed by using the --count option.
Adding output columns
Additional information can be displayed by using the relevant flag:
simvue run list --tags --name
The full list of available flags is given by running with --help.
Formatting the output
By default the output is not formatted, Simvue CLI makes use of the tabulate module to improve displaying of results, simply use the --format option to select from all possibilities, a full list is given under --help:
simvue run list --format rounded_outline
Display run info
You can retrieve all information from a run as a JSON string, use of jq to query this output is recommended:
simvue run json <run-id> | jq
The json command is also designed to support piping, we can retrieve the latest run and query it:
simvue run list --count 1 | simvue run json | jq
Creating runs
To create a run execute:
simvue run create
this will return the unique run identifier.
Logging metrics and events
Events and metrics can be logged to a created run, for metrics the input is expected to be a JSON parsible string:
simue run log.metrics <run-id> "{'x': 1, 'y': 2}"
For events the input is just the event message as a string:
simvue run log.event <run-id> "Hello World!"
Terminating runs
Make sure to close your runs! The following commands close or abort the run:
simvue run close <run-id>
simvue run abort <run-id>
Retrieving Folders
Folders can be retrieved in a similar manner to runs.
simvue folder list
By default the output is not formatted, Simvue CLI makes use of the tabulate module to improve displaying of results, simply use the --format option to select from all possibilities, a full list is given under --help:
simvue folder list --format rounded_outline
Monitoring stdout
In the rare case where a program writes out only delimited data you can directly log this output as metrics. For example taking the simple bash script:
# Firstly echo headers
echo -e "x\ty"
# Now the data
for i in {1..10}; do
echo -e "$i\t$((i * 2))"
sleep 1
done
We could send this data direct to Simvue:
bash my_script.sh | simvue monitor
Creating user alerts
User (or manually triggered) alerts can be created on the command line:
simvue alert create "my_alert"
The additional options --email and --abort define if triggering of the alert sends an email notification and whether when the alert is triggered an abort is called respectively.
Clearing local files
The command purge will remove all local Simvue files:
simvue purge
Version information
Aside from the standard --version flag to the simvue command you can view also the API and server versions via:
simvue about
Plain output
In cases where terminal colors or formatting are unavailable you can instead run with the --plain option applied to the main simvue command, e.g.:
simvue --plain run list
Checking server status
Server response can be check using the ping command:
simvue ping
Citation
If using Simvue please cite under the information found on the Python API repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simvue_cli-1.4.0.tar.gz.
File metadata
- Download URL: simvue_cli-1.4.0.tar.gz
- Upload date:
- Size: 193.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b74f5de41f52e2575f7959c3eb3471c8e002014fa13de30094e45439365c340
|
|
| MD5 |
8aa26df0c89a26cf9cab42895ae1d14e
|
|
| BLAKE2b-256 |
97c4106da299bd1abb38511f45852f7eb24f21a11235485b5dd03654fbd6d6dc
|
Provenance
The following attestation bundles were made for simvue_cli-1.4.0.tar.gz:
Publisher:
deploy.yaml on simvue-io/simvue-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simvue_cli-1.4.0.tar.gz -
Subject digest:
2b74f5de41f52e2575f7959c3eb3471c8e002014fa13de30094e45439365c340 - Sigstore transparency entry: 1173349550
- Sigstore integration time:
-
Permalink:
simvue-io/simvue-cli@3f8459f1a7cfb43f0c1406d08073b7c5ac24e2cf -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/simvue-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@3f8459f1a7cfb43f0c1406d08073b7c5ac24e2cf -
Trigger Event:
push
-
Statement type:
File details
Details for the file simvue_cli-1.4.0-py3-none-any.whl.
File metadata
- Download URL: simvue_cli-1.4.0-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27319124838b2b414409be6f80f940bbc3bb5ba2c09b40ae496312b0ade8d12d
|
|
| MD5 |
849a847efe23900615d8e0d74cb6a9a1
|
|
| BLAKE2b-256 |
d17a2bf90d26d4cd21c06a4b982ab54bb524418973eb0d2bba6ed2f00c4ca5d3
|
Provenance
The following attestation bundles were made for simvue_cli-1.4.0-py3-none-any.whl:
Publisher:
deploy.yaml on simvue-io/simvue-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simvue_cli-1.4.0-py3-none-any.whl -
Subject digest:
27319124838b2b414409be6f80f940bbc3bb5ba2c09b40ae496312b0ade8d12d - Sigstore transparency entry: 1173349688
- Sigstore integration time:
-
Permalink:
simvue-io/simvue-cli@3f8459f1a7cfb43f0c1406d08073b7c5ac24e2cf -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/simvue-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@3f8459f1a7cfb43f0c1406d08073b7c5ac24e2cf -
Trigger Event:
push
-
Statement type: