An open API service indexing awesome lists of open source software.

https://github.com/lookitstony/clautime

Automatic time tracking for Claude Code sessions โ€” sessions, clients, projects, invoicing, and live activity widgets. Local-first Electron app.
https://github.com/lookitstony/clautime

claude-code electron invoicing productivity react stripe time-tracking typescript

Last synced: about 16 hours ago
JSON representation

Automatic time tracking for Claude Code sessions โ€” sessions, clients, projects, invoicing, and live activity widgets. Local-first Electron app.

Awesome Lists containing this project

README

          

# ClauTime

**Automatic time tracking for Claude Code sessions.**

๐ŸŒ [**clautime.github.io**](https://lookitstony.github.io/clautime/) ยท ๐Ÿ“ฆ [Download latest release](https://github.com/lookitstony/clautime/releases/latest)

ClauTime monitors your [Claude Code](https://docs.anthropic.com/en/docs/claude-code) usage and gives you a complete picture of how you spend your AI-assisted development time across projects, clients, and teams.

## Why ClauTime?

Claude Code writes to JSONL log files as you work. ClauTime reads those files and automatically detects sessions, tracks token usage, counts prompts, and monitors activity in real time. No manual timers. No browser extensions. It just works.

And when it's time to bill, ClauTime auto-generates Stripe invoices from your tracked hours with a one-click **ACH-only** option. Stripe's ACH rate is capped at **0.8% / $5 max** per charge, while credit cards run **2.9% + $0.30**. On a $5,000 monthly invoice that's $5 in fees instead of $145 โ€” **you keep $140 more** for every invoice you send. The app pays for itself the first time you use it.

## Features

### Tracking

- **Automatic session detection**: scans Claude Code's JSONL logs to detect coding sessions with tool-type-aware idle timeouts (5/10/30 minute gaps depending on what Claude was doing)
- **Live activity dashboard**: see which projects are active right now, with real-time processing indicators that glow when Claude is actively working
- **Floating widgets**: always-on-top mini windows showing per-project status, elapsed time, and activity state. Stay visible across desktops
- **Manual time entry**: add manual time blocks for non-Claude work, or run a manual timer for ad-hoc tasks
- **Per-session billable toggle**: mark individual sessions billable or non-billable on the fly
- **After-hours mode**: filter views to only show work outside business hours

### Clients, projects & git

- **Client & project management**: assign projects to clients with hourly billable rates, auto-attribute sessions to projects from their working directory
- **Git commit correlation**: automatically links commits to the session they were authored in, with day-spanning attribution logic
- **Ticket attribution**: detects ticket IDs in commits (e.g. `PROJ-1234`, `JIRA-42`) and rolls them up per day/project for invoicing
- **Welcome wizard**: first-run onboarding that auto-discovers your existing Claude Code projects

### Invoicing (Stripe)

- **Auto-generated invoices**: build invoices straight from billable session data with one click; line items grouped by day and project
- **AI-written line descriptions**: Claude Haiku turns commit messages and session summaries into business-friendly descriptions for each line
- **Stripe integration**: send invoices through Stripe, including ACH/bank-transfer-only mode, hosted invoice URL, and downloadable PDF
- **Test/sandbox mode**: separate live and test Stripe keys with a dedicated test email override; switch modes without losing data
- **Auto-sync from Stripe**: invoice statuses (paid, open, void) sync automatically from Stripe; import existing Stripe invoices into the local list
- **Overlap detection**: prevents accidentally re-invoicing the same period twice
- **Configurable due dates and memos**: default 30-day due, auto-generated period memos with ticket lists and AI overview

### Reports & analytics

- **Three report formats**: session breakdown (every session as a line), daily summary (totals per day with project rollups), and period summary (week/month/quarter rollups with AI-written overall summary)
- **Multi-format export**: save reports as Markdown, CSV, or PDF, or copy them straight to clipboard
- **Customizable analytics dashboard**: ten drag-and-drop widgets covering daily hours, billable earnings, hours by client, hours by project, peak hours, prompts per day, session length distribution, token usage, estimated API cost, and work vs idle time
- **Estimated API cost**: see what your Claude usage would have cost at pay-as-you-go API rates โ€” per-model breakdown (Opus, Sonnet, Haiku) including cache-write and cache-read pricing, with a cost card on the Sessions page that follows your active filters. Great for quantifying what a subscription saves you
- **Configurable week start**: pick Monday, Sunday, or Saturday as the start of your week; applies across sessions, reports, and analytics

### AI summaries

- **Three-tier summary system**: cached AI summary (Claude Haiku) โ†’ git commit messages โ†’ no summary, automatic fallback
- **Per-session AI summaries**: on-demand or batched generation; results are cached locally
- **Custom AI instructions**: override the default prompts for both detailed and brief summary styles

### Privacy & security

- **Local-first**: everything stays on your machine. No telemetry, no cloud sync, no remote DB
- **Encrypted credentials**: API keys (Anthropic, Stripe) stored via Electron `safeStorage` (OS keychain)
- **Secret scanner**: detects 40+ patterns of API keys, tokens, passwords, and private keys accidentally logged in your JSONL files. Optional auto-redaction. Supports user-defined custom patterns

### Notifications & system integration

- **Desktop alerts**: native Windows/macOS toast notifications when Claude finishes processing, with configurable sounds and idle thresholds. Visible over fullscreen apps including Citrix VDI sessions
- **System tray**: minimize-to-tray; quit and toggle widgets from the tray icon
- **Auto-updates**: built-in electron-updater pulls updates from GitHub releases
- **Themed UI**: dark theme with four accent colors (teal, amber, purple, blue)

## Screenshots

_Coming soon_

## Install

Grab the latest installer from the [releases page](https://github.com/lookitstony/clautime/releases/latest):

- **Windows**: `clautime-X.Y.Z-setup.exe`
- **macOS (Apple Silicon)**: `clautime-X.Y.Z.dmg`
- **Linux**: `clautime-X.Y.Z.AppImage`

Prerequisite: you'll want [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed and used at least once so there's something to track.

## First Run

1. **Launch the app.** On first start, ClauTime scans `~/.claude/projects/` and pulls in everything Claude Code has logged. A welcome dialog confirms detection; click _Get Started_.
2. **Browse your sessions.** Open the _Sessions_ page to see what got detected. Each session shows time, prompts, tokens, and (if available) Claude's summary of the work.
3. **Set up clients and projects.** On the _Clients_ page, add a client, set their hourly rate, and assign one or more detected projects to them. Unassigned projects still get tracked, they just don't roll up into client totals or invoices.
4. **(Optional) Turn on AI summaries.** _Settings_ โ†’ _AI Configuration_ โ†’ paste an Anthropic API key. ClauTime will use Claude Haiku to generate plain-language summaries for sessions and reports. Without a key it falls back to git commit messages.
5. **(Optional) Connect Stripe for invoicing.** _Settings_ โ†’ _Invoicing_ โ†’ paste a Stripe secret key. You can flip between live and test modes from the same screen. Once connected, the _Invoicing_ page can auto-generate invoices from billable session data.

After that, just use Claude Code normally. Sessions appear in the app as they happen. Use the tray icon to pop floating widgets out per project, or close the main window to keep tracking quietly in the background.

## Build from Source

```bash
git clone https://github.com/lookitstony/clautime.git
cd clautime
npm install
npm run dev
```

Build installers:

```bash
npm run build:win # Windows
npm run build:mac # macOS
npm run build:linux # Linux
```

Requires [Node.js](https://nodejs.org/) 20+.

## Tech Stack

- **Electron 39** + electron-vite + Vite 7
- **React 19** + TypeScript
- **Tailwind CSS v4** + shadcn/ui
- **Drizzle ORM** + better-sqlite3
- **TanStack Query v5** + Zustand 5

## How It Works

1. Claude Code writes conversation logs to `~/.claude/projects/` as JSONL files
2. ClauTime scans these files and detects session boundaries using gap-based detection with tool-type-aware idle timeouts
3. Sessions are stored in a local SQLite database with full token counts, prompt counts, and timing data
4. The live monitor watches for file changes in real time to show active processing state
5. Everything stays local. No data leaves your machine

## Contributing

We welcome contributions! Please read our [Contributor License Agreement](CLA.md) before submitting a pull request.

By opening a pull request, you agree to the terms of the CLA.

### Development

```bash
npm run dev # Start in development mode
npm test # Run all tests
npm run lint # Lint the codebase
npm run typecheck # TypeScript type checking
```

## License

[Apache License 2.0](LICENSE)

Copyright 2026 ClauTime Contributors