Skip to content

Repository files navigation

CI Coverage



devtrace

Track how you actually spend your time as a developer. AI sessions Β· GitHub commits Β· Jira tickets Β· Tempo worklogs β€” all in one dark-themed dashboard.


What it does

devtrace parses your local Claude Code and Codex CLI session logs, fetches GitHub commits via the gh CLI, and renders everything in a Streamlit dashboard with daily, weekly, and monthly breakdowns.

It answers questions like:

  • How many hours did I actually code this week?
  • Which projects are eating my time?
  • When during the day am I most productive?
  • How many tokens am I burning through Claude?
  • Does my logged Jira time match what I actually worked?

Screenshots

πŸ“Š Daily Overview

Hours, sessions, and commits broken down by day. Filter by date range, source (Claude / Codex / GitHub), and project.

Daily Overview


πŸ• Timeline

See exactly when during the day your sessions happened β€” and a heatmap showing your coding patterns across the week.

Timeline


πŸ“ File Activity

The files you change most, ranked by lines added + removed. Drill down by project.

File Activity


πŸͺ™ Token Usage

Input / output / cache tokens broken down by model, project, and day. Track your AI spend over time.

Token Usage


βš™οΈ GitHub Config

Connect your GitHub account, select which orgs and repos to track, and set up project-to-folder mappings.

GitHub Config


🎫 Tickets & Time

Jira tickets with estimated vs. logged hours β€” see where estimates diverge from reality.

Tickets & Time


πŸ”— Tempo Matching

Match your AI sessions to Jira tickets and bulk-submit Tempo worklogs without leaving the dashboard.

Tempo Matching


Quick start

git clone https://github.com/yakupkeskin/devtrace.git
cd devtrace
uv sync
uv run streamlit run devtrace/dashboard/app.py

Open http://localhost:8501 and configure your GitHub account from the GitHub settings tab in the top navbar.

Docker

docker run -p 8501:8501 \
  -v ~/.claude/projects:/data/claude:ro \
  -v ~/.codex/sessions:/data/codex:ro \
  -v ~/.config/gh:/root/.config/gh:ro \
  -v ~/.devtrace:/root/.devtrace \
  -e DEVTRACE_GITHUB_AUTHOR=your-username \
  -e DEVTRACE_GITHUB_OWNER=your-org \
  ghcr.io/yakupkeskin/devtrace

Or with Compose: docker compose up -d


Requirements

  • Python 3.11+
  • GitHub CLI authenticated (gh auth login)
  • Claude Code and/or Codex CLI in use

Configuration

Copy .env.example to .env and set at minimum:

DEVTRACE_GITHUB_OWNER=your-org-or-username
DEVTRACE_GITHUB_AUTHOR=your-github-username
Variable Default Description
DEVTRACE_GITHUB_OWNER β€” GitHub org or username to scope commit search
DEVTRACE_GITHUB_AUTHOR β€” GitHub username for author filter
DEVTRACE_GITHUB_SINCE_DAYS 90 Days of history to fetch
DEVTRACE_TIMEZONE UTC IANA timezone for date grouping
DEVTRACE_IDLE_THRESHOLD_MINUTES 30 Gaps longer than this excluded from active time
DEVTRACE_MIN_SESSION_SECONDS 60 Minimum session length to include
DEVTRACE_GIT_SOLO_MINUTES 15 Minutes credited per commit outside an AI session

Dashboard pages

Page Description
πŸ“Š Daily Overview Hours, sessions, commits by day with project/source filter
πŸ• Timeline Hour-by-hour activity heatmap showing when you code
πŸ“ File Activity Most-changed files ranked by lines added + removed
πŸͺ™ Token Usage Input/output/cache tokens by model, project, and day
πŸ” Projects Deep-dive into a single project's activity
🎫 Tickets & Time Jira tickets with estimated vs. logged hours
⏱️ Tempo Worklogs Weekly calendar of submitted Tempo worklogs
πŸ”— Tempo Matching Match sessions to tickets and bulk-submit worklogs

CLI

devtrace today
devtrace week
devtrace week --offset -1        # last week
devtrace month --month 2025-12
devtrace sessions --date 2025-12-01
devtrace files --top 20
devtrace tokens

Integrations

GitHub

Devtrace uses the GitHub CLI to fetch commits β€” no personal access token needed.

# 1. Install gh CLI (if not already)
#    https://github.com/cli/cli#installation

# 2. Authenticate
gh auth login

After login, open the GitHub settings tab in the dashboard to select which orgs and repos to track.


Jira

  1. Go to Atlassian API tokens
  2. Click Create API token, give it a label (e.g. devtrace)
  3. Copy the token
  4. Open the Jira settings tab β†’ enter your Site URL (https://your-domain.atlassian.net), Email, and paste the token

Tempo

  1. Go to Tempo API tokens (requires Tempo admin access or your team's Tempo settings page)
  2. Click New Token, give it a name
  3. Copy the token
  4. Open the Tempo settings tab β†’ enter your Email and paste the token

Tokens are stored in your OS keychain (Windows Credential Manager / macOS Keychain) β€” never in plain text.


Security

  • Credentials are stored in the OS keychain via keyring, falling back to the local config file only when keyring is unavailable.
  • Subprocess calls sanitize all user-controlled inputs β€” repo paths are validated against owner/repo format, author patterns are checked for flag injection.
  • JQL queries validate project keys with a strict ^[A-Z][A-Z0-9_]*$ regex before interpolation.
  • Log output never includes raw API query parameters or full stderr that could leak credentials.

Development

uv sync --extra dev
pytest
ruff check devtrace tests

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages