diff --git a/docs.json b/docs.json index 76480d7..4fa66f3 100644 --- a/docs.json +++ b/docs.json @@ -259,17 +259,30 @@ }, { "tab": "CLI", - "pages": [ - "reference/cli", - "reference/cli/create", - "reference/cli/auth", - "reference/cli/browsers", - "reference/cli/apps", - "reference/cli/managed-auth", - "reference/cli/projects", - "reference/cli/api-keys", - "reference/cli/mcp", - "reference/cli/extensions" + "groups": [ + { + "group": "Getting Started", + "pages": [ + "reference/cli", + "reference/cli/create", + "reference/cli/auth" + ] + }, + { + "group": "Commands", + "pages": [ + "reference/cli/apps", + "reference/cli/browsers", + "reference/cli/browser-pools", + "reference/cli/profiles", + "reference/cli/proxies", + "reference/cli/extensions", + "reference/cli/managed-auth", + "reference/cli/projects", + "reference/cli/api-keys", + "reference/cli/mcp" + ] + } ] }, { diff --git a/reference/cli.mdx b/reference/cli.mdx index 7a4e39c..7a47a9d 100644 --- a/reference/cli.mdx +++ b/reference/cli.mdx @@ -8,7 +8,7 @@ The Kernel CLI helps you access and manage your Kernel resources. ```bash # Using brew -brew install onkernel/tap/kernel +brew install kernel/tap/kernel # Using pnpm pnpm install -g @onkernel/cli @@ -34,6 +34,15 @@ kernel --version Create, view, and manage Kernel browsers. + + Pre-warm and reuse pools of browsers. + + + Persist and reuse browser profiles. + + + Create and manage proxy configurations. + Deploy apps, invoke actions, and stream logs. diff --git a/reference/cli/browser-pools.mdx b/reference/cli/browser-pools.mdx new file mode 100644 index 0000000..d1b3b1d --- /dev/null +++ b/reference/cli/browser-pools.mdx @@ -0,0 +1,93 @@ +--- +title: "Browser Pools" +--- + +Manage pools of pre-warmed browsers for high-concurrency workloads. For background and scaling guidance, see [Browser Pools](/browsers/pools/overview). + +## `kernel browser-pools list` +List all browser pools. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +## `kernel browser-pools get ` +Get details of a browser pool. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools create [name]` +Create a new browser pool. + +| Flag | Description | +|------|-------------| +| `--name ` | Optional unique name for the pool. | +| `--size ` | Number of browsers in the pool. | +| `--fill-rate ` | Fill rate per minute. | +| `--timeout ` | Idle timeout in seconds. | +| `--start-url ` | Initial page to open for new browsers. | +| `--profile-id ` | Profile ID to load into pool browsers. | +| `--profile-name ` | Profile name to load into pool browsers. | +| `--save-changes` | Save changes back to the profile when sessions end. | +| `--proxy-id ` | Proxy ID to use for pool browsers. | +| `--extension ` | Extension IDs or names to load (repeatable). | +| `--viewport ` | Viewport size (e.g. `1280x800`). | +| `--headless` | Enable headless mode. | +| `--stealth` | Enable stealth mode. | +| `--kiosk` | Enable kiosk mode. | +| `--output json`, `-o json` | Output raw JSON object. | + +```bash +kernel browser-pools create my-pool --size 10 --fill-rate 5 --stealth +``` + +## `kernel browser-pools update ` +Update a browser pool's configuration. + +| Flag | Description | +|------|-------------| +| `--name ` | Update the pool name. | +| `--size ` | Updated pool size. | +| `--fill-rate ` | Fill rate per minute. | +| `--timeout ` | Idle timeout in seconds. | +| `--start-url ` | Initial page to open for new browsers. | +| `--clear-start-url` | Clear the pool start URL. | +| `--discard-all-idle` | Discard all idle browsers. | +| `--profile-id ` | Profile ID to load into pool browsers. | +| `--profile-name ` | Profile name to load into pool browsers. | +| `--save-changes` | Save changes back to the profile when sessions end. | +| `--proxy-id ` | Proxy ID to use for pool browsers. | +| `--extension ` | Extension IDs or names to load (repeatable). | +| `--viewport ` | Viewport size (e.g. `1280x800`). | +| `--headless` | Enable headless mode. | +| `--stealth` | Enable stealth mode. | +| `--kiosk` | Enable kiosk mode. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools acquire ` +Acquire a browser from the pool. + +| Flag | Description | +|------|-------------| +| `--timeout ` | Acquire timeout in seconds. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools release ` +Release a browser back to the pool. + +| Flag | Description | +|------|-------------| +| `--session-id ` | Browser session ID to release. | +| `--reuse` | Reuse the browser instance (default: `true`). | + +## `kernel browser-pools delete ` +Delete a browser pool. + +| Flag | Description | +|------|-------------| +| `--force` | Force delete even if browsers are leased. | + +## `kernel browser-pools flush ` +Flush idle browsers from the pool. diff --git a/reference/cli/browsers.mdx b/reference/cli/browsers.mdx index 0b7586e..3c0eba8 100644 --- a/reference/cli/browsers.mdx +++ b/reference/cli/browsers.mdx @@ -367,156 +367,3 @@ Delete an uploaded extension. ### `kernel browsers extensions upload ...` Upload one or more unpacked Chrome extensions directly into a running browser session. - -## Proxy management - -### `kernel proxies list` -List available proxy configurations. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel proxies get ` -Show details for a proxy configuration. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel proxies create` -Create a new proxy configuration. - -| Flag | Description | -|------|-------------| -| `--name ` | Proxy configuration name. | -| `--type ` | `datacenter`, `isp`, `residential`, `mobile`, or `custom` (required). | -| `--protocol ` | Protocol to use (`http` or `https`; default: `https`). | -| `--country ` | ISO 3166 country code or `EU`. | -| `--city ` | City (residential, mobile; requires `--country`). | -| `--state ` | State/region code (residential, mobile). | -| `--zip ` | ZIP/postal code (residential, mobile). | -| `--asn ` | Autonomous system number (residential, mobile). | -| `--os ` | Operating system (`windows`, `macos`, `android`; residential). | -| `--carrier ` | Mobile carrier (mobile). | -| `--host ` | Proxy host (custom; required). | -| `--port ` | Proxy port (custom; required). | -| `--username ` | Proxy username (custom). | -| `--password ` | Proxy password (custom). | -| `--bypass-host ` | Hostname to bypass proxy (repeatable; max 100). | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel proxies delete ` -Delete a proxy configuration. - -| Flag | Description | -|------|-------------| -| `--yes`, `-y` | Skip confirmation. | - -## Browser pools - -For more details on browser pools, see [Browser Pools](/browsers/pools/overview). - -### `kernel browser-pools list` -List all browser pools. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel browser-pools create` -Create a new browser pool. - -| Flag | Description | -|------|-------------| -| `--name ` | Optional unique name for the pool. | -| `--size ` | Number of browsers in the pool (required). | -| `--fill-rate ` | Percentage of the pool to fill per minute. | -| `--timeout ` | Idle timeout for browsers acquired from the pool. | -| `--start-url ` | Initial page to open for new browsers. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel browser-pools get ` -Get pool details. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel browser-pools update ` -Update pool configuration. - -| Flag | Description | -|------|-------------| -| `--size ` | Updated pool size. | -| `--start-url ` | Initial page to open for new browsers. | -| `--clear-start-url` | Clear the pool start URL. | -| `--discard-all-idle` | Discard all idle browsers and refill. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel browser-pools acquire ` -Acquire a browser from the pool. - -| Flag | Description | -|------|-------------| -| `--timeout ` | Acquire timeout before returning 204. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel browser-pools release ` -Release a browser back to the pool. - -| Flag | Description | -|------|-------------| -| `--session-id ` | Browser session ID to release (required). | -| `--reuse` | Reuse the browser instance (default: true). | - -### `kernel browser-pools delete ` -Delete a pool. - -| Flag | Description | -|------|-------------| -| `--force` | Force delete even if browsers are leased. | - -### `kernel browser-pools flush ` -Destroy all idle browsers in the pool. - -## Profiles - -For more details on browser profiles, see [Profiles](/auth/profiles). - -### `kernel profiles list` -List all browser profiles. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel profiles get ` -Get profile details. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel profiles create` -Create a new browser profile. - -| Flag | Description | -|------|-------------| -| `--name ` | Optional unique name for the profile. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel profiles download ` -Download a profile as a ZIP archive. - -| Flag | Description | -|------|-------------| -| `--to ` | Output zip file path. Required. | -| `--pretty` | Pretty-print JSON to file. | - -### `kernel profiles delete ` -Delete a profile by ID or name. - -| Flag | Description | -|------|-------------| -| `--yes`, `-y` | Skip confirmation prompt. | diff --git a/reference/cli/create.mdx b/reference/cli/create.mdx index 4483aa7..32ffd15 100644 --- a/reference/cli/create.mdx +++ b/reference/cli/create.mdx @@ -16,21 +16,28 @@ Create a new Kernel application from a template. The CLI provides an interactive ## Available templates ### TypeScript templates -- **`sample-app`** — Basic template with Playwright integration for page title extraction +- **`sample-app`** — Basic Kernel app with Playwright integration - **`captcha-solver`** — Demo of Kernel's auto-CAPTCHA solving capability -- **`anthropic-computer-use`** — Anthropic Computer Use API sample implementation -- **`openai-computer-use`** — OpenAI Computer Using Agent (CUA) sample implementation -- **`gemini-computer-use`** — Google Gemini CUA sample implementation -- **`stagehand`** — Returns the first result of a specified Google search -- **`magnitude`** — [Magnitude framework](https://github.com/magnitude-labs/magnitude) integration +- **`anthropic-computer-use`** — Anthropic computer use agent +- **`openai-computer-use`** — OpenAI Computer Using Agent (CUA) +- **`gemini-computer-use`** — Google Gemini computer use agent +- **`claude-agent-sdk`** — Claude Agent SDK browser automation agent +- **`stagehand`** — [Stagehand](https://github.com/browserbase/stagehand) v3 SDK integration +- **`magnitude`** — [Magnitude](https://github.com/magnitude-labs/magnitude) SDK integration +- **`tzafon`** — Tzafon Northstar CUA Fast computer use agent +- **`yutori`** — Yutori n1.5 computer use agent ### Python templates -- **`sample-app`** — Basic template with Playwright integration for page title extraction +- **`sample-app`** — Basic Kernel app with Playwright integration - **`captcha-solver`** — Demo of Kernel's auto-CAPTCHA solving capability -- **`openagi-computer-use`** — OpenAGI's Lux Computer Use API sample implementation -- **`anthropic-computer-use`** — Anthropic Computer Use API sample implementation -- **`openai-computer-use`** — OpenAI Computer Using Agent (CUA) sample implementation -- **`browser-use`** — Integrates the Browser Use for AI-powered web automation +- **`anthropic-computer-use`** — Anthropic computer use agent +- **`openai-computer-use`** — OpenAI Computer Using Agent (CUA) +- **`gemini-computer-use`** — Google Gemini computer use agent +- **`claude-agent-sdk`** — Claude Agent SDK browser automation agent +- **`openagi-computer-use`** — OpenAGI computer use agent +- **`browser-use`** — [Browser Use](https://github.com/browser-use/browser-use) SDK integration +- **`tzafon`** — Tzafon Northstar CUA Fast computer use agent +- **`yutori`** — Yutori n1.5 computer use agent ## Examples diff --git a/reference/cli/profiles.mdx b/reference/cli/profiles.mdx new file mode 100644 index 0000000..d75758c --- /dev/null +++ b/reference/cli/profiles.mdx @@ -0,0 +1,48 @@ +--- +title: "Profiles" +--- + +Manage browser profiles that persist cookies, local storage, and other browser state across sessions. For background, see [Profiles](/auth/profiles). + +## `kernel profiles list` +List all browser profiles. + +| Flag | Description | +|------|-------------| +| `--query ` | Search profiles by name or ID. | +| `--page ` | Page number, 1-based (default: `1`). | +| `--per-page ` | Items per page (default: `20`). | +| `--output json`, `-o json` | Output raw JSON array. | + +## `kernel profiles get ` +Get details for a profile by ID or name. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel profiles create` +Create a new browser profile. + +| Flag | Description | +|------|-------------| +| `--name ` | Optional unique profile name. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel profiles download ` +Download a profile and extract its user-data archive into the directory given by `--to`. The directory is created if it doesn't exist. + +| Flag | Description | +|------|-------------| +| `--to ` | Directory to extract the profile into. Required. | + +```bash +kernel profiles download my-profile --to ./profile-data +``` + +## `kernel profiles delete ` +Delete a profile by ID or name. + +| Flag | Description | +|------|-------------| +| `--yes`, `-y` | Skip confirmation prompt. | diff --git a/reference/cli/proxies.mdx b/reference/cli/proxies.mdx new file mode 100644 index 0000000..7cc8214 --- /dev/null +++ b/reference/cli/proxies.mdx @@ -0,0 +1,66 @@ +--- +title: "Proxies" +--- + +Manage proxy configurations for routing browser traffic. For background on proxy types and when to use each, see [Proxies](/proxies/overview). + +## `kernel proxies list` +List available proxy configurations. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +## `kernel proxies get ` +Show details for a proxy configuration. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel proxies create` +Create a new proxy configuration. Proxy quality for bot detection avoidance, best to worst: mobile > residential > ISP > datacenter. + +| Flag | Description | +|------|-------------| +| `--type ` | `datacenter`, `isp`, `residential`, `mobile`, or `custom`. Required. | +| `--name ` | Proxy configuration name. | +| `--protocol ` | Protocol to use (`http` or `https`; default: `https`). | +| `--country ` | ISO 3166 country code or `EU`. | +| `--city ` | City name without spaces (e.g. `sanfrancisco`). Requires `--country`. | +| `--state ` | Two-letter state code. | +| `--zip ` | US ZIP code. | +| `--asn ` | Autonomous system number (e.g. `AS15169`). | +| `--os ` | Operating system (`windows`, `macos`, `android`). | +| `--carrier ` | Mobile carrier. | +| `--host ` | Proxy host address or IP (`custom` type). | +| `--port ` | Proxy port (`custom` type). | +| `--username ` | Username for proxy authentication (`custom` type). | +| `--password ` | Password for proxy authentication (`custom` type). | +| `--bypass-host ` | Hostname(s) to bypass the proxy and connect directly (repeatable or comma-separated). | +| `--output json`, `-o json` | Output raw JSON object. | + +```bash +# Datacenter proxy in the US +kernel proxies create --type datacenter --country US --name "US Datacenter" + +# Custom proxy server +kernel proxies create --type custom --host proxy.example.com --port 8080 --username myuser --password mypass + +# Residential proxy with location +kernel proxies create --type residential --country US --city sanfrancisco --state CA +``` + +## `kernel proxies check ` +Run a health check on a proxy to verify it's working and update its status. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel proxies delete ` +Delete a proxy configuration. + +| Flag | Description | +|------|-------------| +| `--yes`, `-y` | Skip confirmation prompt. |