Sifflet CLI - Command Line Interface
The Sifflet CLI is a tool that enables you to interact with the Sifflet application using commands in your command line shell.
With minimal configuration the Sifflet CLI enables you to run commands that implement functionality equivalent to that provided by the browser-based Sifflet application from the command prompt in your terminal program.
To see all available commands of Sifflet's CLI, please refer to this page.
Getting Started
Prerequisites
API Token
In order to configure your CLI, you will need an API token. You can see here how to generate one .
- Python 3.7 or greater
- Your tenant name: if you access to Sifflet with
<https://abcdef.siffletdata.com
>, then your tenant would beabcdef
- A Sifflet API access token
Installation
Open a terminal and verify you have installed Python correctly via python -V
. Ensure you have v3.7 or greater.
Install sifflet CLI
pip install sifflet
Confirm the installation with the following command
$ sifflet --version
sifflet, version x.x.x
Upgrade
Upgrade your existing Sifflet CLI installation using
pip install sifflet --upgrade
Configuration
Before using the Sifflet CLI, you need to set your tenant and credentials. You can do it in several ways:
- Sifflet command line
sifflet configure
(which will persists configuration in a file) - Or with environment variables
Sifflet configure
You can input the tenant and credentials directly with the sifflet configure
command
$ sifflet configure
Your tenant name [None]: <my_tenant>
Your API access token [None]: <my_secret_token>
The use of sifflet configure will persist the configuration in a file located at ~/.sifflet/config.ini
(or in %UserProfile%\.sifflet/config.ini
on Windows).
Environment variables
To use environment variables, you can do the following:
$ export SIFFLET_TENANT=<my_tenant>
$ export SIFFLET_TOKEN=<my_secret_token>
You can check that setup is done correctly with sifflet status
$ sifflet status
Sifflet version = x.x.x
Tenant = my_tenant
Tenant is up and reachable
Token expiration date = 2024-01-01 00:00:00
Token is valid with scope API
Status = OK
If you encounter any error at this step, please check your tenant and token configurations.
Help
The --help option is available for any command.
For instance:
sifflet --help
Or for a specific command:
sifflet rules list --help.
Updated 8 months ago