{"id":49614171,"url":"https://github.com/cat2151/gh-commit-ledger","last_synced_at":"2026-05-04T20:05:12.801Z","repository":{"id":353675238,"uuid":"1220075475","full_name":"cat2151/gh-commit-ledger","owner":"cat2151","description":"A TUI that displays the commit count of your public repositories.","archived":false,"fork":false,"pushed_at":"2026-04-24T23:27:38.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T01:28:55.270Z","etag":null,"topics":["github","rust","tui"],"latest_commit_sha":null,"homepage":"https://cat2151.github.io/gh-commit-ledger/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cat2151.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-24T14:16:27.000Z","updated_at":"2026-04-24T23:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cat2151/gh-commit-ledger","commit_stats":null,"previous_names":["cat2151/gh-commit-ledger"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cat2151/gh-commit-ledger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cat2151%2Fgh-commit-ledger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cat2151%2Fgh-commit-ledger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cat2151%2Fgh-commit-ledger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cat2151%2Fgh-commit-ledger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cat2151","download_url":"https://codeload.github.com/cat2151/gh-commit-ledger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cat2151%2Fgh-commit-ledger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32622755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","rust","tui"],"created_at":"2026-05-04T20:05:10.267Z","updated_at":"2026-05-04T20:05:12.793Z","avatar_url":"https://github.com/cat2151.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-commit-ledger\n\nあなたの公開リポジトリの commit数 を表示するTUIです。Rustで書かれています。\n\n## 特徴\n\n- 昨日のcommit数と、総commit数を、全リポジトリについて集計\n- クリップボードにコピー\n\n## 参考例\n\n- 20commit増えてた\n    - GitHub Copilot Coding Agentにいくつかissueを投げて寝て起きると20commitくらい増えます\n- 1commitと20commitで同じ価値の場合もあります。数字にこだわらず、昨日はcommitがあった、くらいの目安で運用することをおすすめします\n\n## 必要なもの\n\n- Rust\n- GitHub CLI (`gh`)\n- `gh` で GitHub にログイン済みであること\n\nGitHub CLI の状態は次のコマンドで確認できます。\n\n```powershell\ngh auth status\n```\n\n未ログインの場合は、先に認証してください。\n\n```powershell\ngh auth login\n```\n\n### インストール\n\n```\ncargo install --force --git https://github.com/cat2151/gh-commit-ledger\n```\n\n### 実行\n\n```\ngh-commit-ledger\n```\n\n### アップデート\n\n```\ngh-commit-ledger update\n```\n\n## 使い方\n\n起動すると自動で集計が始まります。初回実行時は対象リポジトリをすべて取得するため、リポジトリ数によっては時間がかかります。\n\n## 設定\n\n起動時に設定ファイルがない場合は、デフォルト値で `config.toml` を作成します。\n\nWindows では `%LOCALAPPDATA%\\gh-commit-ledger\\config.toml` に保存されます。実際のパスは TUI 下部の `config:` に表示されます。\n\n設定ディレクトリは `GH_COMMIT_LEDGER_CONFIG_DIR` 環境変数で上書きできます。この場合、`config.toml` と `cache.json` は指定したディレクトリに保存されます。\n\n`e` キーを押すと設定ファイルを editor で開きます。利用する editor は `editors` に書かれた順に試します。デフォルトでは `fresh`、`zed`、`code`、`edit`、`nano`、`vim` の順です。\n\n`[clipboard].message` で、クリップボードへコピーする本文メッセージを変更できます。TUI ではこのメッセージが既存の集計表示とは別枠で表示されます。\n\n```toml\neditors = [\"fresh\", \"zed\", \"code\", \"edit\", \"nano\", \"vim\"]\n\n[clipboard]\nmessage = \"昨日は {commits_yesterday} 件の commit をしました。\\nこれまでの総 commit 数は {total_commits} 件です。\"\n```\n\n利用できるプレースホルダーは次の 2 つです。\n\n| プレースホルダー | 内容 |\n| --- | --- |\n| `{commits_yesterday}` | 昨日の commit 数 |\n| `{total_commits}` | 総 commit 数 |\n\n## 集計仕様\n\nこのツールは、ローカルタイムゾーンで見た「昨日」と「一昨日」を基準にします。\n\n- `昨日 23:59:59` 時点の各リポジトリのデフォルトブランチ累計 commit 数を取得\n- `一昨日 23:59:59` 時点の累計 commit 数も取得\n- 2 つの値の差分を「昨日の commit 数」として扱う\n- すべての対象リポジトリの `昨日 23:59:59` 時点の累計を合計して「総 commit 数」として表示\n\n対象は GitHub CLI の認証ユーザーの public repository です。fork は除外されます。デフォルトブランチがないリポジトリや、デフォルトブランチの先端が commit として扱えないリポジトリは `0` として扱われます。\n\nリポジトリ一覧は GitHub CLI の `gh repo list \u003clogin\u003e --limit 1000 --visibility public --source --no-archived=false` で取得します。\n\n## キャッシュ\n\n取得結果は設定ファイルと同じ OS のローカル設定ディレクトリ配下に保存されます。実際のパスは TUI 下部の `cache:` に表示されます。\n\nキャッシュには、リポジトリごとに時点別の累計 commit 数が保存されます。通常の起動では既存キャッシュを利用し、不足している分だけ GitHub から取得します。\n\nキャッシュはリポジトリごとに最大 16 時点分を保持し、上限を超えると古い時点から削除します。\n\n強制的に再取得したい場合は、TUI 上で `r` を押してください。\n\n## 細かい仕様\n\n- GitHub CLI の認証ユーザーが所有する public repository を集計\n- fork を除外し、archived repository は集計対象に含める\n- 各リポジトリのデフォルトブランチの累計 commit 数を GraphQL API で取得\n- 昨日の commit 数、総 commit 数、動きがあったリポジトリを TUI で表示\n- 取得結果を OS のローカル設定ディレクトリへ保存し、再実行時に再利用\n- `c` キーで表示中の Clipboard Message をクリップボードへコピー\n- OS のローカル設定ディレクトリに `config.toml` を作成し、コピー用メッセージをカスタマイズ\n\n## トラブルシューティング\n\n### `gh コマンドの起動に失敗しました`\n\nGitHub CLI がインストールされていないか、PATH に含まれていません。`gh --version` が実行できる状態にしてください。\n\n### `gh コマンドが失敗しました`\n\nGitHub CLI の認証、ネットワーク接続、GitHub API の制限を確認してください。\n\n```powershell\ngh auth status\ngh api user\n```\n\n### 初回実行が遅い\n\n初回はすべての対象 public repository に対して API を呼び出します。2 回目以降はキャッシュが使われるため、同じ日付の集計は速くなります。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcat2151%2Fgh-commit-ledger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcat2151%2Fgh-commit-ledger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcat2151%2Fgh-commit-ledger/lists"}