wakatime.com
WakaTime is a coding analytics tool that automatically tracks coding time and AI usage across editors and tools. It reports time by project and language, AI-generated code, per-model breakdowns, token and prompt metrics, and estimated model costs. It offers a REST API for data access, and its plugins are open source.