token-usage-sync 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -48,20 +48,18 @@ token-usage-sync - Claude Code使用量をダッシュボードに同期
48
48
  SYNC_USER_ID ユーザーID(--user-idの代わり)
49
49
 
50
50
  例:
51
- # 使用量を表示
51
+ # 使用量を表示(ローカルJSONLから計算)
52
52
  npx token-usage-sync
53
53
 
54
- # 自分のダッシュボードに送信
55
- npx token-usage-sync --send --api-url=https://your-worker.workers.dev/api/sync-usage
56
-
57
- # 環境変数を使用
58
- export SYNC_API_URL=https://your-worker.workers.dev/api/sync-usage
54
+ # ダッシュボードに送信
59
55
  npx token-usage-sync --send
60
56
 
61
- セットアップ:
62
- 1. リポジトリをフォーク: https://github.com/your-repo/token-usage-dashboard
63
- 2. Cloudflare Workersにデプロイ
64
- 3. 上記コマンドで同期
57
+ # JSON形式で出力
58
+ npx token-usage-sync --json
59
+
60
+ 推奨ワークフロー:
61
+ 1. npx ccusage blocks → セッションブロックの詳細を確認
62
+ 2. npx token-usage-sync --send → ダッシュボードに同期
65
63
  `);
66
64
  process.exit(0);
67
65
  }
@@ -333,6 +331,7 @@ function aggregateUsage(entries) {
333
331
 
334
332
  // メイン処理
335
333
  async function main() {
334
+ // ローカルJSONLモード
336
335
  // ファイル検索
337
336
  if (flags.verbose) {
338
337
  console.error(`Searching for JSONL files in: ${PROJECTS_DIR}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-usage-sync",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Sync Claude Code token usage to your self-hosted dashboard",
5
5
  "type": "module",
6
6
  "bin": {