Skip to main content

Daytrace

Daytrace is a privacy-first desktop utility that turns a person's day into a searchable text journal. Screen, microphone, keyboard activity, and system context are independent opt-ins. Captured media is processed ephemerally and discarded; the durable record contains text and structured metadata only.

This repository now includes a headless ActivityWatch summary prototype. The broader cross-platform capture application remains in the product and architecture planning phase.

ActivityWatch workstream digest

The Python CLI reads a selected day from an already-running ActivityWatch instance, sanitizes and fuses its watcher data, and reconstructs project-neutral activity sessions, then compacts them into project-neutral activity episodes. It can stop there with a fully local deterministic report, or—only when explicitly requested—send minimized episodes to OpenAI to infer broad workstreams, topics, and evidence-backed apparent achievements.

DayTrace's inferred workstreams are not canonical project definitions. They are a useful daily handoff that an Obsidian Second Brain plugin can later map to the projects defined in the vault. This keeps DayTrace useful without access to the vault and leaves durable project ownership in Obsidian.

Prerequisites: install and run ActivityWatch, then install uv. On Windows:

winget install --id=astral-sh.uv -e

From a source checkout:

uv sync
uv run daytrace activitywatch --date 2026-09-10 --output daytrace.md

For a persistent user-level installation, install once and run daytrace directly. uv keeps this tool environment until it is upgraded or uninstalled:

uv tool install daytrace@latest
uv tool update-shell
# Open a new PowerShell window, then:
daytrace activitywatch --date 2026-09-10 --output daytrace.md

To keep the installation inside a specific directory instead:

mkdir C:\Tools\daytrace
cd C:\Tools\daytrace
uv venv
uv pip install daytrace
.\.venv\Scripts\daytrace.exe activitywatch --date 2026-09-10 `
  --output daytrace.md

After the package is published, the equivalent one-off workflows are:

# Project-neutral compact episodes; no model or key
uvx daytrace@latest activitywatch --date 2026-09-10 --output daytrace.md

# AI-assisted inferred workstreams; key entered in a hidden prompt
uvx --refresh --link-mode=copy daytrace@0.3.5 activitywatch `
  --date 2026-09-10 `
  --summary ai `
  --provider openai `
  --model gpt-5.6-terra `
  --debug-output daytrace-ai-failure.json `
  --output daytrace.md

# Structured handoff for the future Second Brain plugin
uvx daytrace@latest activitywatch --date 2026-09-10 --summary ai `
  --provider openai --model YOUR_MODEL --format json --output daytrace.json

The deterministic mode needs no API key. It emits compact episodes with exact active duration while using current-window events as the foreground-time authority; simultaneous browser and editor events enrich those episodes rather than double-counting time. Repeated assistant, terminal, new-tab, and file-manager transitions are aggregated around compatible work anchors. Short activity is shown as <1m.

AI mode is a separate second stage. Before any cloud request, DayTrace reports the number of compact episodes, planned summary chunks and merge call, total initial request size, included data categories, provider, model, and a rough standard-rate cost estimate, then asks for confirmation. The prompt is Continue? [Y/n], so Enter accepts and an explicit n or no declines. Most compact days use one call; unusually large days are partitioned at episode boundaries and receive one constrained merge call. The merge names only actual cross-chunk combinations; DayTrace preserves every omitted singleton locally. Only after consent does DayTrace request the OpenAI API key through a hidden prompt. The key is held in memory only. Never put a key in command-line arguments or paste it into support logs. OpenAI Responses API calls set store=False.

The preflight estimate uses request size and an explicit expected-output allowance; retries are excluded. After a successful response, DayTrace prints a second estimate from provider-reported usage, priced as an uncached standard-rate upper bound. The built-in table covers gpt-5.6-luna, gpt-5.6-terra, gpt-5.6-sol/gpt-5.6, and gpt-6-astra, using the official OpenAI prices published at https://developers.openai.com/api/docs/models/compare and dated 2026-09-13. Unknown models are reported as unavailable instead of being guessed.

After the key prompt, DayTrace prints content-free progress to stderr for each summary chunk, response, validation stage, and merge. In an interactive terminal, the waiting message updates once per second with elapsed time. If a response assigns an episode to multiple workstreams or otherwise fails the global allocation rule, DayTrace may make one disclosed repair retry for that chunk before falling back. After the requested output has been written successfully, the final stderr line is Done!.

The default AI Markdown is a compact journal table organized by inferred project/workstream, apparent achievements, and work/topics. --details adds the primary episode allocation and activity timeline for auditing. The model returns structured data that DayTrace validates locally. Each topic and visible achievement must cite a supplied episode. Because an episode can contain interleaved work, its evidence may support multiple workstreams, while each episode still has exactly one primary allocation for coverage. Model-produced text receives another secret scan. Durations always come from that deterministic primary allocation. If an explicitly requested AI call or response fails, DayTrace writes the deterministic fallback and exits with status 2. With --debug-output, it also writes a versioned JSON support artifact containing only allow-listed structural metadata: failure codes, response shape counts, supplied episode IDs, and safe opaque provider identifiers. It never includes model-generated prose, ActivityWatch titles, request bodies, response bodies, or the API key. Review this artifact before sharing it, as you would any diagnostic file.

Useful local modes:

  • --details adds sanitized episode membership and evidence identifiers.
  • --raw appends the fine-grained sanitized session/slice audit trail and cannot be combined with --details or AI mode.
  • --diagnostics prints only aggregate, content-free counts and coverage.
  • --format json emits a versioned structured artifact suitable for another plugin; Markdown is the default.
  • --yes confirms the disclosed cloud send for non-interactive AI automation, but the API key is still collected separately through the hidden prompt.

To capture the sanitized raw sessions needed to improve DayTrace's episode compression in a later release:

uvx --refresh --link-mode=copy daytrace@0.3.5 activitywatch `
  --date 2026-09-10 `
  --format json `
  --raw `
  --output daytrace-raw.json

Raw output has passed DayTrace's sanitizer, but it still describes personal activity and can contain sensitive context. Review it before sharing.

If Windows reports that uv cannot hardlink across cache and target filesystems, use uvx --link-mode=copy daytrace@latest ...; this affects installation speed, not DayTrace output or correctness.

Python callers—including a future second-brain integration—can use the same project-neutral collection and deterministic renderer directly:

from datetime import date

from daytrace.activitywatch import collect_day, summarize_day

bundle = collect_day(date(2026, 9, 10))
markdown = summarize_day(date(2026, 9, 10))

Daytrace reads ActivityWatch through http://127.0.0.1:5600 by default. It does not retain images, audio, video, raw browser URLs, query strings, source event IDs, source bucket IDs, or a second copy of ActivityWatch events. Use --server for another ActivityWatch endpoint and --timezone for an explicit IANA timezone such as America/Los_Angeles.

DayTrace deliberately does not read the Obsidian vault or decide canonical project names. Its workstream digest is designed as the handoff to the Second Brain plugin, which can map the evidence-based daily workstreams onto project definitions stored in Obsidian.

Product decisions

  • Local-first: the database and processing stay on the user's computer unless the user explicitly configures a cloud provider or export destination.
  • All capture sources start off and require separate, informed consent.
  • Tauri 2 and Rust are the recommended desktop stack, with a small React/Vite interface that normally stays hidden behind a tray icon.
  • Accessibility text is preferred over screenshots. OCR is a fallback, and image buffers are destroyed after extraction.
  • Microphone audio is held only in bounded memory, segmented with voice activity detection, transcribed, and discarded.
  • Keyboard capture defaults to activity signals only, not key content. An advanced typed-text mode is a later, separately consented feature with password and deny-list suppression.
  • SQLite, B-tree time dimensions, and FTS5 provide the hierarchical timeline and full-text search. Captured media and vector embeddings are not stored.
  • The first release supports BYOK and local providers. A hosted inference gateway can later fund the project without locking users into the service.

Plan

Proposed repository shape

apps/
  desktop/                 Tauri window, tray, onboarding, settings
crates/
  daytrace-core/           orchestration, policies, domain events
  daytrace-capture/        platform-neutral capture traits
  daytrace-platform-*/     macOS, Windows, and Linux adapters
  daytrace-extract/        accessibility, OCR, VAD, transcription
  daytrace-store/          SQLite migrations, FTS, retention
  daytrace-summary/        segmentation and provider-neutral summaries
  daytrace-sync/           deterministic export and GitHub sync
  daytrace-secrets/        OS credential-store abstraction
extensions/
  browser/                 optional Chromium/Firefox tab metadata bridge
docs/

Target outcome

The v1 release is a signed, auto-updating macOS, Windows, and Linux desktop app that can run for an eight-hour day without retaining raw media, recover cleanly from sleep and device changes, search a local journal, and create an editable end-of-day summary. See the implementation plan for measurable release gates.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

daytrace-0.3.5.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daytrace-0.3.5-py3-none-any.whl (47.2 kB view details)

Uploaded Python 3

File details

Details for the file daytrace-0.3.5.tar.gz.

File metadata

  • Download URL: daytrace-0.3.5.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for daytrace-0.3.5.tar.gz
Algorithm Hash digest
SHA256 075c1b546544d17da2b7de75c83c7d9e7bca21fe0aae32879575febc4315068d
MD5 b36fce169ee0f17b9a537b31760c984b
BLAKE2b-256 b00acaa3b8b7d2adbd431dc89c74448c2f6f016c6f7731f176b733735f446e69

See more details on using hashes here.

File details

Details for the file daytrace-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: daytrace-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 47.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for daytrace-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 07e5fcf40f15a50dd88ccc9840db46dcd4414f4bc407c811e22fe6a308460da9
MD5 bf595e8f3e164f88d4dfa0d5e86beafa
BLAKE2b-256 109395496f6828b7b85943d6d3bb94c146f7b0a6e27eacb41b66ea0daf449837

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.6

2 files

This release

0.3.5 This release

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page