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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@quantcdn/quant-cli

v5.1.1

Published

Deploy tools for QuantCDN

Readme

QuantCDN CLI

Command line tools for QuantCDN.

Installation

npm install -g @quantcdn/quant-cli

Usage

The CLI can be used in two modes:

Interactive Mode

Simply run:

quant

This will launch an interactive prompt that guides you through available commands and options.

CLI Mode

quant <command> [options]

Available Commands

Configuration

  • quant init - Initialize a project in the current directory

    quant init [--dir=<build-dir>]
  • quant info - Show information about current configuration

Content Management

  • quant deploy [dir] - Deploy the output of a static generator

    quant deploy [dir] [--attachments] [--skip-unpublish] [--skip-unpublish-regex=pattern] [--enable-index-html] [--chunk-size=10] [--force]
  • quant file <file> <location> - Deploy a single asset

    quant file path/to/file.jpg /images/file.jpg
  • quant page <file> <location> - Make a local page asset available

    quant page path/to/page.html /about-us [--enable-index-html]

Publishing Controls

  • quant publish <path> - Publish an asset

    quant publish /about-us [--revision=latest]
  • quant unpublish <path> - Unpublish an asset

    quant unpublish /about-us
  • quant delete <path> - Delete a deployed path

    quant delete /about-us [--force]

Cache Management

  • quant purge <path> - Purge the cache for a given URL or cache keys
    quant purge /about-us                        # Purge by path
    quant purge "/*"                            # Purge all content
    quant purge --cache-keys="key1 key2"        # Purge by cache keys
    quant purge /about-us --soft-purge          # Mark as stale instead of deleting

Redirects

  • quant redirect <from> <to> [status] - Create a redirect
    quant redirect /old-page /new-page [--status=301]

Edge Functions

  • quant function <file> <description> [uuid] - Deploy an edge function

    quant function handler.js "My edge function"                                     # Deploy new function
    quant function handler.js "Updated function" 019361ae-2516-788a-8f50-e803ff561c34  # Update existing
  • quant filter <file> <description> [uuid] - Deploy an edge filter function

    quant filter filter.js "My edge filter"                                         # Deploy new filter
    quant filter filter.js "Updated filter" 019361ae-2516-788a-8f50-e803ff561c34   # Update existing
  • quant auth <file> <description> [uuid] - Deploy an edge auth function

    quant auth auth.js "My auth function"                                          # Deploy new auth function
    quant auth auth.js "Updated auth" 019361ae-2516-788a-8f50-e803ff561c34        # Update existing

Search

  • quant search <operation> - Perform search index operations
    quant search status                         # Show search index status
    quant search index --path=records.json      # Add/update search records
    quant search unindex --path=/url/to/remove  # Remove item from search index
    quant search clear                          # Clear entire search index

You may index new content or update existing content in the search index directly. Simply provide one or multiple records in JSON files. For example, consider a search-records.json file containing the following:

[
    {
        "title": "This is a record",
        "url": "/blog/page",
        "summary": "The record is small and neat.",
        "content": "Lots of good content here. But not too much!"
    },
    {
        "title": "Fully featured search record",
        "url": "/about-us",
        "summary": "The record contains all the trimmings.",
        "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
        "image": "https://www.example.com/images/about.jpg",
        "categories": [ "Blog", "Commerce", "Jamstack" ],
        "tags": [ "Tailwind" , "QuantCDN" ],
        "author": "John Doe",
        "publishDate": "2024-02-22",
        "readTime": "5 mins",
        "customField": "Any value you need"
    }
]

Required fields for each record:

  • title: The title of the page
  • url: The URL path of the page
  • content: The searchable content

Common optional fields:

  • summary: A brief description
  • image: URL to an associated image
  • categories: Array of category names
  • tags: Array of tag names

You can include any additional key/value pairs in your records. These custom fields will be indexed and available for filtering, faceting, or display in your search integration.

Validation

  • quant scan - Validate local file checksums
    quant scan [--diff-only] [--unpublish-only] [--skip-unpublish-regex=pattern]

WAF Logs

  • quant waf:logs - Access project WAF logs
    quant waf:logs [--fields=field1,field2] [--output=file.csv] [--all] [--size=10]

Global Options

These options can be used with any command:

--clientid, -c    Project customer id for QuantCDN
--project, -p     Project name for QuantCDN
--token, -t       Project token for QuantCDN
--endpoint, -e    API endpoint for QuantCDN (default: "https://api.quantcdn.io/v1")

Configuration

The CLI can be configured using either:

  1. Interactive initialization: quant init
  2. Command line arguments (see Global Options)
  3. Environment variables:
    • QUANT_CLIENT_ID
    • QUANT_PROJECT
    • QUANT_TOKEN
    • QUANT_ENDPOINT
  4. Configuration file: quant.json in the current directory

Missing configuration will be handled differently depending on the context:

  • Running quant with no arguments will prompt to initialize a new project
  • Running specific commands without configuration will show detailed setup instructions

Examples

# Initialize a new project
quant init

# Deploy a directory
quant deploy build --attachments

# Upload a single file
quant file ./logo.png /images/logo.png

# Create a redirect
quant redirect /old-page /new-page --status=301

# Purge cache with various options
quant purge "/*"                              # Purge all content
quant purge --cache-keys="key1 key2"          # Purge specific cache keys
quant purge /about --soft-purge               # Soft purge a path

# Deploy edge functions
quant function handler.js "My edge function"   # Deploy a new function
quant auth auth.js "My auth function"          # Deploy an auth function
quant filter filter.js "My edge filter"        # Deploy a filter function

# Check deployment status
quant scan --diff-only

Testing

npm run lint
npm run test

Contributing

Issues and feature requests are managed via Github and pull requests are welcomed.