browser-network-recorder
v0.0.1
Published
Record Chrome network requests via Chrome DevTools Protocol
Readme
browser-network-recorder
A command-line tool to record Chrome network requests via Chrome DevTools Protocol (CDP).
Installation
npm install -g browser-network-recorderUsage
Run the brec command to launch a dedicated Chromium profile and start recording its network requests.
brecBy default it captures and saves only Fetch/XHR and Document requests to the ./brec-logs/ directory.
Options
Usage: brec [options]
Record Chrome network requests via Chrome DevTools Protocol
Options:
-V, --version output the version number
-p, --port <number> Chrome debugging port (default: "9222")
-h, --host <string> Chrome debugging host (default: "localhost")
-o, --output <directory> Output directory for network logs (default: "./brec-logs")
-n, --name <string> Session name (default: "session_1234567890")
-f, --filter <types> Filter request types (comma-separated). Options: all,xhr,document,stylesheet,script,font,image,media,websocket,manifest,other. Default: xhr,document (default: "xhr,document")
--no-kill Do not kill existing Chrome processes before launching
--help display help for commandFeatures
- Isolated Profile: Automatically utilizes a dedicated browser profile configuration ensuring your personal Chrome sessions, extensions, and caches do not intersect avoiding Chrome
--remote-debugging-portconflicts. - Bi-directional Exit Handling: Terminating the CLI exits the browser, and closing the browser automatically stops the recording gracefully and terminates the CLI.
- Log Indexing: Automatically creates an
_index.logfile of captured records providing a top-level snapshot of size, duration, and method.
License
MIT
