copilot-session-usageΒΆ

GitHub

copilot-session-usage reads VS Code Copilot debug logs and tells you how much each AI coding session cost in USD.

VS Code does not show session costs in its UI. The debug logs contain token counts per model. This tool reads those logs, applies the real published pricing (with cache discounts and long-context tiers), and prints a cost report in seconds.

The most common use: after a heavy agentic session, run copilot-session-usage latest to see what it cost.

Links to source code: gsemet/copilot-session-usage

πŸ“¦ Installation

Install copilot-session-usage with uv or pip.

Installation
πŸš€ Getting Started

Analyze your first session and understand the output in under 5 minutes.

Getting Started
πŸ“– How-To Guides

Export to JSON, track spending over time, integrate in scripts, and configure WSL2.

How-To Guides
πŸ“š Reference

Complete CLI and Python API documentation.

Reference
πŸ’‘ How It Works

Where the logs live, how tokens are counted, and how pricing tiers are applied.

How Cost Estimation Works