kroki 1.0.1 → 1.0.2

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 +23 -72
  2. package/bin/kroki.js +25 -6
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Kroki CLI
2
2
 
3
- > **Browser Automation & AI Agent Bridge for Google Chrome & Dolphin{anty}**
4
- > Control live browser tabs, run deterministic workflows, and extract web data from your terminal or any AI Coding Agent (Antigravity, Cursor, Claude Code, Windsurf).
3
+ > **Browser Automation & AI Agent Bridge for Google Chrome**
4
+ > Control live browser tabs, run deterministic workflows, and extract web data from your terminal or AI Coding Agents (Antigravity, Cursor, Claude Code, Windsurf).
5
5
 
6
6
  [![npm version](https://img.shields.io/npm/v/kroki.svg)](https://www.npmjs.com/package/kroki)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
@@ -11,82 +11,40 @@
11
11
 
12
12
  ## ⚡ Quick Start
13
13
 
14
- No installation required. You can run it directly with `npx`:
14
+ No installation required run directly with `npx`:
15
15
 
16
16
  ### 1. Pair with your browser profile
17
- > **Note:** Requires an active **Ultra** plan.
18
-
19
- 1. Log in at [https://kroki.ai/#/devices](https://kroki.ai/#/devices).
20
- 2. Find your active Chrome or Dolphin{anty} profile.
21
- 3. Click **"Скопировать код для AI"**.
22
- 4. Run:
23
-
17
+ 1. Open [https://kroki.ai/#/devices](https://kroki.ai/#/devices) *(Ultra plan required)*.
18
+ 2. Click **"Скопировать код для AI"** next to your active browser profile.
19
+ 3. Pair:
24
20
  ```bash
25
21
  npx kroki pair <YOUR_PAIRING_CODE>
26
22
  ```
27
23
 
28
- ```text
29
- Connecting to profile [Dolphin WB-Bot]...
30
- ✔ Successfully paired with "Dolphin WB-Bot".
31
- ```
32
-
33
- ### 2. Send an AI task to the live browser
34
-
24
+ ### 2. Control browser or run workflows
35
25
  ```bash
36
- npx kroki "open wildberries.ru, search for 'iPhone 16 cases' and list the top 5 prices"
37
- ```
38
-
39
- Kroki's built-in Planner & Navigator subagent will navigate to the page, interact with elements, extract the requested information, and stream the result back to your terminal.
26
+ # Autonomous browser task (Planner + Navigator)
27
+ npx kroki "open github.com/trending and list the top 3 repositories"
40
28
 
41
- ### 3. Run a saved workflow
42
-
43
- ```bash
29
+ # Run a saved deterministic workflow
44
30
  npx kroki run "Export Leads" '{"query": "CTO", "limit": 20}'
45
- ```
46
-
47
- ---
48
-
49
- ## 📦 Global Installation (Optional)
50
-
51
- If you prefer using `kroki` without typing `npx` every time:
52
31
 
53
- ```bash
54
- npm install -g kroki
55
- ```
56
-
57
- Now you can just run:
58
-
59
- ```bash
60
- kroki pair <CODE>
61
- kroki "scrape the current page"
62
- kroki run "My Workflow"
32
+ # Check status or disconnect
33
+ npx kroki status
34
+ npx kroki clear
63
35
  ```
64
36
 
65
37
  ---
66
38
 
67
39
  ## 🤖 Using with AI Agents (Antigravity, Claude Code, Cursor)
68
40
 
69
- Kroki CLI works out-of-the-box with AI pair-programming agents.
70
-
71
- ### In Antigravity CLI
72
-
73
- Whenever you mention **kroki** in the chat, the agent automatically knows how to use this CLI:
74
-
75
- > **You:** `kroki pair kroki_eyJh...`
76
- > **Agent:** Pairs with the specified profile and confirms readiness.
77
- >
78
- > **You:** `kroki найди на Avito Mac mini M4 и выпиши самые дешевые цены`
79
- > **Agent:** Executes `kroki "<task>"`, waits for Kroki in the browser to finish, and summarizes the findings.
80
-
81
- ### In Cursor / Claude Code
82
-
83
- Add the following to your agent prompt or rule file (`.cursorrules` or `CLAUDE.md`):
41
+ Add the following to your project's agent instructions (`.cursorrules`, `CLAUDE.md`, or system prompt):
84
42
 
85
43
  ```markdown
86
- When the user requests live browser interaction or running Kroki workflows:
87
- 1. Ensure the profile is paired: run `npx kroki status`. If not paired, ask the user for their pairing code from https://kroki.ai/#/devices (Ultra plan required).
88
- 2. Pair via `npx kroki pair <CODE>`.
89
- 3. Dispatch tasks via `npx kroki "<task>"` or workflows via `npx kroki run "<workflow>" '[vars]'`.
44
+ When asked to automate the browser or run Kroki workflows:
45
+ 1. Check pairing: `npx kroki status`. If not paired, ask user for pairing code from https://kroki.ai/#/devices.
46
+ 2. Pair: `npx kroki pair <CODE>`.
47
+ 3. Execute: `npx kroki "<task>"` or `npx kroki run "<workflow>" '[vars]'`.
90
48
  ```
91
49
 
92
50
  ---
@@ -95,18 +53,11 @@ When the user requests live browser interaction or running Kroki workflows:
95
53
 
96
54
  | Command | Description |
97
55
  | :--- | :--- |
98
- | `npx kroki pair <code_from_devices>` | Connect to a specific browser profile (requires Ultra plan) |
99
- | `npx kroki "<browser_task>"` | Send an autonomous agent task to the active browser profile |
100
- | `npx kroki run "<workflow_name>" [json]` | Execute a saved Kroki deterministic workflow |
101
-
102
- ---
103
-
104
- ## 🔒 Security Architecture
105
-
106
- - **Zero Global Credentials**: Pairing codes are session-bound and scoped strictly to your selected browser window (`targetDeviceId`).
107
- - **Confirmation Gate**: The extension prompts you for confirmation on your computer when a connection attempt is made.
108
- - **Ultra Plan Scoped**: Cloud control channels require an active Ultra entitlement.
109
- - **Pure Native Node.js**: Zero third-party npm dependencies. Clean, audited, and lightweight.
56
+ | `npx kroki pair <CODE>` | Pair with active browser profile |
57
+ | `npx kroki "<task>"` | Execute browser task via autonomous Planner & Navigator |
58
+ | `npx kroki run "<name>" [json]` | Execute a saved Kroki deterministic workflow |
59
+ | `npx kroki status` | View active paired profile and device info |
60
+ | `npx kroki clear` | Clear active pairing session |
110
61
 
111
62
  ---
112
63
 
package/bin/kroki.js CHANGED
@@ -196,7 +196,7 @@ async function pairCommand(code) {
196
196
  Requires an active \x1b[33mUltra\x1b[0m plan.
197
197
 
198
198
  1. Log in at \x1b[36mhttps://kroki.ai/#/devices\x1b[0m
199
- 2. Find your active browser profile (Chrome or Dolphin{anty})
199
+ 2. Find your active browser profile
200
200
  3. Click \x1b[32m"Скопировать код для AI"\x1b[0m
201
201
  4. Run:
202
202
  \x1b[33mnpx kroki pair <YOUR_CODE>\x1b[0m
@@ -315,16 +315,30 @@ async function workflowCommand(nameOrId, varsJson) {
315
315
  }
316
316
  }
317
317
 
318
+ function statusCommand() {
319
+ const session = getActiveSession();
320
+ if (!session) {
321
+ console.log('No active paired profile.');
322
+ console.log('To pair, get a code from https://kroki.ai/#/devices and run:');
323
+ console.log(' npx kroki pair <CODE>');
324
+ return;
325
+ }
326
+ console.log(`\x1b[32m✔ Paired\x1b[0m with "${session.deviceName || session.deviceId}" (${session.platform || 'browser'})`);
327
+ console.log(` Device ID: ${session.deviceId}`);
328
+ }
329
+
318
330
  function helpCommand() {
319
331
  console.log(`
320
- \x1b[1mKroki CLI\x1b[0m — Browser Automation & AI Agent Bridge for Chrome & Dolphin{anty}
332
+ \x1b[1mKroki CLI\x1b[0m — Browser Automation & AI Agent Bridge for Google Chrome
321
333
 
322
334
  \x1b[1mUsage:\x1b[0m
323
- npx kroki pair <code_from_devices> Pair with a browser profile (requires Ultra plan)
324
- npx kroki "<browser_task>" Send an AI task to the live browser
325
- npx kroki run "<workflow_name>" [json] Execute a saved workflow
335
+ npx kroki pair <CODE> Pair with a browser profile (from https://kroki.ai/#/devices)
336
+ npx kroki "<task>" Send an AI task to the live browser
337
+ npx kroki run "<workflow>" [json] Execute a saved workflow
338
+ npx kroki status View paired profile and status
339
+ npx kroki clear Disconnect active pairing session
326
340
 
327
- \x1b[1mGet pairing code:\x1b[0m
341
+ \x1b[1mDashboard:\x1b[0m
328
342
  https://kroki.ai/#/devices
329
343
  `);
330
344
  }
@@ -343,6 +357,10 @@ switch (first) {
343
357
  });
344
358
  break;
345
359
 
360
+ case 'status':
361
+ statusCommand();
362
+ break;
363
+
346
364
  case 'run':
347
365
  case 'workflow':
348
366
  workflowCommand(rawArgs[1], rawArgs[2]).catch(e => {
@@ -370,3 +388,4 @@ switch (first) {
370
388
  });
371
389
  break;
372
390
  }
391
+
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "kroki",
3
- "version": "1.0.1",
4
- "description": "Kroki Browser Automation CLI — Control Chrome & Dolphin{anty} from terminal and AI agents",
3
+ "version": "1.0.2",
4
+ "description": "Kroki Browser Automation CLI — Control Chrome from terminal and AI agents",
5
5
  "keywords": [
6
6
  "kroki",
7
7
  "browser-automation",
8
8
  "ai-agent",
9
9
  "antigravity",
10
- "dolphin-anty",
11
10
  "chrome",
12
11
  "mcp",
13
12
  "cli"