You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**IMPORTANT**: Never output or echo actual credential values. Only check if they are set.
70
+
71
+
If both show `[set]`, skip to Step 4 (Build CLI). If either is empty, continue to Step 2.
72
+
73
+
### Step 2: Check for Setup Script
64
74
65
-
Run the interactive configuration command:
75
+
If environment variables are not set, check for the setup script:
66
76
```bash
67
-
node cli/dist/index.js configure
77
+
ls -la setup-grid-credentials.sh 2>/dev/null
68
78
```
69
79
70
-
This will:
71
-
1. Prompt for your API Token ID and Client Secret
72
-
2. Validate the credentials against the API
73
-
3. Save them to `~/.grid-credentials`
80
+
If the script exists, source it to load credentials:
81
+
```bash
82
+
source ./setup-grid-credentials.sh
83
+
```
74
84
75
-
### Alternative: Environment Variables
85
+
Then verify the credentials are now set (repeat Step 1 check).
76
86
77
-
You can also configure via environment variables:
78
-
-`GRID_API_TOKEN_ID` - API token ID
79
-
-`GRID_API_CLIENT_SECRET` - API client secret
80
-
-`GRID_BASE_URL` - Base URL (defaults to `https://api.lightspark.com/grid/2025-10-13`)
87
+
### Step 3: Prompt for Credentials (if needed)
88
+
89
+
**Skip this step if** environment variables are set (Step 1) OR the setup script exists (Step 2).
90
+
91
+
Only if neither exists, prompt the user for credentials one at a time:
81
92
82
-
### Non-Interactive Setup
93
+
1. First, ask for their **API Token ID** (`GRID_API_TOKEN_ID`)
94
+
2. After receiving the token ID, ask for their **Client Secret** (`GRID_API_CLIENT_SECRET`)
95
+
3. Finally, ask if they want to override the default base URL (`https://api.lightspark.com/grid/2025-10-13`). Only request `GRID_BASE_URL` if they say yes.
83
96
97
+
**SECURITY**: When the user provides credentials:
98
+
- Never echo, log, or display the credential values
99
+
- Never include credentials in command output or error messages
100
+
- Export them directly without confirmation output
101
+
102
+
Once provided, export the credentials silently (do not echo):
0 commit comments