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

@chec/cli

v1.3.0

Published

A command line interface for using the Chec API

Downloads

23

Readme

Chec CLI

Usage

$ npm install -g @chec/cli
$ chec COMMAND
running command...
$ chec (-v|--version|version)
@chec/cli/1.3.0 darwin-x64 node-v12.20.0
$ chec --help [COMMAND]
USAGE
  $ chec COMMAND
...

Commands

chec demo-store [STORE] [TARGETDIRECTORY]

Create a demo store using Chec and Commerce.js

USAGE
  $ chec demo-store [STORE] [TARGETDIRECTORY]

ARGUMENTS
  STORE            The store that you want your example based off of
  TARGETDIRECTORY  The destination directory name to download the example to. The defaults to the store name

OPTIONS
  --env=env   Extra env variables to set for a .env file in the installed project

  --no-login  Optionally skip the login requirement. This is likely to be incompatible with example stores that are
              available for download

  --no-seed   Optionally skip seeding sample data into your Chec account

DESCRIPTION
  This command will download an example project from GitHub and initialise it on your machine. You will be free to edit 
  the downloaded code and play around with Commerce.js in client code

See code: src/commands/demo-store.js

chec help [COMMAND]

display help for chec

USAGE
  $ chec help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

chec log LOGID

Get full detail about a given log ID

USAGE
  $ chec log LOGID

ARGUMENTS
  LOGID  The log ID for the log entry you want to retrieve

OPTIONS
  --raw  Display a "raw" unformatted JSON blob of the log details
  --utc  Display timestamps in UTC timezone instead of the local timezone

DESCRIPTION
  Communicates with Chec to get full log information for the given log ID

See code: src/commands/log.js

chec login

Log into your Chec account

USAGE
  $ chec login

OPTIONS
  -e, --email=email        Your accounts email address
  -p, --password=password  The password to login with
  --skip-check             Indicate that this command should skip checking if a user is already logged in

DESCRIPTION
  Log into your Chec account to enable commands that require API access.

See code: src/commands/login.js

chec logout

Log out of your account

USAGE
  $ chec logout

DESCRIPTION
  Log out of your account and remove the local copy of your API keys.

See code: src/commands/logout.js

chec logs

Show a summary of your API requests processed by Chec.

USAGE
  $ chec logs

OPTIONS
  -f, --[no-]follow      "Follow" logs from Chec. New events that happen are shown live
  -h, --history=history  [default: 100] Keep record of the given number of logs when browsing back.
  -n, --tail=tail        Show the last n number of logs before listening for new logs
  --utc                  Display timestamps in UTC timezone

DESCRIPTION
  Listens for logs from Chec and displays a summary of them to you as they are processed by Chec.
  You may optionally retrieve prior logs and navigate through shown logs to fetch further details about the log entry 
  from Chec.

See code: src/commands/logs.js

chec register

Register an account with Chec

USAGE
  $ chec register

DESCRIPTION
  Sign up for a Chec account through your browser

See code: src/commands/register.js

chec request METHOD RESOURCE [PAYLOAD]

Run abstract API request

USAGE
  $ chec request METHOD RESOURCE [PAYLOAD]

ARGUMENTS
  METHOD    (GET|POST|PUT|PATCH|DELETE) HTTP method
  RESOURCE  API resource (e.g. /v1/products)
  PAYLOAD   Request payload (JSON encoded)

OPTIONS
  --file=file  Optional: path to JSON encoded file containing request payload
  --sandbox    Use sandbox API keys

DESCRIPTION
  Runs an arbitrary API request given the HTTP method, endpoint, and input payload.

  Data should be provided as a JSON object. You may also use `--sandbox` to use
  sandbox API keys.

EXAMPLES
  $ chec request GET /v1/products
  $ chec request GET /v1/orders
  $ chec request GET /v1/products '{"limit":1}'
  $ chec request GET /v1/products '{"limit":1}' --sandbox
  $ chec request POST /v1/assets --file=my-asset-payload.json

See code: src/commands/request.js

chec whoami

Get information on your user account

USAGE
  $ chec whoami

DESCRIPTION
  Fetches information on your user account, and merchants associated with your account.

EXAMPLE
  $ chec whoami

See code: src/commands/whoami.js