snowplow-cli
means to bring Snowplow Console into the command line
Snowplow CLI is available for Snowplow BDP clients
Documentation for snowplow-cli is available over here
snowplow-cli can be installed with homebrew
brew install snowplow/taps/snowplow-cli
snowplow-cli --help
For systems where homebrew is not available binaries for multiple platforms can be found in releases
Example installation for linux_x86_64
using curl
curl -L -o snowplow-cli https://github.com/snowplow/snowplow-cli/releases/latest/download/snowplow-cli_linux_x86_64
chmod u+x snowplow-cli
./snowplow-cli --help
We also publish to npm
npx @snowplow/snowplow-cli --help
Snowplow CLI requires configuration to use most of its functionality. Configuration can be provided through multiple sources with the following precedence order (highest to lowest):
- Command-line flags (e.g.,
--api-key
,--org-id
) - Environment variables (e.g.,
SNOWPLOW_CONSOLE_API_KEY
,SNOWPLOW_CONSOLE_ORG_ID
) - Environment (.env) files
- YAML configuration files
Create a YAML config file:
- Unix/Darwin:
mkdir -p ~/.config/snowplow && touch $HOME/.config/snowplow/snowplow.yml
Create a .env
file in your current directory or specify a custom path with --env-file
:
# .env file
SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************
The CLI will automatically search for .env
files in:
- Current working directory (
.env
) - Config directories (
~/.config/snowplow/.env
)
Or specify a custom path: snowplow-cli --env-file /path/to/custom.env
Set environment variables directly:
export SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
export SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
export SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************
You will need to provide the console organization id, API key and API secret. You can find the instructions on how to get the API key and secret in the documentation
YAML format (snowplow.yml
):
console:
org-id: ********-****-****-****-************
api-key-id: ********-****-****-****-************
api-key: ********-****-****-****-************
Environment file format (.env
):
SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************