@modelriver/cli 1.2.4 → 1.2.5
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 +6 -5
- package/package.json +1 -1
- package/src/commands/login.js +3 -2
package/README.md
CHANGED
|
@@ -30,9 +30,10 @@ modelriver login
|
|
|
30
30
|
|
|
31
31
|
You'll be prompted for:
|
|
32
32
|
1. **API Key**: Your ModelRiver API key (starts with `mr_live_` or `mr_test_`)
|
|
33
|
-
2. **Forward URL**: Where to forward webhooks (e.g., `http://localhost:
|
|
33
|
+
2. **Forward URL**: Where to forward webhooks on your machine (e.g., `http://localhost:3001/webhook/modelriver`)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
This is your local webhook receiver (CLI default port **3001**), not the ModelRiver API port (**4000**).
|
|
36
|
+
The URL will be automatically normalized to include `/webhook/modelriver` if needed.
|
|
36
37
|
|
|
37
38
|
### Step 2: Start Forwarding
|
|
38
39
|
|
|
@@ -91,7 +92,7 @@ Create a config file at `~/.modelriver/config.json` or `.modelriverrc` in your p
|
|
|
91
92
|
{
|
|
92
93
|
"api_key": "mr_live_YOUR_API_KEY",
|
|
93
94
|
"api_url": "https://api.modelriver.com",
|
|
94
|
-
"forward_url": "http://localhost:
|
|
95
|
+
"forward_url": "http://localhost:3001/webhook/modelriver"
|
|
95
96
|
}
|
|
96
97
|
```
|
|
97
98
|
|
|
@@ -114,14 +115,14 @@ ModelRiver CLI Login
|
|
|
114
115
|
Configure your ModelRiver CLI credentials.
|
|
115
116
|
|
|
116
117
|
Enter your ModelRiver API key: mr_live_abc123...
|
|
117
|
-
Enter your webhook forward URL (e.g. http://localhost:
|
|
118
|
+
Enter your webhook forward URL (e.g. http://localhost:3001/webhook/modelriver): http://localhost:3001/webhook/modelriver
|
|
118
119
|
|
|
119
120
|
✓ Configuration saved!
|
|
120
121
|
|
|
121
122
|
Saved Configuration
|
|
122
123
|
───────────────────
|
|
123
124
|
✓ API Key: mr_live_abc123...
|
|
124
|
-
✓ Forward URL: http://localhost:
|
|
125
|
+
✓ Forward URL: http://localhost:3001/webhook/modelriver
|
|
125
126
|
```
|
|
126
127
|
|
|
127
128
|
### `modelriver forward` - Quick Webhook Forwarding
|
package/package.json
CHANGED
package/src/commands/login.js
CHANGED
|
@@ -114,10 +114,11 @@ async function loginCommand(options) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
// Prompt for forward URL
|
|
117
|
-
|
|
117
|
+
// Default to the CLI local receiver port (3001), not ModelRiver API (4000).
|
|
118
|
+
const defaultForwardUrl = currentForwardUrl || 'http://localhost:3001/webhook/modelriver';
|
|
118
119
|
let forwardUrl = await prompt(
|
|
119
120
|
rl,
|
|
120
|
-
'Enter your webhook forward URL (e.g. http://localhost:
|
|
121
|
+
'Enter your webhook forward URL (e.g. http://localhost:3001/webhook/modelriver)',
|
|
121
122
|
defaultForwardUrl,
|
|
122
123
|
false, // maskDefault
|
|
123
124
|
false // showDefault - Hide the (http://...) bracket as requested
|