Python-based screen activity tracker that captures images every 5 seconds for AI-powered computer usage analysis.
Project description
Protect your time!
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-guardian
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]
- Capture — Screenshots taken every N seconds across all monitors
- Compare — Only saves when screen content actually changes
- Classify — GPT-4 Vision analyzes each window to determine activity
- 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-guardian
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file time_guard-0.0.3.tar.gz.
File metadata
- Download URL: time_guard-0.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cfd15f75837780be1ac1a02b09c5dbf846e5c32587381e70c741fcdf534df09
|
|
| MD5 |
3773ac32fa484ba01286143b3fa12ec4
|
|
| BLAKE2b-256 |
b27c02cf7b2b4dbb06e0cfd05c933cdfc4031f71a6be50eb3a7b4c0be6cdbf6b
|
File details
Details for the file time_guard-0.0.3-py3-none-any.whl.
File metadata
- Download URL: time_guard-0.0.3-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3aa6341e87a997dc328f975789a1fa86c7cc575511a218ebe9cae9f272085f1
|
|
| MD5 |
6ade241f57875291a1292cde145e9c2a
|
|
| BLAKE2b-256 |
f58121135707f6ec5ba484bed7d89b16141669fc8a70820fb2f8454fba933e44
|