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

@knosi/cli

v0.2.3

Published

Knosi CLI — Claude Code daemon, OAuth login, raw AI capture saves, usage reporting, and skill install

Readme

@knosi/cli

Knosi CLI for Second Brain.

Runs on your machine and supports four workflows:

  1. the Claude Code task daemon (chat + structured)
  2. OAuth login against your Knosi deployment
  3. explicit raw AI capture saves for Claude Code skills
  4. local Claude Code / Codex token usage reporting

Prerequisites

  • Claude CLI installed and logged in (claude --version)
  • Node.js >= 20

Usage

npx @knosi/cli --url https://your-second-brain.vercel.app

The daemon will:

  1. Poll the server for queued AI tasks (chat + structured data)
  2. Execute them using your local Claude CLI
  3. Stream results back to the server
  4. Scan local Claude Code / Codex logs every 5 min and upload token usage to /api/usage
  5. Fire a daily Claude "hello" ping at 05:59 local time to keep the CLI warm

Press Ctrl+C to stop.

One-shot Usage Sync

npx @knosi/cli usage report

Scans ~/.claude/projects/**/*.jsonl (and ~/.codex/state*.sqlite when better-sqlite3 is available), aggregates token counts per (date, provider, model), and POSTs to the configured server. Requires knosi auth login first.

OAuth Login

npx @knosi/cli auth login https://www.knosi.xyz

This starts a local callback server on 127.0.0.1:6274, opens the browser, completes OAuth against Knosi, and stores CLI credentials in ~/.knosi/cli.json.

Save a Raw AI Capture

cat payload.json | npx @knosi/cli save-ai-note --json

Payload shape:

{
  "sourceApp": "claude-code",
  "title": "Optional custom title",
  "capturedAtLabel": "2026-04-12 15:20 SGT",
  "messages": [
    { "role": "user", "content": "Question" },
    { "role": "assistant", "content": "Answer" }
  ],
  "sourceMeta": {
    "projectPath": "/Users/bytedance/second-brain"
  }
}

Install the Claude Code Skill

npx @knosi/cli install-skill

This copies the bundled template to:

~/.claude/skills/save-to-knosi/SKILL.md

Options

| Flag | Description | Default | |------|-------------|---------| | --url <url> | Second Brain server URL | https://www.knosi.xyz | | --model <model> | Override Claude model | (from task) | | --once | Process one round then exit | false | | --claude-bin <path> | Path to Claude CLI binary | claude |

Releasing

@knosi/cli is published automatically by the Publish @knosi/cli GitHub Actions workflow (.github/workflows/publish-cli.yml):

  1. Bump packages/cli/package.jsonversion.
  2. Commit + push to main.
  3. The workflow runs the CLI unit tests, compares the local version with the one on the npm registry, and publishes only if the local version is strictly greater.

The workflow needs a repo secret named NPM_TOKEN holding an npm automation token (not a classic one — automation tokens bypass 2FA, which is what lets CI publish non-interactively). Create one under npmjs.com → Access Tokens → "Generate New Token" → Automation, scope it to @knosi/cli publish access, then add it to GitHub repo Settings → Secrets and variables → Actions as NPM_TOKEN.