← back to blog
developer productivity

Track Your Claude Code Sessions with One Command

4 min read

AI-assisted coding has fundamentally changed how developers work. Claude Code, Cursor, Copilot — these tools are part of the daily workflow. But here is the problem: you cannot measure what you do not track.

Most developers have no idea how much time they spend in AI-assisted coding sessions. Is it 30 minutes a day? Two hours? Five? Without data, you are guessing.

The Claude Code Hook

xeve includes a shell-based hook that integrates directly with Claude Code. It uses a heartbeat mechanism — every few minutes during an active session, it sends a signal to your xeve dashboard. When the session ends, the heartbeat stops, and xeve records the total duration.

Installation is one command:

curl -fsSL https://xeve.io/install.sh | bash

The script installs a Claude Code hook that runs automatically whenever you start a Claude Code session. No configuration. No manual tracking. It just works.

What You See in the Dashboard

Once installed, your Claude Code sessions appear alongside your other coding data in the xeve dashboard. You can see:

  • Daily AI coding time — how many hours you spent in Claude Code today
  • AI vs. manual coding split — what percentage of your coding is AI-assisted
  • Session patterns — when during the day you use Claude Code most
  • Weekly trends — is your AI usage increasing or stabilizing

Why This Matters

Understanding your AI-assisted coding time helps you answer important questions:

  • Am I actually more productive with AI tools, or just spending more time coding?
  • What types of tasks do I delegate to AI vs. do manually?
  • Is my total coding output (AI + manual) increasing over time?
  • How does AI usage correlate with my other metrics (sleep, commits, app usage)?

xeve's correlation engine can find relationships between your Claude Code usage and other tracked metrics. You might discover that you use AI more on sleep-deprived days (compensating for reduced focus) or that AI-heavy days correlate with more GitHub commits.

How It Works Under the Hood

The hook is a lightweight shell script that sends heartbeat signals to the xeve backend. Each heartbeat includes a timestamp and session identifier. The backend aggregates these into sessions — if heartbeats stop for more than 5 minutes, the session is considered ended.

The data flows through the same pipeline as VS Code tracking: heartbeats are aggregated into coding sessions, which roll up into daily summaries, which feed the correlation engine and AI insights.

Get Started

If you use Claude Code, install the hook today. One command, zero configuration, and you will have data within your first session. Visit xeve.io/download to get the macOS app and the Claude Code hook.

Written by Kevin — builder of xeve

Track your apps, coding, music, and health — all in one place.

try xeve free