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

@kruzer/cli

v2.0.5

Published

Kruzer platform CLI (krz): configure environments, sign in with password or Azure AD SSO, select tenants and run automations.

Downloads

550

Readme

@kruzer/cli

krz is the command-line interface for the Kruzer platform. It lets customers, partners and Kruzer teams configure an environment, sign in (username/password or Azure AD SSO), select the active tenant and run automation files — the same operations available in the web UI, from a terminal or CI.

Getting Started

Requires Node.js 18 or later.

npm install -g @kruzer/cli
krz configure   # point the CLI at your environment's UI host
krz login       # password or --sso

Commands

| Command | Description | |---------|-------------| | krz configure | Set the UI host and discover the backend service URLs | | krz login [--sso] [--provider <provider>] | Sign in with username/password or Azure AD SSO | | krz auth | Generate a new auth token based on the previous login | | krz select tenant | Select the tenant to be active when testing projects | | krz run <automation> [-p <params-file>] | Run an automation file |

Local state (host, session, tenant) is stored in ~/.config/configstore/krz-cli.json.

Authentication (krz login)

Run krz configure first (sets the host and discovers backend URLs), then sign in.

Username + password (default)

$ krz login
? How do you want to sign in? (Use arrow keys)
  SSO (recommended for corporate users)
❯ Username and password

Pick Username and password and enter your credentials. Nothing changes from previous versions.

SSO (Azure AD)

For corporate users (e.g. Microsoft/Azure AD accounts without a local password):

$ krz login --sso
# or choose "SSO" in the interactive menu
# optionally: krz login --sso --provider microsoft

Run krz configure first. The CLI reads the public SSO settings (Azure AD clientId/tenantId/authority) from the UI host's runtime config (${host}/config.js, the same file the web app uses) — no dedicated endpoint or env var needed.

What happens (OAuth 2.0 Device Authorization Grant, RFC 8628 — the flow az/gh/aws use):

  1. The CLI reads the public SSO config from the UI host's config.js.
  2. It requests a device code from Microsoft and prints a URL + short code, e.g.:
    To sign in, open https://microsoft.com/devicelogin and enter the code ABCD-1234
  3. You open that URL in a browser on any machine and enter the code; Microsoft shows "you can close this tab" when done.
  4. Meanwhile the CLI polls Microsoft until you finish, receives the id_token, then calls POST /v1/auth/login-sso to get the Kruzer JWT.
  5. The session is stored in ~/.config/configstore/krz-cli.json with authKind: "sso". No credentials are stored.

SSO sessions produce the same Kruzer session/permissions as password login, so krz tenant, krz run and krz configure work the same way. When an SSO session expires, the CLI re-runs the device code sign-in instead of replaying credentials.

Requirements / troubleshooting:

  • The client's Azure app registration must have Allow public client flows enabled (Authentication → Advanced settings). No redirect URI registration is needed.
  • No local browser is required — works over SSH/headless; just open the printed URL anywhere.
  • If a tenant's Conditional Access policy blocks device code flow, sign-in fails — contact the tenant admin.

Build and Test

npm ci
npm run lint           # eslint
npm run format:check   # prettier
npm run build          # tsc
npm run test:unit      # jest unit tests
npm run test:integration  # jest integration tests (device code flow + mocked Microsoft/iam-api)

Release

Publishing to npm is automated by .github/workflows/release.yml. To ship a new version:

git checkout main && git pull
npm version patch          # or minor / major — bumps package.json and creates the vX.Y.Z tag
git push origin main --follow-tags

Pushing the tag triggers the Release workflow, which re-runs lint, format check, build and tests, verifies the tag matches package.json, publishes to the public npm registry (org secret NPM_TOKEN_PUBLISH) and creates the GitHub release.

Contribute

Development happens on kruzer-corp/cli-builder. Open a pull request against main; every PR runs lint, format check, build and the test suites in CI. For bugs or feature requests, open an issue or contact the Kruzer Product Team.