Documentation
¶
Overview ¶
Command chrome-to-har records browser activity and generates HAR (HTTP Archive) files.
This tool launches Chrome/Chromium, navigates to specified URLs, and captures all network traffic in the standard HAR format. It supports both interactive browsing and automated capture modes.
Usage:
chrome-to-har [flags] [URL...]
Common flags:
-o file Output HAR file (default: output.har) -profile name Use specific Chrome profile -timeout sec Global timeout in seconds (default: 30) -headless Run in headless mode -filter regex Filter requests by URL pattern -block regex Block requests matching pattern -interactive Enable interactive JavaScript mode
Examples:
# Record a single page chrome-to-har https://example.com # Use a specific Chrome profile chrome-to-har -profile "Default" https://github.com # Filter only API requests chrome-to-har -filter "api\." https://example.com # Block tracking scripts chrome-to-har -block "analytics|tracking" https://news.site.com # Interactive mode with JavaScript console chrome-to-har -interactive https://example.com
The tool captures detailed timing information, request/response headers, cookies, and response content. The output HAR file can be analyzed using various HAR viewers and development tools.
Interactive mode provides a JavaScript console for executing commands in the browser context, useful for debugging and automation tasks.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
cdp
command
cdp: Interactive Chrome DevTools Protocol Command-Line Tool
|
cdp: Interactive Chrome DevTools Protocol Command-Line Tool |
|
churl
command
Command churl is like curl but runs through Chrome and can handle JavaScript/SPAs.
|
Command churl is like curl but runs through Chrome and can handle JavaScript/SPAs. |
|
native-host
command
Native messaging host for Chrome AI extension
|
Native messaging host for Chrome AI extension |
|
internal
|
|
|
browser
Package browser provides abstractions for managing Chrome browser instances.
|
Package browser provides abstractions for managing Chrome browser instances. |
|
errors
Package errors provides comprehensive error handling utilities for chrome-to-har.
|
Package errors provides comprehensive error handling utilities for chrome-to-har. |
|
health
Package health provides comprehensive health check functionality for Chrome AI integration
|
Package health provides comprehensive health check functionality for Chrome AI integration |
|
langmodel
Package langmodel provides access to Chrome's LanguageModel APIs for on-device inference.
|
Package langmodel provides access to Chrome's LanguageModel APIs for on-device inference. |
|
limits
Package limits provides resource limiting and DoS prevention functionality.
|
Package limits provides resource limiting and DoS prevention functionality. |
|
output
Package output handles different output formats for Chrome data.
|
Package output handles different output formats for Chrome data. |
|
secureio
Package secureio provides secure file system operations with proper validation and limits.
|
Package secureio provides secure file system operations with proper validation and limits. |
|
validation
Package validation provides comprehensive input validation for security hardening.
|
Package validation provides comprehensive input validation for security hardening. |
|
visual
Package visual provides comprehensive visual regression testing capabilities
|
Package visual provides comprehensive visual regression testing capabilities |
Click to show internal directories.
Click to hide internal directories.