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

h2cli

v0.20.1

Published

A command line interface for HTTP/2

Downloads

36

Readme

h2cli

A command line interface for HTTP/2

How to use

npm package is available.

$ npm  install h2cli
$ h2cli

Documents

The documents are on Read the Docs.

Status

Build Status Coverage Status Code Climate

  • Supports h2, h2-14, and h2c
  • Stream priority is not implemented yet.

What is this for?

I developed it just for fun, but it would be useful for debugging your HTTP/2 implementation, for understanding HTTP/2 protocols, etc.

It works like this.

$ h2cli
h2> connect https://twitter.com/
Connecting to twitter.com:443
NPN Protocol: h2-13
h2> send settings
SEND[0]: [Lenght: 0, Type: SETTINGS(4), Flags: 0, StreamID: 0]
RECV[0]: [Lenght: 0, Type: SETTINGS(4), Flags: 1, StreamID: 0]
 Flags: ACK
RECV[0]: [Lenght: 6, Type: SETTINGS(4), Flags: 0, StreamID: 0]
 Params:
  SETTINGS_MAX_CONCURRENT_STREAMS: 100
SEND[0]: [Lenght: 0, Type: SETTINGS(4), Flags: 1, StreamID: 0]
 Flags: ACK

h2> head /
SEND[1]: [Lenght: 35, Type: HEADERS(1), Flags: 5, StreamID: 1]
 Flags: END_STREAM | END_HEADERS
STATE CHANGE[1]: IDLE -> HARF CLOSED (LOCAL)
RECV[1]: [Lenght: 679, Type: HEADERS(1), Flags: 5, StreamID: 1]
 Flags: END_STREAM | END_HEADERS
STATE CHANGE[1]: HARF CLOSED (LOCAL) -> CLOSED
[ [ ':status', '200' ],
  [ 'cache-control',
    'no-cache, no-store, must-revalidate, pre-check=0, post-check=0' ],
  [ 'content-length', '54506' ],
  [ 'content-type', 'text/html;charset=utf-8' ],
  [ 'date', 'Sun, 13 Jul 2014 06:33:46 GMT' ],
  [ 'expires', 'Tue, 31 Mar 1981 05:00:00 GMT' ],
  [ 'last-modified', 'Sun, 13 Jul 2014 06:33:46 GMT' ],
  [ 'ms', 'S' ],
  [ 'pragma', 'no-cache' ],
  [ 'server', 'tfe' ],
  [ 'set-cookie',
    'goth=1\u0000_twitter_sess=BAh7CSIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7ADoPY3JlYXRlZF9hdGwrCN9kbS5HAToMY3NyZl9p%250AZCIlMDM1NjdiNmI1OGRlOTEyYWUzYWU0NmE5OWVhZGU0ZmE6B2lkIiVlZjgy%250ANGNjN2QwM2QwMDcyZDA2ZTk5MDg4MzhmOWFiOA%253D%253D--64b935a3b1fa311d4a231a03b19a9c407d6d9669; Path=/; Domain=.twitter.com; Secure; HTTPOnly\u0000guest_id=v1%3A140523322695692534; Domain=.twitter.com; Path=/; Expires=Tue, 12-Jul-2016 06:33:46 UTC' ],
  [ 'status', '200 OK' ],
  [ 'strict-transport-security', 'max-age=631138519' ],
  [ 'x-content-type-options', 'nosniff' ],
  [ 'x-frame-options', 'SAMEORIGIN' ],
  [ 'x-transaction', '3f579f2a1c22c94b' ],
  [ 'x-ua-compatible', 'IE=edge,chrome=1' ],
  [ 'x-xss-protection', '1; mode=block' ] ]
h2> show s
settings  streams

h2> show streams
Stream #0, State: IDLE, Bytes Sent: 16, Bytes Received: 22
Stream #1, State: CLOSED, Bytes Sent: 43, Bytes Received: 687
h2>