https://github.com/dnrsm/pagespeed
CLI tool and API Wrapper for the PageSpeed Insights API written in Deno 🦕
https://github.com/dnrsm/pagespeed
deno pagespeed-insights pagespeed-insights-api typescript
Last synced: 3 months ago
JSON representation
CLI tool and API Wrapper for the PageSpeed Insights API written in Deno 🦕
- Host: GitHub
- URL: https://github.com/dnrsm/pagespeed
- Owner: dnrsm
- License: mit
- Created: 2020-08-06T07:15:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T17:22:11.000Z (almost 6 years ago)
- Last Synced: 2025-11-23T15:19:14.107Z (7 months ago)
- Topics: deno, pagespeed-insights, pagespeed-insights-api, typescript
- Language: TypeScript
- Homepage: https://deno.land/x/pagespeed
- Size: 469 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pagespeed
[](https://github.com/dnrsm/pagespeed/tags/)

[](https://nest.land/package/pagespeed)
CLI tool and API Wrapper for the [PageSpeed Insights API](https://developers.google.com/speed/docs/insights/v5/get-started) written in Deno
> Inspired by https://github.com/GoogleChromeLabs/psi
## Screen Shot

## Module
### Usage
```typescript
import { runPagespeed } from "https://deno.land/x/pagespeed/mod.ts";
const data = await runPagespeed("https://developers.google.com", {
strategy: "mobile",
});
console.log(data);
```
### Options
| Option | Type | Default | Description |
|-------|--------------------|-----------|----------------|
| `strategy` | `string` | `desktop` | The analysis strategy |
| `key` | `string` | ` ` | API Key |
## CLI
## Install
```
$ deno install --allow-net --name pagespeed https://deno.land/x/pagespeed/mod.ts
```
## Usage
```
pagespeed https://developers.google.com --strategy mobile --times 3
```
### Options
```shell
Usage: pagespeed [url] [options]
Options:
-h, --help: display help message
-s, --strategy: The analysis strategy (desktop or mobile) to use, and desktop is the default
-k, --key: API Key(Optional)
-t, --times: Number of times
-i, --interval: Time interval(ms)
```
## Testing
```shell
$ deno test --allow-net
```
## Code formatter
```shell
$ deno fmt
```
## License
[MIT LICENSE](LICENSE)