# snapage-cli
snap a web page cli

# install
```bash
yarn add snapage
```

# usage
```bash
snapage https://google.com -v '800x600' 'iPad Pro' -s 'filter: grayscale(100%)'
```

![](./iPad_Pro.png)


# api
```typescript
async snap(url: string, options?: SnapageOptions): Promise<Array<Buffer>>;
```

# options
see [snapage](https://github.com/tool3/snapage#options) for options

# option coercion
when providing `snapage` with `--viewports, -v` or `--style, -s`,   
`snapage-cli` will coerece the input to suit the expected input by `snapage`.

### `style`
when providing styles - it will be applied to the `body` element (future release will include class based css).
the provided styles should be sperated by a colon (`:`) and different styles separated by semi-colon (`;`).   
for example: `snapage https://google.com -s 'border: 1px solid red; filter: scale(1.1);'`

### `viewports`
when providing viewport sizes (as opposed to device name such as `iPad Pro`) - use a `x` seperator between width and height.   
for example: `snapapage https://github.com -v '800x600' '1240x1080' 'iPhone X'`