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

@klevar/portal-cli

v0.1.1

Published

First-class npm CLI for the Klevar Client Management Portal

Readme

@klevar/portal-cli

First-class npm CLI for the Klevar Client Management Portal.

Install

Run without installing:

npx @klevar/portal-cli help

Install globally for repeated use:

npm install -g @klevar/portal-cli
klevar-portal help

Configuration

Configuration is read from environment variables or ~/.klevar/portal.env.

PORTAL_API_URL=https://api.klevar.ai
PORTAL_API_KEY=cmp_live_replace_me
PORTAL_TOKEN=

PORTAL_API_URL defaults to http://127.0.0.1:3100 for local development. Use PORTAL_TOKEN only for client portal commands.

Do not paste API keys, portal tokens, or production secrets into chat logs, issue trackers, screenshots, or committed files.

Command Examples

npx @klevar/portal-cli health
npx @klevar/portal-cli tenant info
npx @klevar/portal-cli clients list
npx @klevar/portal-cli clients create --name "Stefan" --email "[email protected]" --platform direct
npx @klevar/portal-cli projects create <clientId> --name "Idealo" --externalRef "idealo:ksh.de"
npx @klevar/portal-cli metrics push --external_ref "idealo:ksh.de" --source_ref "run:33" --snapshot_date "2026-04-12" --metrics '{"score":88}'
npx @klevar/portal-cli portal me --portal-token "<client-token>"

Brain Usage

Brain usage should prefer the published npx @klevar/portal-cli entrypoint.

Brain agents should call:

npx @klevar/portal-cli <resource> <action> [id] [--key value]

The local compatibility wrapper remains available for old automation after a build:

npm run cli:build
klevar-portal clients list

New automation should use npx @klevar/portal-cli.

Auth Modes

  • Admin and integration commands use X-API-Key.
  • Portal commands use PORTAL_TOKEN or --portal-token.
  • Public commands such as health checks and onboarding submission do not require credentials.

Explicit no-CLI exemptions are tracked in tools/commands/_exemptions.ts:

  • POST /api/admin/login, POST /api/admin/logout, and GET /api/admin/me are browser/session-only routes.
  • POST /api/tenants/register is public bootstrap/self-registration, not a normal operational CLI action.
  • POST /api/integration/klevar-docs/events is an inbound webhook called by Klevar Docs.

npm Release Flow

The npm release flow is automated in GitHub Actions and can be dry-run locally.

Dry-run locally:

npm run cli:publish:dry

Manual publish:

npm run cli:publish

GitHub Actions also provides:

  • .github/workflows/auto-publish-cli.yml: publishes from main when tools/** changes.
  • .github/workflows/publish-cli.yml: manual or portal-cli-v*.*.* tag fallback.

Security Notes

Do not paste API keys into shell history on shared machines. Prefer ~/.klevar/portal.env with user-only file permissions or a secret manager. Rotate a key immediately if it appears in logs or commits.