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.
- package/index.js +9 -10
- 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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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}`);
|