Skip to content

Commit 81c29c0

Browse files
authored
Introducing browser pools (#40)
## Overview Adds full CLI support for browser pools - collections of pre-configured browsers that can be quickly acquired and released for high-performance automation. - Complete CRUD operations for browser pools (`list`, `create`, `get`, `update`, `delete`) - Pool lifecycle management (`acquire`, `release`, `flush`) - Integration with `kernel browsers create` - can now acquire directly from pools ## Testing Created and ran the script
1 parent 5d277a1 commit 81c29c0

File tree

7 files changed

+1008
-18
lines changed

7 files changed

+1008
-18
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,37 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
152152
- `-s, --stealth` - Launch browser in stealth mode to avoid detection
153153
- `-H, --headless` - Launch browser without GUI access
154154
- `--kiosk` - Launch browser in kiosk mode
155+
- `--pool-id <id>` - Acquire a browser from the specified pool (mutually exclusive with --pool-name; ignores other session flags)
156+
- `--pool-name <name>` - Acquire a browser from the pool name (mutually exclusive with --pool-id; ignores other session flags)
157+
- _Note: When a pool is specified, omit other session configuration flags—pool settings determine profile, proxy, viewport, etc._
155158
- `kernel browsers delete <id>` - Delete a browser
156159
- `-y, --yes` - Skip confirmation prompt
157160
- `kernel browsers view <id>` - Get live view URL for a browser
158161

162+
### Browser Pools
163+
164+
- `kernel browser-pools list` - List browser pools
165+
- `-o, --output json` - Output raw JSON response
166+
- `kernel browser-pools create` - Create a browser pool
167+
- `--name <name>` - Optional unique name for the pool
168+
- `--size <n>` - Number of browsers in the pool (required)
169+
- `--fill-rate <n>` - Percentage of the pool to fill per minute
170+
- `--timeout <seconds>` - Idle timeout for browsers acquired from the pool
171+
- `--stealth`, `--headless`, `--kiosk` - Default pool configuration
172+
- `--profile-id`, `--profile-name`, `--save-changes`, `--proxy-id`, `--extension`, `--viewport` - Same semantics as `kernel browsers create`
173+
- `kernel browser-pools get <id-or-name>` - Get pool details
174+
- `-o, --output json` - Output raw JSON response
175+
- `kernel browser-pools update <id-or-name>` - Update pool configuration
176+
- Same flags as create plus `--discard-all-idle` to discard all idle browsers in the pool and refill at the specified fill rate
177+
- `kernel browser-pools delete <id-or-name>` - Delete a pool
178+
- `--force` - Force delete even if browsers are leased
179+
- `kernel browser-pools acquire <id-or-name>` - Acquire a browser from the pool
180+
- `--timeout <seconds>` - Acquire timeout before returning 204
181+
- `kernel browser-pools release <id-or-name>` - Release a browser back to the pool
182+
- `--session-id <id>` - Browser session ID to release (required)
183+
- `--reuse` - Reuse the browser instance (default: true)
184+
- `kernel browser-pools flush <id-or-name>` - Destroy all idle browsers in the pool
185+
159186
### Browser Logs
160187

161188
- `kernel browsers logs stream <id>` - Stream browser logs

0 commit comments

Comments
 (0)