github / github/copilot-cli

Persist usage statistics (currently only shown once when CLI exits)

オープン
#1,394 コメント 4 件 リアクション 2 件 担当者 0 名 GitHub で見る
area:sessions
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the feature or problem you'd like to solve

Copilot CLI does not persist usage statistics (premium requests, token usage per model)

### Proposed solution

Copilot CLI does not provide usage statistics for individual users on an Enterprise plan.

Therefore, I asked Copilot CLI to generate a Python script to analyze its own data in `~/.copilot/` directory (see screenshot in context).

Unfortunately the following valuable information is currently only shown once to the user but not persisted in `events.jsonl` or other files:

```
Total usage est: 7 Premium requests
API time spent: 2m 59.626s
Total session time: 12m 15.77s
Total code changes: +206 -77
Breakdown by AI model:
claude-sonnet-4.5 453.0k in, 13.1k out, 405.7k cached (Est. 7 Premium requests)
```

When user exits Copilot CLI, please write information above into `~/.copilot/session-state/events.jsonl` (e.g. as part of message with type `abort`) or another file. Please ensure that statistics cover the entire session (including continuations).

### Example prompts or workflows

_No response_

### Additional context

Image

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。