Go library for parsing Charles Proxy .chlz session files.
go get github.com/peter/charly
session, err := charly.OpenFile("capture.chlz")
if err != nil {
log.Fatal(err)
}
for _, txn := range session.Transactions {
fmt.Printf("%s %s%s → %d\n",
txn.Meta.Method,
txn.Meta.Host,
*txn.Meta.Path,
txn.Meta.Response.Status,
)
// txn.ResponseBody has the raw bytes
}Convert .chlz to HAR:
go run ./cmd/chlz2har input.chlz > output.har
A .chlz file is a ZIP archive. Each HTTP transaction is stored as a set of flat files:
0-meta.json # request/response metadata (always present)
0-req.dat # request body (optional, extension matches content type)
0-res.html # response body (optional)
1-meta.json
1-res.js
...
Body file extensions: .html, .js, .json, .txt, .dat (form data), .bin (binary).
The meta.json contains method, URL, headers, status, timing, TLS details, and connection info. HTTP/2 requests use pseudo-headers (:method, :path, etc.) instead of a first line. CONNECT tunnels have "tunnel": true and null timing fields.