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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loopfortress/jingle-cli

v0.0.5

Published

A policy-driven JOSE Key Management Tool

Readme

LoopFortress Jingle CLI

Jingle is a policy-driven JOSE Key Management Framework with declarative config, CLI, and runtime engine.

Features

General

  • Uniform DX across symmetric + asymmetric + PBES2 + ECDH + AES-KW/GCMKW
  • CLI for keygen, keystore and token operations

Keygen

  • A declarative keygen architecture: spec → keystore → token factory (clean lifecycle flow)
  • Purpose-based key groups (rotate under "access", "refresh", "userdata", etc.)
  • Automatic kid assignment (user doesn’t have to care at all)
  • Configurable key ID formatting (fun but harmless DX feature)

Keystore

  • A type-safe JWK registry with strong typing for alg families & policies
  • A clean keystore → runtime in-memory engine
  • Optional external key import
  • Optional strict/lenient policies and fallback logic for broken external integrations
  • Automatic rotation with purpose groups

Token Factory

  • Built-in JWT/JWS/JWE minting & verification
  • A declarative token profile layer with mint & verify policies
  • Mint & accept rules per token profile (structural authentication policy system)

Library Usage

config/jingle/Keystore.yaml

  • This Keystore.yaml is used to configure the keystore.
  • It defines the key groups and their policies.
  • The key groups are referenced in the token factory config.
  • You don't need to mount this file in the docker-compose.yaml.
  • It's used to generate the keystore at build time.
version: '1.0'

forge:
  sig:
    demo-signer-key:
      alg: ES256
      policy:
        curve: P-256

  enc: {}

config/jingle/Keystore.json

  • Use the Jingle CLI to generate the keystore to a location of your choice.
  • In this example, we generat the keystore next to the Jingle.yaml config file (Jinglestore.json).
JINGLE_RC=config/jingle/Keystore.yaml jingle forge # use --force to overwrite an existing keystore

config/jingle/Factory.yaml

  • This Jingle.yaml is used to configure the token factory and the keystore location.
  • It defines the token profiles and their mint & accept rules.
  • The token profiles are referenced in the app.
version: '1.0'

keystoreLocation: /etc/jingle/Jinglestore.json

factory:
  # ===================== JWS Profiles =====================
  jws:
    demo-jws:
      description: "Demo Signer (JWS)"
      mint:
        group: demo-signer-key
        alg: ES256
      accept:
        kid: exact
        algs: [ES256]

  # ===================== JWE Profiles =====================
  jwe: {}

  # ===================== JWT Profiles =====================
  jwt: {}

  # ===================== JWN Profiles (JWE + JWS matrix) =====================
  jwn: {}

apps/index.ts

  • Load the runtime and run validation to ensure the config is healthy.
  • The runtime is used to mint and verify tokens in the app.
import { bootRuntimeOrCrash } from '@loopfortress/jingle-cli'

const rcFilePath = 'config/Factory.yaml'

console.log('Loading keys runtime', rcFilePath)

const r = async () => await bootRuntimeOrCrash(process.cwd(), rcFilePath)

export const runtime = await r()
const ok = runtime.factory.doctor()
if (!ok) {
  console.error('Keys runtime failed to load')
  process.exit(1)
}

console.log('Keys runtime loaded')

const jws = await runtime.factory.mintJWS('demo-jws', {/* payload */})
try {
  const payload = await runtime.factory.verifyJWS('demo-jws', jws)
  console.log('JWS verified:', payload)
} catch (error) {
  console.error('Error verifying JWS:', error)
}

docker-compose.yaml

  • Define a volume mount for the Jingle.yaml config file and a keystore.
  • The keystore is assumed to be previously generated.
version: '3.9'
services:
  demo:
    volumes:
      - ./app/index.ts:/workspace/index.ts:ro
      - ./config/jingle/Factory.yaml:/workspace/config/Factory.yaml:ro
      - ./config/jingle/Jinglestore.json:/etc/jingle/Jinglestore.json:ro

CLI