Synopsis
Export captured network requests to HTTP Archive (HAR) 1.2 format for analysis, sharing, or import into other tools.Description
Thenetwork har command exports all network requests from the current session (or from session.json if no active session) to HAR 1.2 format. HAR files can be imported into Chrome DevTools, HAR analyzers, performance tools, and other debugging utilities.
If no output file is specified, generates a timestamped filename in ~/.bdg/capture-YYYY-MM-DD-HHMMSS.har.
Supports filtering with the same DevTools DSL syntax as network list to export only relevant requests.
Arguments
Path to output HAR file. If not provided, generates timestamped filename in
~/.bdg/ directory.Examples:capture.har- Save to current directory/tmp/debug.har- Absolute path~/Desktop/session.har- Home directory
Options
Output result metadata in JSON format (file path, entry count, filter status).
Filter requests using DevTools DSL syntax before exporting. Same syntax as
network list --filter.Examples:status-code:>=400- Export only failed requestsdomain:api.*- Export only API requestslarger-than:100KB- Export only large responses!resource-type:Image,Media- Exclude media files
Filter Syntax
The--filter option uses Chrome DevTools filter DSL. See network list for complete syntax reference.
Quick Reference:
Output Format
Human-readable (default)
JSON Format
HAR File Structure
Generated HAR files conform to HAR 1.2 specification:Examples
Export all requests with auto-generated filename
Export to specific file
Export only failed requests
Export API requests only
Export excluding large media files
Export from stopped session
Get export metadata as JSON
Export specific domain’s requests
Use Cases
Import into Chrome DevTools
- Export HAR file:
bdg network har session.har - Open Chrome DevTools (F12)
- Go to Network tab
- Right-click → “Import HAR file”
- Select your exported file
Share debugging session
Performance analysis
Automated testing
Exit Codes
HAR file exported successfully
Invalid filter syntax or malformed filter DSL
No active session and no
session.json file foundFailed to connect to daemon (for live session)
Failed to write HAR file (check permissions and disk space)
Tips
See Also
- network list - List and filter network requests
- network headers - Inspect HTTP headers
- peek - Quick session overview
- stop - Stop session and save to session.json

