Skip to main content

Python-based screen activity tracker that captures images every 5 seconds for AI-powered computer usage analysis.

Project description

Time Guardian Hourglass Time Guardian

Protect your time!

CI Status PyPI Version License

Ever wonder how you really spent your day? Time Guardian silently captures screenshots and uses AI to tell you exactly what you were doing—so you can finally answer the question: "Where did my afternoon go?"

Why Time Guardian?

📸 Automatic tracking — Set it and forget it. Screenshots every 5 seconds, intelligently filtered.
🧠 AI-powered analysis — AI Vision understands what you're doing, not just which app is open.
📊 Honest reports — See breakdowns by app, activity type, and get AI-generated summaries.
🔒 Privacy-first — Everything runs locally. Your screenshots and data stay on your machine.

Installation

pip install time-guard

Quick Start

# Start tracking (runs until you stop it)
time-guardian track

# Generate a report of your activity
time-guardian summary

That's it. Time Guardian will capture screenshots, analyze them with AI, and show you where your time went.

Usage

Tracking

# Track indefinitely (Ctrl+C to stop)
time-guardian track

# Track for 1 hour
time-guardian track --duration 60

# Custom interval (every 10 seconds instead of 5)
time-guardian track --duration 60 --interval 10

# Track without AI analysis (just screenshots)
time-guardian track --no-ai

Screenshots are saved to ~/.time-guardian/screenshots by default.

Reports & Analysis

# View activity summary
time-guardian summary

# Analyze a specific screenshot directory
time-guardian analyze-screenshots -s ./my-screenshots

# Check version
time-guardian version

Utility Commands

# Verify screen recording permissions work
time-guardian check-permissions

# Take a single screenshot
time-guardian screenshot -o snapshot.png

# See connected monitors
time-guardian monitors

# List visible windows
time-guardian windows

# List running processes
time-guardian processes

Example Report

Time Guardian Activity Report
=============================
Generated at: 2025-12-04T05:26:42

Activity by Application
-----------------------
[Cursor] - 7 events
  • Coding
  • Code editing and running a script
  ...

[iTerm2] - 4 events
  • Coding
  ...

AI Summary
==========
The computer activities primarily consisted of "Coding," with one 
instance involving "Code editing and running a script."

How It Works

graph LR
    A[📸 Capture] --> B{Changed?}
    B -->|Yes| C[💾 Save]
    B -->|No| D[Skip]
    C --> E[🤖 AI Classify]
    E --> F[📊 Report]
  1. Capture — Screenshots taken every N seconds across all monitors
  2. Compare — Only saves when screen content actually changes
  3. Classify — GPT-4 Vision analyzes each window to determine activity
  4. Report — Aggregates data into human-readable summaries

Command Reference

Command Description
track Start tracking screen activity
summary Display activity summary
analyze-screenshots Analyze a directory of screenshots
check-permissions Verify screen recording permissions
screenshot Take a single screenshot
monitors Show connected monitors
windows Show visible windows
processes List running processes

Track Options

Option Default Description
--duration Minutes to track
--interval 5 Seconds between captures
--ai/--no-ai enabled AI classification
--min-pixels 1000 Change threshold

Requirements

  • Python 3.12+
  • macOS (Windows/Linux support planned)
  • Screen recording permission for your terminal

Development

# Clone and setup
git clone https://github.com/brycedrennan/time-guardian
cd time-guardian
make init

# Common commands
make test        # Run tests
make lint        # Run linter
make af          # Auto-format code
make check       # Run all checks

License

MIT


Stop wondering. Start knowing.pip install time-guard

Project details


Download files

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

Source Distribution

time_guard-0.0.4.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

time_guard-0.0.4-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file time_guard-0.0.4.tar.gz.

File metadata

  • Download URL: time_guard-0.0.4.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for time_guard-0.0.4.tar.gz
Algorithm Hash digest
SHA256 56afd6cb1f78e14217c18ffa0c31a06968777027d837d72a50373d1e26231079
MD5 549a288392964a5f42d2cc35768b77e4
BLAKE2b-256 a80b3542867074c7677704a08406d02eb9b5591f9aaf0c10cf123aa239e3f911

See more details on using hashes here.

File details

Details for the file time_guard-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: time_guard-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for time_guard-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 30ee75fae7b9d005291d854a37314ac443fa18374c11af6ba72ac83f4565e98b
MD5 6ab8abf909b1d617f822bba69f360da1
BLAKE2b-256 9c14622e59482754300d840d78523e248cdd39865613f0fc477cbd3753fe9f75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page