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

@liha-cli/lcr

v0.1.3

Published

Liha CodeReview 向けのローカル CLI です。 `git diff` からコミットメッセージを生成し、必要に応じてコミットまで実行します。

Readme

@liha-cli/lcr

Liha CodeReview 向けのローカル CLI です。
git diff からコミットメッセージを生成し、必要に応じてコミットまで実行します。

コマンド

  • lcr init
  • lcr commit [options]
  • lcr budget
  • lcr help
  • lcr version
  • lcr reset

lcr init

初期設定を行います。

  • コミット言語を選択: ja / en
  • 匿名モード設定を保存

保存先:

  • ~/.liha/lcr/config.yaml
  • <repo>/.liha/lcr/cli.yaml

lcr commit

差分からコミットメッセージ候補を生成し、選択後に git commit を実行します。

挙動:

  • 差分は staged 優先(git diff --staged
  • staged が空なら unstagedgit diff
  • どちらも空なら終了
  • docs/git-commit-rules.md があれば優先利用
  • 実行後に git push の確認を表示(デフォルト: No

オプション:

  • -s, --split: 分割コミットモード
  • -n, --candidates <number>: 候補数(1〜3、デフォルト2)
  • --plan: 案の表示のみ(コミットしない)
  • --yes: 確認プロンプトを最小化

lcr budget

CLI commit 利用可能トークンを表示します。

表示内容:

  • 残量(%付き)
  • リセット日時

※ 出力は .liha/lcr/cli.yamllocaleja / en)に従ってフォーマットされます。

lcr reset

現在リポジトリの ./.liha/lcr/cli.yaml を削除します。
~/.liha/lcr/config.yaml は削除しません。

設定ファイル

グローバル設定

~/.liha/lcr/config.yaml

主な項目:

  • mode(現在は匿名運用)
  • anonymousId
  • createdAt
  • updatedAt

リポジトリ設定

  • .liha/lcr/cli.yaml
    • locale: ja | en
  • .liha/lcr/config.yaml
    • limits.inputMaxBytes(入力上限)

API

使用 API:

  • POST /v1/cli/auth/token(短命トークン発行)
  • POST /v1/lcr/commit/generate(コミット案生成)
  • GET /v1/lcr/commit/budget(利用可能トークン取得)

認証:

  • CLI は匿名 ID を保持し、短命トークンを取得して API を呼びます。
  • 期限切れ時は自動再取得します。

API ベースURL

  • https://codereview.api.liha.dev に固定

ルール解決順

  1. docs/git-commit-rules.md(repo)
  2. CLI 内蔵ルール
  3. 最終フォールバック

制限事項

  • 分割コミットはファイル単位(hunk単位分割なし)
  • --split 実行時はグループごとに stage を再構成してコミット
  • API 失敗時はローカルフォールバック候補を生成

開発時の実行例

pnpm --dir packages/lcr-cli install
pnpm --dir packages/lcr-cli dev init
pnpm --dir packages/lcr-cli dev commit
pnpm --dir packages/lcr-cli dev commit --candidates 3
pnpm --dir packages/lcr-cli dev commit --plan
pnpm --dir packages/lcr-cli dev commit -s
pnpm --dir packages/lcr-cli dev commit -s --plan
pnpm --dir packages/lcr-cli dev budget