Skip to content

Feature: Track usage statistics per service/command #1

Description

@AThraen

Summary

Add lightweight usage tracking so users can see which commands/services they use and how often.

What to track

  • Command used (claude, codex, pwsh, etc.) — count of sessions launched
  • Total active time per session (start → exit)
  • Daily/weekly session counts

Where to store

SQLite table in the existing output.db:

CREATE TABLE IF NOT EXISTS usage_stats (
    id          INTEGER PRIMARY KEY,
    command     TEXT    NOT NULL,
    date        TEXT    NOT NULL,  -- ISO date YYYY-MM-DD
    session_count INTEGER NOT NULL DEFAULT 0,
    total_seconds INTEGER NOT NULL DEFAULT 0,
    UNIQUE(command, date)
);

Where to surface

  • New "Usage" section in Settings window, or a dedicated Usage tab
  • Show a simple table: command | sessions | total time | last used
  • Could also show a 7-day sparkline or bar chart per command

Implementation notes

  • Increment session_count when a session starts (in LaunchSessionAsync)
  • Accumulate total_seconds when the PTY exits (already have the exit hook in place)
  • No external telemetry — all data stays local in the SQLite database

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions