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

@sano1023/rs-cmdk

v0.1.0

Published

依存ゼロのコマンドパレット(Ctrl+K・日本語ファジー検索・最近使った順・ネストページ)

Readme

配布版(ビルド済み) — 本パッケージはビルド済みファイルのみを含みます。 利用は無償(商用可)ですが、改変・再配布はできません(LICENSE.txt 参照)。 機能追加・改修のご依頼は有償で承ります → https://parelabo.com ([email protected])

インストール

npm install @sano1023/rs-cmdk

npmjs.com の公開パッケージです。ログインやトークンは不要です。 更新・旧レジストリからの移行の詳細は 共通インストール手順 を参照してください。登録済みバージョンは npm で確認できます。以下のパッケージ名による import は Vite などのバンドラ向けです。

npm install https://github.com/sano1023/rs-package/raw/main/tarballs/rs-cmdk-0.1.0.tgz

使い方

バニラ JS(ESM・バンドラあり)

import { createRSCmdk } from '@sano1023/rs-cmdk';
import '@sano1023/rs-cmdk/rs-cmdk.css';   // スタイル(バンドラ経由)

createRSCmdk({ commands });

<script> タグ(CDN・ビルド環境不要)

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sano1023/[email protected]/dist/rs-cmdk.css">
<script src="https://cdn.jsdelivr.net/npm/@sano1023/[email protected]/dist/rs-cmdk.min.js"></script>
<script>
  // 公開APIはグローバル RSCmdk に載る
  RSCmdk.createRSCmdk({ commands });
</script>

rs-cmdk

依存ゼロ・フレームワーク非依存のコマンドパレット(v0.1・Ctrl+K / ⌘K・kbar / cmdk 代替)。

  • 日本語ファーストのファジー検索: 「ほぞん / ホゾン / hozon」を同一視(かな正規化 + ローマ字→かな)。 kana(ふりがな)と keywords(英語別名)にも一致
  • スコアリング: 完全一致 > 前方一致 > 単語頭一致 > 部分一致、最近使った順の加点 (storageKey 指定で localStorage に永続化)
  • ネストページ: children を持つコマンドで階層化(「テーマ切替 › ダーク」)。Backspace / ← / Esc で戻る
  • グループ見出し・アイコン・ショートカット表示(<kbd>)・disabled
  • Ctrl+K / ⌘K で開閉(hotkey 変更可・open() で手動起動)・↑↓ Enter Esc・WAI-ARIA dialog/combobox
  • 命令的 API(ラッパー不要)・SSR 安全・CSS 変数テーマ・MIT
import { createRSCmdk } from '@sano1023/rs-cmdk';
import '@sano1023/rs-cmdk/rs-cmdk.css';

使い方

import { createRSCmdk } from '@sano1023/rs-cmdk';
// CSS: <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sano1023/rs-package@main/rs-cmdk/dist/rs-cmdk.css">

const palette = createRSCmdk({
    storageKey: 'my-app-cmdk',                  // 最近使った順を保存
    commands: [
        { id: 'new', label: '新規作成', kana: 'しんきさくせい', icon: '+',
          shortcut: 'Ctrl+N', group: 'ファイル', run: () => createNew() },
        { id: 'save', label: '保存', kana: 'ほぞん', group: 'ファイル', run: () => save() },
        { id: 'theme', label: 'テーマ切替', children: [                 // ネストページ
            { id: 'light', label: 'ライト', run: () => setTheme('light') },
            { id: 'dark', label: 'ダーク', run: () => setTheme('dark') },
        ]},
    ],
});

palette.open(); palette.close(); palette.toggle();
palette.setCommands(nextCommands);              // 動的差し替え
palette.destroy();                              // ホットキー解除

純ロジック API(node でも動く)

import { rankItems, scoreItem } from '@sano1023/rs-cmdk';
rankItems(commands, 'hozon', recentIds);        // スコア降順

テスト

node --test test/

ライセンス

MIT