readme.md 1.04 KB
Newer Older
Stanley Shyiko's avatar
Stanley Shyiko committed
1 2
# electron-har

3
A command-line tool for generating [HTTP Archive (HAR)](http://www.softwareishard.com/blog/har-12-spec/) (based on [Electron](http://electron.atom.io/)).
Stanley Shyiko's avatar
Stanley Shyiko committed
4

Stanley Shyiko's avatar
Stanley Shyiko committed
5
The data you get is identical to "Chromium -> Developer Tools -> Network pane -> Save All as HAR".
Stanley Shyiko's avatar
Stanley Shyiko committed
6

Stanley Shyiko's avatar
Stanley Shyiko committed
7 8
## Installation

9 10 11 12
Prebuilt binaries can be found on the [release(s)](https://github.com/shyiko/electron-har/releases) page.

You can also use [npm](https://www.npmjs.com/):

Stanley Shyiko's avatar
Stanley Shyiko committed
13 14 15 16
```sh
npm install -g electron-har
```

Stanley Shyiko's avatar
Stanley Shyiko committed
17 18 19
> In order for Electron to work on Debian/Ubuntu (specifically on Debian 8/Ubuntu 12.04)
following packages have to be installed `libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3`.

Stanley Shyiko's avatar
Stanley Shyiko committed
20 21 22
## Usage

```sh
Stanley Shyiko's avatar
Stanley Shyiko committed
23
electron-har http://google.com # writes HAR to stdout
Stanley Shyiko's avatar
Stanley Shyiko committed
24

Stanley Shyiko's avatar
Stanley Shyiko committed
25 26 27 28 29 30
# in a headless environment (CI agent on Linux?) - xvfb-run will do just fine 
DISPLAY=:1 xvfb-run electron-har http://google.com -o google_com.har

# to see a complete list of command line options
electron-har --help
```
Stanley Shyiko's avatar
Stanley Shyiko committed
31 32 33 34

## License

[MIT License](https://github.com/shyiko/electron-har/blob/master/mit.license)