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

kapa-cli

v0.1.0

Published

Terminal CLI wrapper for the Kapa AI API.

Readme

Kapa CLI

A lightweight Node.js command-line client for the kapa.ai HTTP API.

Features

  • Reads prompts from arguments or stdin (echo foo | kapa --stdin)
  • Per-profile configuration saved under ~/.config/kapa-cli/config.json
  • Metadata injection, temperature control, resume threads, optional streaming
  • Local history tracked in ~/.local/share/kapa-cli/history.jsonl
  • Save responses to files or copy to clipboard
  • Basic management commands: config, history, and cache clear

Quick Start

# Protect secrets at rest before storing them locally
export KAPA_VAULT_KEY="your-long-random-passphrase"
export KAPA_HISTORY_KEY="$KAPA_VAULT_KEY"   # optional but recommended

# Link the CLI locally
npm link

# Configure credentials (or set env vars: KAPA_API_KEY, KAPA_PROJECT_ID, KAPA_INTEGRATION_ID)
kapa config set apiKey sk-...
kapa config set projectId proj_123
kapa config set integrationId integ_456

# Ask something
kapa "How do I refresh sources?"

Useful Flags

| Flag | Description | | --- | --- | | --project <id> | Override project id for this call | | --integration <id> | Override integration id | | --thread <id> / --resume last | Continue an existing conversation | | --metadata key=value | Attach metadata (repeat multiple times) | | --stream / --no-stream | Force-enable or disable streaming | | --json | Print raw JSON from the API | | --save <path> | Save the answer text to a file | | --copy | Copy the answer text to the clipboard |

Config Profiles

kapa config list                    # show stored profiles
kapa config profile create prod     # add a profile
kapa config profile use prod        # switch default profile
kapa --profile prod "Status?"

History

kapa history            # show the last 10 prompts
kapa history 25 --json  # show 25 entries as JSON
kapa history clear      # wipe local history

History is stored locally only; delete ~/.local/share/kapa-cli/history.jsonl if you prefer not to track it. Use --no-history on individual calls to skip logging.

Security & Storage

  • KAPA_VAULT_KEY (or KAPA_CONFIG_SECRET) is required to encrypt kapa config secrets before they land on disk. Without it, the CLI refuses to persist API keys unless you opt in to plaintext with KAPA_ALLOW_PLAINTEXT_CONFIG=1.
  • Set KAPA_HISTORY_KEY (or reuse KAPA_VAULT_KEY) to encrypt prompt/response history. To deliberately write plaintext history, set KAPA_ALLOW_PLAINTEXT_HISTORY=1; otherwise history logging is skipped.
  • Environment variables (KAPA_API_KEY, KAPA_PROJECT_ID, etc.) remain the safest option for automation pipelines when writing to disk is undesirable.

Development

npm install
npm run test   # runs node --test with the ts-node loader
npm run build  # compiles dist/*.js

License

This project is released under the MIT License (see LICENSE). Third-party runtime dependencies (chalk, clipboardy, commander, ora, and undici) are also MIT-licensed.