{"id":21851829,"url":"https://github.com/nberlette/harx","last_synced_at":"2025-03-21T18:27:05.661Z","repository":{"id":57261460,"uuid":"401217883","full_name":"nberlette/harx","owner":"nberlette","description":"HTTP Archive Extractor","archived":false,"fork":false,"pushed_at":"2023-08-03T05:46:14.000Z","size":264,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T13:21:51.034Z","etag":null,"topics":["archive","har","har-extractor","har-file","har-reader","harx","http","utility"],"latest_commit_sha":null,"homepage":"https://n.berlette.com/harx","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nberlette.png","metadata":{"funding":{"ko_fi":"nberlette"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-30T04:41:28.000Z","updated_at":"2022-03-03T04:23:37.000Z","dependencies_parsed_at":"2025-01-26T13:21:18.089Z","dependency_job_id":null,"html_url":"https://github.com/nberlette/harx","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fharx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fharx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fharx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fharx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nberlette","download_url":"https://codeload.github.com/nberlette/harx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244846622,"owners_count":20520160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","har","har-extractor","har-file","har-reader","harx","http","utility"],"created_at":"2024-11-28T01:11:31.798Z","updated_at":"2025-03-21T18:27:05.651Z","avatar_url":"https://github.com/nberlette.png","language":"TypeScript","funding_links":["https://ko-fi.com/nberlette"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n\u003ch1\u003e\u003ccode\u003e\u003ca href=\"https://npm.im/harx\"\u003e‹harx›\u003c/code\u003e\u003c/a\u003e\u003c/h1\u003e\n\n\u003cp\u003e\n  \n  Extract files from \u003ca href=\"https://w3c.github.io/web-performance/specs/HAR/Overview.html\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"HTTP Archive (HAR) format\"\u003eHTTP Archives \u003ccode\u003e(.har)\u003c/code\u003e\u003c/a\u003e with a simple command line interface.\n  \n\u003c/p\u003e\n  \n\u003c/div\u003e\n\n---  \n\n## Install\n\nTo utilize the `harx` command in your Terminal, you first must install it globally.\n\n### [`pnpm`](https://pnpm.io)\n\n```bash\npnpm i -g harx\n```\n\n### [`yarn`](https://yarnpkg.com)\n\n```bash\nyarn global add harx\n```\n\n---  \n\n## Usage\n\nAs long as `$(yarn global dir)` or pnpm's global dir is in your system's `$PATH` var, you can run **`harx`** directly:\n\n```bash\nUSAGE\n\n  $ harx \u003cfile\u003e [options]\n\n\nOPTIONS\n\n  -o, --output  [path]     Output path to extract files (default is ./output) \n  -i, --include [pattern]  RegExp pattern: extract matching files, unless excluded\n  -e, --exclude [pattern]  RegExp pattern: skips matching files, unless included\n\n  -n, --no-query           Strip the URL query string from file paths\n  -d, --dry-run            Do not persist any lasting changes. For testing.\n  -v, --verbose            Be more talkative\n  -h, --help               Displays this help page\n  --version                Displays the current harx version\n\n\nEXAMPLES\n\n  # extracts everything to /path/to/out/net\n  harx ./net.har --output /path/to/output\n\n  # includes only .html files\n  harx archive.har --exclude \"*\" --include \"*.html\"\n\n  # excludes only .js files\n  harx archive.har --include \"*\" --exclude \"*.js\" \n```\n\n## Options\n\n```bash\n-o, --output  [path]     Output path for extracted files (default is ./output) \n-i, --include [pattern]  RegExp pattern: extract matching files, unless excluded\n-e, --exclude [pattern]  RegExp pattern: skips matching files, unless included\n\n-n, --no-query           Strip the URL query string from file paths\n-d, --dry-run            Don't persist any lasting changes. For testing.\n-v, --verbose            Be more talkative\n```\n\n\u003e **Note:** if you get an error stating `harx cannot be found` or similar, try to run `pnpx harx` or `npx harx` instead.\n\n## Examples\n\n### Basic extraction\n\n```bash\n# extracts HTTP snapshot into \"./output/nberlette.github.io\" subfolder\n# includes all images, fonts, styles, and HTML files that DevTools\n# recorded in the Network log before you exported the HAR file.\n\nharx ./nberlette.github.io.har -o ./output --no-query\n```\n\n### Includes and Excludes\n\n#### Excludes all files except `.html` and `.css`\n\n```bash\nharx ./archive.org.har --exclude \"*\" --include \"*.html\" --include \"*.css\"\n```\n\n#### Includes only `.png` images, nothing else\n\n```bash\nharx ./archive.har -o images -e \"*\" -i \"*.png\"\n```\n\n### Dry Runs\n\nIf you'd like to simply examine what files **_would_** be extracted, without actually writing to the file system...\n\n```bash\nharx ./archive.har --output output --dry-run --verbose\n```\n\n---  \n\n### References\n\n* [HAR 1.2 Spec | Software is hard](http://www.softwareishard.com/blog/har-12-spec/ \"HAR 1.2 Spec | Software is hard\")\n* [HTTP Archive (HAR) format](https://w3c.github.io/web-performance/specs/HAR/Overview.html \"HTTP Archive (HAR) format\")\n* [micmro/har-format-ts-declaration: TypeScript typing for HAR (HTTP Archive) 1.2](https://github.com/micmro/har-format-ts-declaration \"micmro/har-format-ts-declaration: TypeScript typing for HAR (HTTP Archive) 1.2\")\n\n### License\n\n\u003cdiv align=\"center\"\u003e\n  \nMIT © 2022 [Nicholas Berlette](https://github.com/nberlette) • Inspired by [azu](https://github.com/azu)\n  \n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Fharx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnberlette%2Fharx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Fharx/lists"}