better-ccflare 3.1.2-beta.3 → 3.1.3
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 +43 -3
- package/dist/better-ccflare +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ export ANTHROPIC_BASE_URL=http://localhost:8080
|
|
|
297
297
|
claude
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
**Important:** When using Claude CLI with an active OAuth login, do **NOT** set `
|
|
300
|
+
**Important:** When using Claude CLI with an active OAuth login, do **NOT** set `ANTHROPIC_AUTH_TOKEN`. Setting both will trigger a warning from Claude CLI about conflicting authentication methods.
|
|
301
301
|
|
|
302
302
|
### Option 2: Using API Key Authentication
|
|
303
303
|
|
|
@@ -309,7 +309,13 @@ claude /logout
|
|
|
309
309
|
|
|
310
310
|
# Then set both the base URL and API key
|
|
311
311
|
export ANTHROPIC_BASE_URL=http://localhost:8080
|
|
312
|
-
|
|
312
|
+
|
|
313
|
+
# If better-ccflare has NO API keys configured (open access):
|
|
314
|
+
export ANTHROPIC_AUTH_TOKEN=dummy-key
|
|
315
|
+
|
|
316
|
+
# If better-ccflare HAS API keys configured (protected):
|
|
317
|
+
# Generate a key first: better-ccflare --generate-api-key "My VPS"
|
|
318
|
+
export ANTHROPIC_AUTH_TOKEN=btr-abcdef1234567890... # Use your real better-ccflare API key
|
|
313
319
|
|
|
314
320
|
# Make sure to configure your accounts in the better-ccflare dashboard
|
|
315
321
|
|
|
@@ -317,9 +323,43 @@ export ANTHROPIC_API_KEY=dummy-key
|
|
|
317
323
|
claude
|
|
318
324
|
```
|
|
319
325
|
|
|
326
|
+
### Option 3: Remote/Headless VPS Setup (Secure Proxy)
|
|
327
|
+
|
|
328
|
+
Use better-ccflare on a trusted server to avoid storing OAuth credentials on untrusted/temporary machines:
|
|
329
|
+
|
|
330
|
+
**On your trusted server (running better-ccflare):**
|
|
331
|
+
```bash
|
|
332
|
+
# Add your Claude account with OAuth
|
|
333
|
+
better-ccflare --add-account myaccount --mode claude-oauth --priority 0
|
|
334
|
+
|
|
335
|
+
# Generate an API key for remote access
|
|
336
|
+
better-ccflare --generate-api-key "Remote VPS"
|
|
337
|
+
# Save the generated key: btr-abcdef1234567890...
|
|
338
|
+
|
|
339
|
+
# Start the server (ensure it's accessible remotely)
|
|
340
|
+
better-ccflare --serve
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**On your untrusted/temporary VPS:**
|
|
344
|
+
```bash
|
|
345
|
+
# Set the remote better-ccflare URL and API key
|
|
346
|
+
export ANTHROPIC_BASE_URL=https://your-server.com:8080
|
|
347
|
+
export ANTHROPIC_AUTH_TOKEN=btr-abcdef1234567890... # Your better-ccflare API key
|
|
348
|
+
|
|
349
|
+
# Start Claude CLI (no need to login - better-ccflare handles auth)
|
|
350
|
+
claude
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**How it works:**
|
|
354
|
+
- Claude Code CLI sends requests with your better-ccflare API key
|
|
355
|
+
- better-ccflare validates the API key and proxies requests using its stored OAuth credentials
|
|
356
|
+
- Your OAuth credentials stay secure on your trusted server
|
|
357
|
+
- You can use Claude Code on any machine without storing sensitive credentials
|
|
358
|
+
|
|
320
359
|
### Which method should I use?
|
|
321
360
|
|
|
322
|
-
- **Have Claude Pro/Team?** Use Option 1 (OAuth only) - simpler and no API key needed
|
|
361
|
+
- **Have Claude Pro/Team and working locally?** Use Option 1 (OAuth only) - simpler and no API key needed
|
|
362
|
+
- **Working on untrusted/temporary machines?** Use Option 3 (Remote VPS setup) - keeps credentials secure
|
|
323
363
|
- **Using only API keys in better-ccflare?** Use Option 2 (logout + API key)
|
|
324
364
|
- **Getting auth conflict warnings?** You have both methods active - choose one and follow its steps above
|
|
325
365
|
|
package/dist/better-ccflare
CHANGED
|
Binary file
|
package/package.json
CHANGED