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

ccc-notifier

v0.6.1

Published

Claude Code Cost notifier (now also covers Codex CLI): per-prompt cost notifications (USD/JPY) with local history and HTML dashboard

Readme

ccc-notifier

Claude CodeとCodex CLIの利用コストをターンごとに通知し、履歴とダッシュボードで見えるようにするツールです。

[!IMPORTANT] 表示される金額は概算です。 実際の請求額と一致する保証はありません。「使いすぎに気づく」ための目安として使ってください。詳しくは金額の意味を参照してください。

💰 API換算 $0.267(¥40) | Fable 5
in 1.2k(cache 40%) / out 480 · 📁 my-app · 今日: $1.85
バグを直してテストを通してください

通知の実例

ダッシュボード

主な機能

  • Claude Codeの応答完了ごとに、USD・JPYの概算をOS通知またはSlackへ送ります
  • プロンプトと概算をローカルへ保存し、あとから検索・集計できます
  • 日・週・月の推移やモデル別・プロジェクト別の内訳をHTMLダッシュボードで確認できます
  • 月予算を設定し、今月の使用率を確認できます
  • 通知を一時停止しても、履歴の記録は続けられます
  • Codex CLIも任意で追加し、Claude Codeと同じダッシュボードで確認できます

必要なもの

  • Node.js 20以上(未導入の場合はNode.jsの用意
  • Claude Code(必須)
  • Codex CLI(任意)

Windows / WSL2は専用の導入手順も参照してください。

まず試す

グローバルインストールは不要です。最新版を一度試します。

npx ccc-notifier@latest init

画面の質問に沿って、通知方法・金額ラベル・月予算・Codex連携を選びます。

initがClaude Codeの~/.claude/settings.jsonを書き換える場合は、書き換える前にタイムスタンプ付きのバックアップを作ります。既存の設定を解析できない場合は自動編集せず、手動設定方法を表示します。

セットアップ後にClaude Codeで何か実行してください。通知が届かない場合は次で診断できます。

npx ccc-notifier@latest doctor

Codex連携を選んだ場合は、Codexを再起動し、表示されるhookの確認画面で承認してください。詳しくはCodex CLI対応を参照してください。

上のセットアップが終わったら、まず直近7日分の件数と概算を事前確認します。この操作では何も変更しません。

npx ccc-notifier@latest sweep --dry-run --days 7

次の操作は、保存済み履歴をいったん消し、直近7日分だけを作り直します。履歴のバックアップは作りません。

npx ccc-notifier@latest sweep --days 7

作成した7日分の履歴をダッシュボードで確認します。

npx ccc-notifier@latest dashboard --days 7

続けて使う場合

まず、全履歴を作り直した場合の件数と概算を事前確認します。

npx ccc-notifier@latest sweep --dry-run

問題なければ、7日版の履歴をいったん消し、残っているデータから全履歴を作り直します。

npx ccc-notifier@latest sweep

継続利用しやすいようにグローバルインストールし、連携先をグローバル版へ更新します。

npm install -g ccc-notifier
ccc-notifier init

使わない場合

この時点ではグローバル版を入れていないため、npxでccc-notifierのhook・設定・履歴・キャッシュを削除します。

npx ccc-notifier@latest uninstall --yes --purge

安全のため作成したsettings.json.bak-*などのバックアップは残ります。不要なら内容を確認してから手動で削除してください。

気に入ったらグローバルインストール

npm install -g ccc-notifier
ccc-notifier init

以降はccc-notifier doctorのように短く実行できます。cccnも同じコマンドとして使えます。

よく使うコマンド

以下はグローバルインストール後の表記です。npxで使う場合はccc-notifiernpx ccc-notifier@latestに置き換えてください。

| コマンド | できること | |---|---| | ccc-notifier init | 通知や連携を設定する | | ccc-notifier doctor | 設定と通知を診断する | | ccc-notifier report [--days N] | コスト集計をターミナルに表示する | | ccc-notifier dashboard | 直近のHTMLダッシュボードを開く | | ccc-notifier dashboard --all | 保存済みの全履歴版を開く | | ccc-notifier budget [<USD>] | 月予算を確認・設定する(0で解除) | | ccc-notifier mute [30m\|2h\|1d] | 通知を一時停止する(期間省略で無期限) | | ccc-notifier unmute | 通知を再開する | | ccc-notifier sweep --dry-run [--days N] | 履歴を作り直した場合の件数と概算を確認する | | ccc-notifier sweep [--days N] | 残っている利用データから履歴を作り直す |

[!CAUTION] sweepは履歴を作り直すコマンドです。 保存済みの履歴をいったん消し、Claude Code / Codex CLIに残っているデータから再作成します。設定や通知は消えませんが、履歴のバックアップは作りません。以前に削除・伏せ字にした履歴も、Claude Code / Codex CLI側の元データに残っていれば再び入ります。また、再作成した時点の単価と為替を使うため、以前の金額から変わることがあります。先に--dry-runで確認してください。詳しくは履歴の再生成を参照してください。

ダッシュボード、履歴の削除、通知なしモードなど、その他の操作はドキュメントまたはccc-notifier --helpで確認できます。

アップデート

npxで使う場合は、各コマンドに@latestを付ければ常に最新版が使われるため、別の更新作業は不要です。

グローバルインストールの場合は、次のコマンドだけで更新できます。

npm update -g ccc-notifier

hook設定の更新が必要なリリースだけ、リリース案内に従ってinitを実行してください。Codexの更新手順はCodex CLI対応にまとめています。

完全に削除する

グローバルインストールした場合は、ccc-notifierのhookと保存データを削除してからパッケージを削除します。

ccc-notifier uninstall --yes --purge
npm uninstall -g ccc-notifier

npxだけで使っていた場合は、最初のコマンドをnpx ccc-notifier@latest uninstall --yes --purgeに置き換え、npm uninstall -gは不要です。安全のため作成したsettings.json.bak-*などのバックアップは自動削除しません。

プライバシー

  • 履歴とプロンプトは~/.ccc-notifierにローカル保存します
  • Slackを設定した場合だけ、概算・トークン情報とプロンプトを指定したSlack Webhookへ送ります。既定はプロンプト冒頭100字で、設定により文字数の変更や全文送信もできます
  • 単価表と為替レートの取得時に外部通信しますが、プロンプトやコードは送りません

詳しくはSlack通知仕組みを参照してください。

ドキュメント

License

MIT