npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ccht

v0.1.2

Published

A simple command0line tool to crawl and test your website

Downloads

3

Readme

ccht

npm Test and Lint Workflow Status Publish Package Workflow Status

Command-line Crawling HTTP Testing tool

ccht is a simple command-line tool to crawl and test your website resources' HTTP status code, like broken link checker.

Installation

You can skip installation if you use npx for one-time invocation.

$ npm i -D ccht

# or
$ yarn add -D ccht

Usage

ccht [options] <url>
# to crawl and test "https://example.com"
$ npx ccht 'https://example.com'

# to show help
$ npx ccht --help

ccht will crawl the site starting from the given URL.

Options

To see more options, run npx ccht --help.

Global Options

--crawler <name>

Choose crawler. Available crawlers:

node-http

Default. Crawls pages by using Node.js' HTTP module and cheerio.

puppeteer

Crawls pages by using a real browser through Puppeteer. You need to install puppeteer (npm i -D puppeteer) or configure your environment (browser DevTool protocol connection, executable.)

--reporter <name>

Specify reporter, which formats and outputs the test result.

code-frame

Default. Outputs human-friendly visuallized result.

json

Prints JSON string. Useful for a programmatic access to results.

$ npx ccht 'https://example.com' --reporter=json | jq

--include <urls>

A comma separated list of a URL to include in a result. Any URLs forward-matching will be crawled and be reported.

Defaults to the given URL. For example, given npx ccht 'https://example.com' then --include will be https://example.com.

--exclude <urls>

A comma separated list of a URL to exclude from a result. Any URLs forward-matching will be skipped nor be removed from a result.

--expected-status <HTTP status codes>

A comma separated list of an expected HTTP status code for pages. Any pages responded with other status codes result in error (unexpected_status).

Defaults to 200.

--exit-error-severity <list of severity>

Change which severities occurs exit status 1. Available severities are below:

  • danger
  • warning
  • info
  • debug

Defaults to danger.

Crawler Options

--timeout <ms>

Timeout for each page to load/response in crawling phase. This option value is directly goes to node-fetch's or puppeteer's one.

Defaults to 3000 (3s).

--concurrency <uint>

How many connection can exist at the same time, a size for connection pool.

Defaults to 1.