Choose your installation method
Kosli CLI can be installed from package managers,
by Curling pre-built binaries, or can be used from the distributed Docker images.
- Script
- Docker
- Homebrew
- APT
- YUM
- curl
- From source
You can download the correct Kosli CLI for your platform, given that you can run shell scripts on it, by invoking this one-line script:
Using the CLI
The CLI Reference section contains all the information you may need to run the Kosli CLI. The CLI flags offer flexibility for configuration and can be assigned in three distinct manners:- Directly on the command line.
- Via environment variables.
- Within a config file.
Assigning flags via environment variables
To assign a CLI flag using environment variables, generate a variable prefixed with KOSLI_. Use the flag’s name in uppercase and substitute any internal dashes with underscores. For instance:--api-tokencorresponds toKOSLI_API_TOKEN--orgcorresponds toKOSLI_ORG
Assigning flags via config files
A config file is an alternative to using Kosli flags or environment variables. You could use a config file for the values that rarely change - like API token or org, but you can represent all Kosli flags in a config file. Each key in the config file corresponds to the flag name, capitalized. For instance:--api-tokenwould becomeAPI-TOKEN.--orgwould becomeORG.
kosli.<yaml/yml/json/toml>
Below are examples of different config file formats:
--config-file flag you can skip the file extension. For example,
to list environments with org and api-token in the configuration file you would run: