The Kernel CLI is a fast, friendly commandβline interface for Kernel β the platform that provides sandboxed, readyβtoβuse Chrome browsers for browser automations and web agents.
Sign up at onkernel.com and read the docs.
Kernel provides sandboxed, ready-to-use Chrome browsers for browser automations and web agents. This CLI helps you deploy apps, run actions, manage browsers, and access live views.
- Deploy and version apps to Kernel
- Invoke app actions (sync or async) and stream logs
- Create, list, view, and delete managed browser sessions
- Get a live view URL for visual monitoring and remote control
Install the Kernel CLI using your favorite package manager:
# Using brew (recommended)
brew install onkernel/tap/kernel
# Using pnpm
pnpm install -g @onkernel/cli
# Using npm
npm install -g @onkernel/cliVerify the installation:
which kernel
kernel --version-
Authenticate with Kernel:
kernel login
-
Deploy your first app:
kernel deploy index.ts
-
Invoke your app:
kernel invoke my-app action-name --payload '{"key": "value"}'
The easiest way to authenticate is using OAuth:
kernel loginThis opens your browser to complete the authentication flow. Your credentials are securely stored and automatically refreshed.
You can also authenticate using an API key:
export KERNEL_API_KEY=<YOUR_API_KEY>Create an API key from the Kernel dashboard.
--version,-v- Print the CLI version--no-color- Disable color output--log-level <level>- Set log level (trace, debug, info, warn, error, fatal, print)
kernel login [--force]- Login via OAuth 2.0kernel logout- Clear stored credentialskernel auth- Check authentication status
-
kernel deploy <file>- Deploy an app to Kernel--version <version>- Specify app version (default: latest)--force- Allow overwriting existing version--env <KEY=VALUE>,-e- Set environment variables (can be used multiple times)--env-file <file>- Load environment variables from file (can be used multiple times)
-
kernel deploy logs <deployment_id>- Stream logs for a deployment--follow,-f- Follow logs in real-time (stream continuously)--since,-s- How far back to retrieve logs. Duration formats: ns, us, ms, s, m, h (e.g., 5m, 2h, 1h30m). Timestamps also supported: 2006-01-02, 2006-01-02T15:04, 2006-01-02T15:04:05, 2006-01-02T15:04:05.000--with-timestamps,-t- Include timestamps in each log line
-
kernel deploy history [app_name]- Show deployment history--limit <n>- Max deployments to return (default: 100; 0 = all)
-
kernel invoke <app> <action>- Run an app action--version <version>,-v- Specify app version (default: latest)--payload <json>,-p- JSON payload for the action--sync,-s- Invoke synchronously (timeout after 60s)
-
kernel app list- List deployed apps--name <app_name>- Filter by app name--version <version>- Filter by version
-
kernel app history <app_name>- Show deployment history for an app--limit <n>- Max deployments to return (default: 100; 0 = all)
kernel logs <app_name>- View app logs--version <version>- Specify app version (default: latest)--follow,-f- Follow logs in real-time--since <time>,-s- How far back to retrieve logs (e.g., 5m, 1h)--with-timestamps- Include timestamps in log output
kernel browsers list- List running browserskernel browsers create- Create a new browser session-p, --persistence-id <id>- Unique identifier for browser session persistence-s, --stealth- Launch browser in stealth mode to avoid detection-H, --headless- Launch browser without GUI access--kiosk- Launch browser in kiosk mode
kernel browsers delete <id or persistent id>- Delete a browser-y, --yes- Skip confirmation prompt
kernel browsers view <id or persistent id>- Get live view URL for a browser
kernel browsers logs stream <id or persistent id>- Stream browser logs--source <source>- Log source: "path" or "supervisor" (required)--follow- Follow the log stream (default: true)--path <path>- File path when source=path--supervisor-process <name>- Supervisor process name when source=supervisor. Most useful value is "chromium"
kernel browsers replays list <id or persistent id>- List replays for a browserkernel browsers replays start <id or persistent id>- Start a replay recording--framerate <fps>- Recording framerate (fps)--max-duration <seconds>- Maximum duration in seconds
kernel browsers replays stop <id or persistent id> <replay-id>- Stop a replay recordingkernel browsers replays download <id or persistent id> <replay-id>- Download a replay video-o, --output <path>- Output file path for the replay video
kernel browsers process exec <id or persistent id> [--] [command...]- Execute a command synchronously--command <cmd>- Command to execute (optional; if omitted, trailing args are executed via /bin/bash -c)--args <args>- Command arguments--cwd <path>- Working directory--timeout <seconds>- Timeout in seconds--as-user <user>- Run as user--as-root- Run as root
kernel browsers process spawn <id or persistent id> [--] [command...]- Execute a command asynchronously--command <cmd>- Command to execute (optional; if omitted, trailing args are executed via /bin/bash -c)--args <args>- Command arguments--cwd <path>- Working directory--timeout <seconds>- Timeout in seconds--as-user <user>- Run as user--as-root- Run as root
kernel browsers process kill <id or persistent id> <process-id>- Send a signal to a process--signal <signal>- Signal to send: TERM, KILL, INT, HUP (default: TERM)
kernel browsers process status <id or persistent id> <process-id>- Get process statuskernel browsers process stdin <id or persistent id> <process-id>- Write to process stdin (base64)--data-b64 <data>- Base64-encoded data to write to stdin (required)
kernel browsers process stdout-stream <id or persistent id> <process-id>- Stream process stdout/stderr
kernel browsers fs new-directory <id or persistent id>- Create a new directory--path <path>- Absolute directory path to create (required)--mode <mode>- Directory mode (octal string)
kernel browsers fs delete-directory <id or persistent id>- Delete a directory--path <path>- Absolute directory path to delete (required)
kernel browsers fs delete-file <id or persistent id>- Delete a file--path <path>- Absolute file path to delete (required)
kernel browsers fs download-dir-zip <id or persistent id>- Download a directory as zip--path <path>- Absolute directory path to download (required)-o, --output <path>- Output zip file path
kernel browsers fs file-info <id or persistent id>- Get file or directory info--path <path>- Absolute file or directory path (required)
kernel browsers fs list-files <id or persistent id>- List files in a directory--path <path>- Absolute directory path (required)
kernel browsers fs move <id or persistent id>- Move or rename a file or directory--src <path>- Absolute source path (required)--dest <path>- Absolute destination path (required)
kernel browsers fs read-file <id or persistent id>- Read a file--path <path>- Absolute file path (required)-o, --output <path>- Output file path (optional)
kernel browsers fs set-permissions <id or persistent id>- Set file permissions or ownership--path <path>- Absolute path (required)--mode <mode>- File mode bits (octal string) (required)--owner <user>- New owner username or UID--group <group>- New group name or GID
kernel browsers fs upload <id or persistent id>- Upload one or more files--file <local:remote>- Mapping local:remote (repeatable)--dest-dir <path>- Destination directory for uploads--paths <paths>- Local file paths to upload
kernel browsers fs upload-zip <id or persistent id>- Upload a zip and extract it--zip <path>- Local zip file path (required)--dest-dir <path>- Destination directory to extract to (required)
kernel browsers fs write-file <id or persistent id>- Write a file from local data--path <path>- Destination absolute file path (required)--mode <mode>- File mode (octal string)--source <path>- Local source file path (required)
kernel browsers extensions upload <id or persistent id> <extension-path>...- Ad-hoc upload of one or more unpacked extensions to a running browser instance.
-
kernel browsers computer click-mouse <id or persistent id>- Click mouse at coordinates--x <coordinate>- X coordinate (required)--y <coordinate>- Y coordinate (required)--num-clicks <n>- Number of clicks (default: 1)--button <button>- Mouse button: left, right, middle, back, forward (default: left)--click-type <type>- Click type: down, up, click (default: click)--hold-key <key>- Modifier keys to hold (repeatable)
-
kernel browsers computer move-mouse <id or persistent id>- Move mouse to coordinates--x <coordinate>- X coordinate (required)--y <coordinate>- Y coordinate (required)--hold-key <key>- Modifier keys to hold (repeatable)
-
kernel browsers computer screenshot <id or persistent id>- Capture a screenshot--to <path>- Output file path for the PNG image (required)--x <coordinate>- Top-left X for region capture (optional)--y <coordinate>- Top-left Y for region capture (optional)--width <pixels>- Region width (optional)--height <pixels>- Region height (optional)
-
kernel browsers computer type <id or persistent id>- Type text on the browser instance--text <text>- Text to type (required)--delay <ms>- Delay in milliseconds between keystrokes (optional)
-
kernel browsers computer press-key <id or persistent id>- Press one or more keys--key <key>- Key symbols to press (repeatable)--duration <ms>- Duration to hold keys down in ms (0=tap)--hold-key <key>- Modifier keys to hold (repeatable)
-
kernel browsers computer scroll <id or persistent id>- Scroll the mouse wheel--x <coordinate>- X coordinate (required)--y <coordinate>- Y coordinate (required)--delta-x <pixels>- Horizontal scroll amount (+right, -left)--delta-y <pixels>- Vertical scroll amount (+down, -up)--hold-key <key>- Modifier keys to hold (repeatable)
-
kernel browsers computer drag-mouse <id or persistent id>- Drag the mouse along a path--point <x,y>- Add a point as x,y (repeatable)--delay <ms>- Delay before dragging starts in ms--button <button>- Mouse button: left, middle, right (default: left)--hold-key <key>- Modifier keys to hold (repeatable)
kernel browsers playwright execute <id or persistent id> [code]- Execute Playwright/TypeScript code against the browser--timeout <seconds>- Maximum execution time in seconds (defaults server-side)- If
[code]is omitted, code is read from stdin
kernel extensions list- List all uploaded extensionskernel extensions upload <directory>- Upload an unpacked browser extension directory--name <name>- Optional unique extension name
kernel extensions download <id-or-name>- Download an extension archive--to <directory>- Output directory (required)
kernel extensions download-web-store <url>- Download an extension from the Chrome Web Store--to <directory>- Output directory (required)--os <os>- Target OS: mac, win, or linux (default: linux)
kernel extensions delete <id-or-name>- Delete an extension by ID or name-y, --yes- Skip confirmation prompt
-
kernel proxies list- List proxy configurations -
kernel proxies get <id>- Get a proxy configuration by ID -
kernel proxies create- Create a new proxy configuration--name <name>- Proxy configuration name--type <type>- Proxy type: datacenter, isp, residential, mobile, custom (required)--protocol <http|https>- Protocol to use (default: https)--country <code>- ISO 3166 country code or "EU" (location-based types)--city <name>- City name (no spaces, e.g. sanfrancisco) (residential, mobile; requires--country)--state <code>- Two-letter state code (residential, mobile)--zip <zip>- US ZIP code (residential, mobile)--asn <asn>- Autonomous system number (e.g., AS15169) (residential, mobile)--os <os>- Operating system: windows, macos, android (residential)--carrier <carrier>- Mobile carrier (mobile)--host <host>- Proxy host (custom; required)--port <port>- Proxy port (custom; required)--username <username>- Username for proxy authentication (custom)--password <password>- Password for proxy authentication (custom)
-
kernel proxies delete <id>- Delete a proxy configuration-y, --yes- Skip confirmation prompt
# Set individual variables
kernel deploy index.ts --env API_KEY=abc123 --env DEBUG=true
# Load from .env file
kernel deploy index.ts --env-file .env
# Combine both methods
kernel deploy index.ts --env-file .env --env OVERRIDE_VAR=value# Simple invoke
kernel invoke my-scraper scrape-page
# With JSON payload
kernel invoke my-scraper scrape-page --payload '{"url": "https://example.com"}'
# Synchronous invoke (wait for completion)
kernel invoke my-scraper quick-task --sync# Follow logs
kernel logs my-app --follow
# Show recent logs with timestamps
kernel logs my-app --since 1h --with-timestamps# List all browsers
kernel browsers list
# Create a new browser session
kernel browsers create
# Create a persistent browser session
kernel browsers create --persistence-id my-browser-session
# Create a headless browser in stealth mode
kernel browsers create --headless --stealth
# Create a browser in kiosk mode
kernel browsers create --kiosk
# Delete a persistent browser
kernel browsers delete --by-persistent-id my-browser-session --yes
# Get live view URL
kernel browsers view --by-id browser123
# Stream browser logs
kernel browsers logs stream my-browser --source supervisor --follow --supervisor-process chromium
# Start a replay recording
kernel browsers replays start my-browser --framerate 30 --max-duration 300
# Execute a command in the browser VM
kernel browsers process exec my-browser -- ls -alh /tmp
# Upload files to the browser VM
kernel browsers fs upload my-browser --file "local.txt:remote.txt" --dest-dir "/tmp"
# List files in a directory
kernel browsers fs list-files my-browser --path "/tmp"
# Click the mouse at coordinates (100, 200)
kernel browsers computer click-mouse my-browser --x 100 --y 200
# Double-click the right mouse button
kernel browsers computer click-mouse my-browser --x 100 --y 200 --num-clicks 2 --button right
# Move the mouse to coordinates (500, 300)
kernel browsers computer move-mouse my-browser --x 500 --y 300
# Take a full screenshot
kernel browsers computer screenshot my-browser --to screenshot.png
# Take a screenshot of a specific region
kernel browsers computer screenshot my-browser --to region.png --x 0 --y 0 --width 800 --height 600
# Type text in the browser
kernel browsers computer type my-browser --text "Hello, World!"
# Type text with a 100ms delay between keystrokes
kernel browsers computer type my-browser --text "Slow typing..." --delay 100
# Execute inline Playwright (TypeScript) code
kernel browsers playwright execute my-browser 'await page.goto("https://example.com"); const title = await page.title(); return title;'
# Or pipe code from stdin
cat <<'TS' | kernel browsers playwright execute my-browser
await page.goto("https://example.com");
const title = await page.title();
return { title };
TS
# With a timeout in seconds
kernel browsers playwright execute my-browser --timeout 30 'await (await context.newPage()).goto("https://example.com")'
# Mini CDP connection load test (10s)
cat <<'TS' | kernel browsers playwright execute my-browser
const start = Date.now();
let ops = 0;
while (Date.now() - start < 10_000) {
await page.evaluate("new Date();");
ops++;
}
const durationMs = Date.now() - start;
const opsPerSec = ops / (durationMs / 1000);
return { opsPerSec, ops, durationMs };
TS# List all uploaded extensions
kernel extensions list
# Upload an unpacked extension directory
kernel extensions upload ./my-extension --name my-custom-extension
# Download an extension from Chrome Web Store
kernel extensions download-web-store "https://chrome.google.com/webstore/detail/extension-id" --to ./downloaded-extension
# Download a previously uploaded extension
kernel extensions download my-extension-id --to ./my-extension
# Delete an extension
kernel extensions delete my-extension-name --yes
# Upload extensions to a running browser instance
kernel browsers extensions upload my-browser ./extension1 ./extension2# List proxy configurations
kernel proxies list
# Create a datacenter proxy
kernel proxies create --type datacenter --country US --name "US Datacenter"
# Create a datacenter proxy using HTTP protocol
kernel proxies create --type datacenter --country US --protocol http --name "US DC (HTTP)"
# Create a custom proxy
kernel proxies create --type custom --host proxy.example.com --port 8080 --username myuser --password mypass --name "My Custom Proxy"
# Create a residential proxy with location and OS
kernel proxies create --type residential --country US --city sanfrancisco --state CA --zip 94107 --asn AS15169 --os windows --name "SF Residential"
# Create a mobile proxy with carrier
kernel proxies create --type mobile --country US --carrier verizon --name "US Mobile"
# Get proxy details
kernel proxies get prx_123
# Delete a proxy (skip confirmation)
kernel proxies delete prx_123 --yeskernel --help- Show all available commandskernel <command> --help- Get help for a specific command
For complete documentation, visit:
For development and contribution information, see DEVELOPMENT.md.