Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@ Open-source diagnostics for checking what public websites return to crawlers.

The CLI inspects returned HTML, compares browser-style and crawler-style responses, and validates common discovery files. It does not render JavaScript, change a website, require a Prerender Buddy account, or predict search rankings, indexing, AI citations, mentions, or traffic.

This is an early public release. The npm package is being prepared; until it is published, run the CLI from a local checkout.
This is an early public release. Install it from npm or run it from a local checkout.

## Requirements

- Node.js 20 or newer
- A public HTTP or HTTPS URL

Local usage:
Run without installing:

```bash
node ./bin/prerenderbuddy.js check https://example.com
node ./bin/prerenderbuddy.js compare https://example.com --user-agent gptbot
node ./bin/prerenderbuddy.js files https://example.com
npx @prerenderbuddy/cli check https://example.com
npx @prerenderbuddy/cli compare https://example.com --user-agent gptbot
npx @prerenderbuddy/cli files https://example.com
```

Proposed usage after publication:
Local checkout usage:

```bash
npx @prerenderbuddy/cli check https://example.com
node ./bin/prerenderbuddy.js check https://example.com
node ./bin/prerenderbuddy.js compare https://example.com --user-agent gptbot
node ./bin/prerenderbuddy.js files https://example.com
```

## Commands
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"name": "@prerenderbuddy/cli",
"version": "0.1.0",
"version": "0.1.1",
"description": "Open-source crawler-readability and discovery-file diagnostics for public websites.",
"homepage": "https://github.com/kopachlager/prerenderbuddy-cli#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/kopachlager/prerenderbuddy-cli.git"
},
"bugs": {
"url": "https://github.com/kopachlager/prerenderbuddy-cli/issues"
},
"type": "module",
"bin": {
"prerenderbuddy": "bin/prerenderbuddy.js"
Expand Down
7 changes: 6 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { readFileSync } from 'node:fs';
import { checkUrl } from './check.js';
import { compareUrl } from './compare.js';
import { checkDiscoveryFiles } from './discovery.js';
import { formatHuman } from './format.js';
import { USER_AGENT_PROFILES } from './profiles.js';

const { version: VERSION } = JSON.parse(
readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
);

const HELP = `Prerender Buddy CLI

Usage:
Expand Down Expand Up @@ -64,7 +69,7 @@ export async function runCli(args) {
return;
}
if (options.version) {
process.stdout.write('0.1.0\n');
process.stdout.write(`${VERSION}\n`);
return;
}

Expand Down
Loading