@snowplow/snowplow-cli-darwin-arm64 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,19 +37,55 @@ npx @snowplow/snowplow-cli --help
37
37
 
38
38
  ## Configuration
39
39
 
40
- Snowplow CLI requires configuration to use most of its functionality
40
+ 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):
41
41
 
42
- ### Create a config file
42
+ 1. **Command-line flags** (e.g., `--api-key`, `--org-id`)
43
+ 2. **Environment variables** (e.g., `SNOWPLOW_CONSOLE_API_KEY`, `SNOWPLOW_CONSOLE_ORG_ID`)
44
+ 3. **Environment (.env) files**
45
+ 4. **YAML configuration files**
46
+
47
+ ### Configuration Methods
48
+
49
+ #### 1. YAML Configuration File
50
+
51
+ Create a YAML config file:
43
52
 
44
53
  - Unix/Darwin: `mkdir -p ~/.config/snowplow && touch $HOME/.config/snowplow/snowplow.yml`
45
54
  <!-- TODO: Windows -->
46
55
 
47
- ### Minimal configuration
56
+ #### 2. Environment (.env) File
57
+
58
+ Create a `.env` file in your current directory or specify a custom path with `--env-file`:
59
+
60
+ ```bash
61
+ # .env file
62
+ SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
63
+ SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
64
+ SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************
65
+ ```
66
+
67
+ The CLI will automatically search for `.env` files in:
68
+ - Current working directory (`.env`)
69
+ - Config directories (`~/.config/snowplow/.env`)
70
+
71
+ Or specify a custom path: `snowplow-cli --env-file /path/to/custom.env`
72
+
73
+ #### 3. Environment Variables
74
+
75
+ Set environment variables directly:
76
+
77
+ ```bash
78
+ export SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
79
+ export SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
80
+ export SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************
81
+ ```
82
+
83
+ ### Minimal Configuration
48
84
 
49
85
  You will need to provide the console organization id, API key and API secret.
50
86
  You can find the instructions on how to get the API key and secret in the [documentation](https://docs.snowplow.io/docs/using-the-snowplow-console/managing-console-api-authentication/#credentials-ui-v3)
51
87
 
52
- Your `snowplow.yml` content should look like following
88
+ **YAML format** (`snowplow.yml`):
53
89
 
54
90
  ```yaml
55
91
  console:
@@ -57,3 +93,11 @@ console:
57
93
  api-key-id: ********-****-****-****-************
58
94
  api-key: ********-****-****-****-************
59
95
  ```
96
+
97
+ **Environment file format** (`.env`):
98
+
99
+ ```bash
100
+ SNOWPLOW_CONSOLE_ORG_ID=********-****-****-****-************
101
+ SNOWPLOW_CONSOLE_API_KEY_ID=********-****-****-****-************
102
+ SNOWPLOW_CONSOLE_API_KEY=********-****-****-****-************
103
+ ```
package/bin/snowplow-cli CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowplow/snowplow-cli-darwin-arm64",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "license": "see license in LICENSE.md",
5
5
  "repository": "https://github.com/snowplow/snowplow-cli",
6
6
  "description": "snowplow cli for darwin (arm64)",