@vibetechnologies/chrome-sync 0.4.0 → 0.4.1

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
@@ -1,4 +1,4 @@
1
- # @vibetechnologies/browser-sync
1
+ # @vibetechnologies/chrome-sync
2
2
 
3
3
  Sync browser cookies and sessions from your local Chrome to your OpenClaw cloud browser.
4
4
 
@@ -9,7 +9,13 @@ Cloud browsers can't log into Google, GitHub, or other sites that detect automat
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- npm install -g @vibetechnologies/browser-sync
12
+ npx @vibetechnologies/chrome-sync login
13
+ ```
14
+
15
+ Or install globally:
16
+
17
+ ```bash
18
+ npm install -g @vibetechnologies/chrome-sync
13
19
  ```
14
20
 
15
21
  ## Usage
@@ -17,29 +23,33 @@ npm install -g @vibetechnologies/browser-sync
17
23
  ### 1. Authenticate
18
24
 
19
25
  ```bash
20
- browser-sync login --token <your-api-token>
26
+ # Opens browser for authentication
27
+ chrome-sync login
28
+
29
+ # Or use a direct token (CI/automation)
30
+ chrome-sync login --token <your-api-token>
21
31
  ```
22
32
 
23
33
  ### 2. Push cookies to cloud browser
24
34
 
25
35
  ```bash
26
- # Sync Google cookies
27
- browser-sync push --domains google.com,gmail.com
36
+ # Sync all cookies
37
+ chrome-sync push
28
38
 
29
- # Sync multiple services
30
- browser-sync push --domains google.com,github.com,linkedin.com
39
+ # Sync specific domains
40
+ chrome-sync push --domains google.com,gmail.com
31
41
 
32
42
  # Use a specific Chrome profile
33
- browser-sync push --domains google.com --profile "Profile 1"
43
+ chrome-sync push --domains google.com --profile "Profile 1"
34
44
 
35
45
  # Dry run — see what would be synced
36
- browser-sync push --domains google.com --dry-run
46
+ chrome-sync push --dry-run
37
47
  ```
38
48
 
39
49
  ### 3. List Chrome profiles
40
50
 
41
51
  ```bash
42
- browser-sync profiles
52
+ chrome-sync profiles
43
53
  ```
44
54
 
45
55
  ## How it works
@@ -61,18 +71,18 @@ browser-sync profiles
61
71
 
62
72
  - Cookies are only sent to your authenticated tenant
63
73
  - Transport uses HTTPS
64
- - Local auth token stored with 0600 permissions at `~/.config/browser-sync/auth.json`
74
+ - Local auth token stored with 0600 permissions at `~/.config/chrome-sync/auth.json`
65
75
  - No cookies are stored server-side — they're injected directly into the browser process
66
76
 
67
77
  ## Programmatic API
68
78
 
69
79
  ```typescript
70
- import { extractStorageState, pushCookies, login } from "@vibetechnologies/browser-sync";
80
+ import { extractStorageState, pushCookies, loginWithToken } from "@vibetechnologies/chrome-sync";
71
81
 
72
82
  // Extract Google cookies from local Chrome
73
83
  const state = await extractStorageState([".google.com", ".gmail.com"]);
74
84
 
75
85
  // Push to cloud
76
- await login("https://console.openclaw.vibebrowser.app", "your-token");
86
+ await loginWithToken("https://console.openclaw.vibebrowser.app", "your-token");
77
87
  await pushCookies(state);
78
88
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibetechnologies/chrome-sync",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Sync browser cookies and sessions from your local Chrome to OpenClaw cloud browser",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,7 +19,14 @@
19
19
  "dev": "tsc --watch",
20
20
  "start": "node dist/cli.js"
21
21
  },
22
- "keywords": ["browser", "cookies", "sync", "chrome", "cdp", "openclaw"],
22
+ "keywords": [
23
+ "browser",
24
+ "cookies",
25
+ "sync",
26
+ "chrome",
27
+ "cdp",
28
+ "openclaw"
29
+ ],
23
30
  "author": "VibeTechnologies",
24
31
  "license": "MIT",
25
32
  "repository": {
package/src/api.ts CHANGED
@@ -86,6 +86,7 @@ export async function loginViaBrowser(
86
86
 
87
87
  res.writeHead(200, { "Content-Type": "text/html" });
88
88
  res.end(`<html><body><h2>✓ Authenticated as ${config.username}</h2><p>You can close this window and return to the terminal.</p></body></html>`);
89
+ clearTimeout(timeout);
89
90
  server.close();
90
91
  resolve(config);
91
92
  } else {
@@ -121,7 +122,7 @@ export async function loginViaBrowser(
121
122
  });
122
123
 
123
124
  // Timeout after 2 minutes
124
- setTimeout(() => {
125
+ const timeout = setTimeout(() => {
125
126
  server.close();
126
127
  reject(new Error("Authentication timed out (2 minutes). Try again."));
127
128
  }, 120_000);
package/src/cli.ts CHANGED
@@ -48,6 +48,7 @@ program
48
48
  console.log(` Tenant: ${config.subdomain}`);
49
49
  }
50
50
  console.log(` API: ${config.apiUrl}`);
51
+ process.exit(0);
51
52
  } catch (err: any) {
52
53
  console.error(`✗ Login failed: ${err.message}`);
53
54
  process.exit(1);