swixter 0.1.1 → 0.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.
Files changed (3) hide show
  1. package/README.md +87 -1
  2. package/dist/cli/index.js +5884 -1969
  3. package/package.json +7 -5
package/README.md CHANGED
@@ -14,9 +14,10 @@ A lightweight CLI tool that makes it easy to switch between AI providers for Cla
14
14
  - **Switch providers instantly** - Change between Anthropic, Ollama, or custom APIs with one command
15
15
  - **Automatic failover** - Group profiles by priority, auto-retry on provider failure
16
16
  - **Local proxy** - Transparent proxy with circuit breaker, your tools won't even notice a provider goes down
17
+ - **Cloud sync** - Encrypt and sync your profiles across devices with end-to-end encryption
17
18
  - **Multiple coders** - Works with Claude Code, Codex, Continue
18
19
  - **Web UI** - Browser-based interface for visual management
19
- - **All local** - No cloud dependencies, your keys stay on your machine
20
+ - **All local** - Your keys stay on your machine; cloud sync uses client-side encryption
20
21
 
21
22
  ## Installation
22
23
 
@@ -252,6 +253,88 @@ swixter ui --port 8080 # Custom port
252
253
  - **Providers** - Manage custom providers
253
254
  - **Settings** - Import/export configurations
254
255
 
256
+ ## Cloud Sync
257
+
258
+ Sync your profiles and provider configs across devices with end-to-end encryption. API keys and other sensitive fields are encrypted client-side before uploading — the server never sees plaintext secrets.
259
+
260
+ ### Quick Start
261
+
262
+ ```bash
263
+ swixter auth register # Create account with email verification
264
+ swixter auth login # Sign in with email + password
265
+ swixter auth login --magic-link # Sign in via magic link email
266
+ swixter sync push # Upload encrypted config to cloud
267
+ swixter sync pull # Download and merge from cloud
268
+ swixter sync status # Check sync state
269
+ ```
270
+
271
+ ### Auth Commands
272
+
273
+ ```bash
274
+ swixter auth register # Create a new account (email verification)
275
+ swixter auth login # Sign in with email + password
276
+ swixter auth login --magic-link # Sign in via magic link (browser or manual token)
277
+ swixter auth logout # Sign out
278
+ swixter auth status # Check login status
279
+ swixter auth delete-account # Delete your account and cloud data
280
+ ```
281
+
282
+ ### Registration Flow
283
+
284
+ Creating an account uses email verification:
285
+
286
+ 1. Enter your email address
287
+ 2. A 6-digit verification code is sent to your email
288
+ 3. Enter the verification code
289
+ 4. Create a login password (min 6 characters)
290
+ 5. Optionally set a display name
291
+ 6. After registration, set up **end-to-end encryption** with a master password (min 8 characters, separate from your login password)
292
+ 7. Choose whether to save the encryption key locally for automatic sync
293
+
294
+ ### Login Options
295
+
296
+ **Password Login:**
297
+ ```bash
298
+ swixter auth login
299
+ # Enter email and password
300
+ ```
301
+
302
+ **Magic Link Login:**
303
+ ```bash
304
+ swixter auth login --magic-link
305
+ # Enter email → check email → click the link → CLI detects it automatically
306
+ # Or press Enter to enter the token manually
307
+ ```
308
+
309
+ After magic link login, you'll be prompted to set a login password for future sign-ins.
310
+
311
+ ### Sync Commands
312
+
313
+ ```bash
314
+ swixter sync push # Push local config to cloud
315
+ swixter sync push --force-local # Force push (overwrite remote)
316
+ swixter sync pull # Pull remote config to local
317
+ swixter sync pull --force-remote # Force pull (overwrite local)
318
+ swixter sync status # Show sync status and versions
319
+ swixter sync enable # Enable auto sync
320
+ swixter sync disable # Disable auto sync
321
+ ```
322
+
323
+ ### Encryption & Security
324
+
325
+ ```
326
+ Local Config → Derive Encryption Key → Encrypt Sensitive Fields → Upload to Cloud
327
+
328
+ Cloud → Download → Decrypt → Merge with Local Config → Apply
329
+ ```
330
+
331
+ - **End-to-end encryption**: Sensitive fields (API keys, auth tokens) are encrypted with AES-GCM using a key derived from your master password via PBKDF2 before leaving your machine
332
+ - **Master password**: Separate from your login password. Used only for encryption. If forgotten, your cloud data cannot be decrypted
333
+ - **Save encryption key**: You can save the derived key locally for convenience (automatic sync without re-entering master password), or enter it each time
334
+ - **Version-based conflict detection**: Local and remote versions are tracked to detect and handle conflicts
335
+ - **Selective push/pull**: Only profiles and custom providers are synced; local-only settings stay untouched
336
+ - **Switching accounts**: When logging in as a different user, you'll be prompted to pull their cloud data, push your local data, or skip
337
+
255
338
  ## Other Commands
256
339
 
257
340
  ```bash
@@ -316,6 +399,9 @@ swixter/
316
399
  │ ├── providers/ # Provider presets + user-defined providers
317
400
  │ ├── groups/ # Group management (failover profiles)
318
401
  │ ├── proxy/ # Local proxy server (failover, circuit breaker)
402
+ │ ├── auth/ # Cloud auth (register, login, token management)
403
+ │ ├── sync/ # Cloud sync (push, pull, merge, auto-sync)
404
+ │ ├── crypto/ # End-to-end encryption (key derivation, field encryption)
319
405
  │ ├── server/ # Web UI API server
320
406
  │ └── utils/ # Shared utilities
321
407
  ├── ui/ # Web UI (React + Vite + Tailwind)