vibium 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +227 -0
  2. package/package.json +11 -1
package/README.md ADDED
@@ -0,0 +1,227 @@
1
+ # Vibium
2
+
3
+ Browser automation for AI agents and humans.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install vibium
9
+ ```
10
+
11
+ This automatically downloads Chrome for Testing on first install.
12
+
13
+ ## Quick Start
14
+
15
+ ### Async API
16
+
17
+ ```javascript
18
+ import { browser } from 'vibium';
19
+ import { writeFile } from 'fs/promises';
20
+
21
+ const vibe = await browser.launch();
22
+ await vibe.go('https://example.com');
23
+
24
+ const link = await vibe.find('a');
25
+ console.log(await link.text());
26
+ await link.click();
27
+
28
+ const screenshot = await vibe.screenshot();
29
+ await writeFile('screenshot.png', screenshot);
30
+
31
+ await vibe.quit();
32
+ ```
33
+
34
+ ### Sync API
35
+
36
+ ```javascript
37
+ import { browserSync } from 'vibium';
38
+ import { writeFileSync } from 'fs';
39
+
40
+ const vibe = browserSync.launch();
41
+ vibe.go('https://example.com');
42
+
43
+ const link = vibe.find('a');
44
+ console.log(link.text());
45
+ link.click();
46
+
47
+ const screenshot = vibe.screenshot();
48
+ writeFileSync('screenshot.png', screenshot);
49
+
50
+ vibe.quit();
51
+ ```
52
+
53
+ ## API Reference
54
+
55
+ ### browser.launch(options?)
56
+
57
+ Launch a new browser session.
58
+
59
+ ```javascript
60
+ const vibe = await browser.launch({ headless: true });
61
+ ```
62
+
63
+ | Option | Type | Default | Description |
64
+ |--------|------|---------|-------------|
65
+ | `headless` | boolean | `false` | Run without visible window |
66
+
67
+ ### vibe.go(url)
68
+
69
+ Navigate to a URL.
70
+
71
+ ```javascript
72
+ await vibe.go('https://example.com');
73
+ ```
74
+
75
+ ### vibe.find(selector, options?)
76
+
77
+ Find an element by CSS selector.
78
+
79
+ ```javascript
80
+ const button = await vibe.find('button.submit');
81
+ ```
82
+
83
+ | Option | Type | Default | Description |
84
+ |--------|------|---------|-------------|
85
+ | `timeout` | number | `30000` | Max wait time in ms |
86
+
87
+ ### vibe.screenshot()
88
+
89
+ Capture a screenshot. Returns a `Buffer` (PNG).
90
+
91
+ ```javascript
92
+ const png = await vibe.screenshot();
93
+ ```
94
+
95
+ ### vibe.quit()
96
+
97
+ Close the browser session.
98
+
99
+ ```javascript
100
+ await vibe.quit();
101
+ ```
102
+
103
+ ### element.click(options?)
104
+
105
+ Click the element. Waits for element to be visible, stable, and enabled.
106
+
107
+ ```javascript
108
+ await element.click();
109
+ ```
110
+
111
+ | Option | Type | Default | Description |
112
+ |--------|------|---------|-------------|
113
+ | `timeout` | number | `30000` | Max wait time in ms |
114
+
115
+ ### element.type(text, options?)
116
+
117
+ Type text into the element. Waits for element to be visible, stable, enabled, and editable.
118
+
119
+ ```javascript
120
+ await element.type('hello@example.com');
121
+ ```
122
+
123
+ | Option | Type | Default | Description |
124
+ |--------|------|---------|-------------|
125
+ | `timeout` | number | `30000` | Max wait time in ms |
126
+
127
+ ### element.text()
128
+
129
+ Get the element's text content.
130
+
131
+ ```javascript
132
+ const text = await element.text();
133
+ ```
134
+
135
+ ### element.getAttribute(name)
136
+
137
+ Get an attribute value.
138
+
139
+ ```javascript
140
+ const testId = await element.getAttribute('data-testid');
141
+ ```
142
+
143
+ ### element.boundingBox()
144
+
145
+ Get the element's position and size. Returns `{x, y, width, height}`.
146
+
147
+ ```javascript
148
+ const box = await element.boundingBox();
149
+ ```
150
+
151
+ ## Environment Variables
152
+
153
+ | Variable | Description |
154
+ |----------|-------------|
155
+ | `VIBIUM_SKIP_BROWSER_DOWNLOAD` | Set to `1` to skip Chrome download on install |
156
+
157
+ ## Claude Code / MCP
158
+
159
+ Add Vibium to Claude Code:
160
+
161
+ ```bash
162
+ claude mcp add vibium -- npx vibium
163
+ ```
164
+
165
+ ### MCP Tools
166
+
167
+ #### browser_launch
168
+
169
+ Start a browser session.
170
+
171
+ | Parameter | Type | Default | Description |
172
+ |-----------|------|---------|-------------|
173
+ | `headless` | boolean | `false` | Run without visible window |
174
+
175
+ #### browser_navigate
176
+
177
+ Navigate to a URL.
178
+
179
+ | Parameter | Type | Required | Description |
180
+ |-----------|------|----------|-------------|
181
+ | `url` | string | yes | The URL to navigate to |
182
+
183
+ #### browser_click
184
+
185
+ Click an element. Waits for element to be visible, stable, and enabled.
186
+
187
+ | Parameter | Type | Required | Description |
188
+ |-----------|------|----------|-------------|
189
+ | `selector` | string | yes | CSS selector |
190
+
191
+ #### browser_type
192
+
193
+ Type text into an element. Waits for element to be visible, stable, enabled, and editable.
194
+
195
+ | Parameter | Type | Required | Description |
196
+ |-----------|------|----------|-------------|
197
+ | `selector` | string | yes | CSS selector |
198
+ | `text` | string | yes | Text to type |
199
+
200
+ #### browser_screenshot
201
+
202
+ Capture a screenshot.
203
+
204
+ | Parameter | Type | Required | Description |
205
+ |-----------|------|----------|-------------|
206
+ | `filename` | string | no | Save to file (e.g., screenshot.png) |
207
+
208
+ #### browser_find
209
+
210
+ Find an element and return its info (tag, text, bounding box).
211
+
212
+ | Parameter | Type | Required | Description |
213
+ |-----------|------|----------|-------------|
214
+ | `selector` | string | yes | CSS selector |
215
+
216
+ #### browser_quit
217
+
218
+ Close the browser session.
219
+
220
+ ## Links
221
+
222
+ - [GitHub / Documentation](https://github.com/VibiumDev/vibium)
223
+ - [Website](https://vibium.com)
224
+
225
+ ## License
226
+
227
+ Apache-2.0
package/package.json CHANGED
@@ -1,7 +1,17 @@
1
1
  {
2
2
  "name": "vibium",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Browser automation for AI agents and humans",
5
+ "keywords": [
6
+ "browser",
7
+ "automation",
8
+ "testing",
9
+ "webdriver",
10
+ "bidi",
11
+ "mcp",
12
+ "ai",
13
+ "claude"
14
+ ],
5
15
  "author": "Jason Huggins <hugs@vibium.com>",
6
16
  "license": "Apache-2.0",
7
17
  "homepage": "https://vibium.com",