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

hyperverge

v0.1.4

Published

A CLI tool to interface with the Hyperverge API

Downloads

14

Readme

Hyperverge CLI

A CLI tool to interface with the Hyperverge API for document verification.

Installation

npm i -g hyperverge

Usage

Test the CLI connection

To test if your Hyperverge is reachable run. You should see an AoK! if everything went well.

hyperverge
test: Testing connection to Hyperverge...
test: AoK!

Getting help

hyperverge --help

Usage: hyperverge [options]

Options:
  -V, --version           output the version number
  -c, --config [path]     Config JSON File containing any or all of the other parameters. action, directory, file, output, appKey, appId, host (default: "./credentials.json")
  -a, --action [action]   The action to run. One of ["test","readPAN","readPassport","readAadhaar","readKYC"] (default: "test")
  -d, --directory [path]  The path to a folder of items to be used for the request
  -f, --file [path]       The path to a folder of items to be used for the request
  -o, --output [path]     The file to write the result of the operation to (default: "")
  -k, --app-key [key]     The Hyperverge App Key (default: "")
  -i, --app-id [id]       The Hyperverge App ID (default: "")
  -h, --host [host]       The Hypervege host to use
  -h, --help              output usage information

Abstract Example

hyperverge \
        --config /path/to/config.js \
        --host 'https://ind-docs.hyperverge.co/v2.0' \
        --app-key '<HYPERVERGE_APP_KEY>' \
        --app-id '<HYPERVERGE_APP_ID>' \
        --action '<test|readPAN|readPassport|readAAdhaar|readKYC>' \
        --directory '/path/directory' \
        --file '/path/to/file' \
        --output '/path/to/output'

Modes

The CLI can either upload one file to the service or attempt to recursively traverse a directory and attempt uploading all compatible files.

File Mode

To upload a single file to a service, specify the file option either via CLI or JSON config

hyperverge -a readKYC -f /path/to/file -c config.json

The output will be a single JSON object. If an error occurred, the JSON object will have an err key set.

Sample output:

{
  "action": "readKYC",
  "file": "/path/to/file",
  "status": "success",
  "statusCode": "200",
  "result": [
    ... results from Hyperverge ...
  ],
  "err": null
}

Directory Mode

To upload a directory of files recursively, specify the directory option either via CLI options or config file

hyperverge -a readKYC -d /path/to/directory -c config.json

The output will be a single JSON object having the keys success and errors which are both array of objects similar to the one above.

Configuration

This configuration can be passed via the CLI options listed above or via JSON configuration file.

Sample Configuration JSON:

{
  "host": "https://ind-docs.hyperverge.co/v2.0",
  "appId": "xxxxx",
  "appKey": "xxxxx",
  "action": "readKYC",
  "file": "/path/to/file",
  "directory": "/path/to/directory",
  "output": "/path/to/output"
}

Notes:

  • Passing both file and directory will cause an error. The CLI must be passed one or the other but not both.
  • The test action does not require credentials but every other action must have appKey and appId passed either via CLI or via the JSON configuration file.
  • If an option is passed to the CLI both via a JSON configuration and CLI parameters, the CLI parameter values get precedence
  • All options are supported both via JSON and CLI parameters