Skip to content

talha828/Meero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

e4decbd0-798b-4490-9f99-f44db3adfa7c

Meero - Personal Activity Logger

Python Platform License

Meero is a privacy-first, cross-platform activity logging system that tracks your computer usage with surgical precision. It captures window activity, browser URLs, clipboard content, screenshots with OCR, and advanced behavioral metrics—all stored locally in a SQLite database.

Use Case: Productivity tracking, time auditing, research data collection, or building context-aware AI assistants.


📸 Screenshots

Dashboard (Coming Soon) Metrics View
[Add screenshot here] [Add screenshot here]

✨ Features

🎯 Core Tracking

  • Active Window Tracking – Logs application name and window title
  • Browser URL Extraction – OCR-based address bar reading (no clipboard interference)
  • Clipboard Monitoring – Tracks text changes with privacy filters
  • Idle Detection – Platform-specific (Windows/macOS/Linux)
  • Session Management – Active vs idle time tracking

📸 Screen Context

  • Screenshot Capture – Periodic full-screen captures
  • OCR Processing – Extracts text using Tesseract
  • Smart Retention Policies – Keep all, delete after OCR, or keep only meaningful content

📊 Advanced Metrics

  • ⌨️ Typing Speed – Keys per minute with app-level breakdown
  • ⚠️ Error Detection – Identifies errors in window titles
  • 🔄 Context Switching – Measures app switching frequency
  • 😴 Idle Recovery – Time to refocus after breaks
  • 📑 Tab Explosion – Detects rapid browser tab switching
  • 📈 Productivity Score – Hourly aggregated metrics

🔒 Privacy & Control

  • Pause/Resume Logging – Toggle tracking anytime
  • Ignore List – Exclude specific applications
  • Sensitive Word Filtering – Redacts passwords, emails, credit cards
  • 100% Local Storage – No data leaves your machine

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                     MEERO LOGGING SYSTEM                     │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │
│  │   Activity  │  │   Browser   │  │     Screen          │ │
│  │   Tracker   │  │   Tracker   │  │     Tracker         │ │
│  │             │  │   (OCR)     │  │  (Screenshot/OCR)   │ │
│  └──────┬──────┘  └──────┬──────┘  └──────────┬──────────┘ │
│         │                │                     │             │
│         ▼                ▼                     ▼             │
│  ┌──────────────────────────────────────────────────────┐   │
│  │                   CORE SCHEDULER                      │   │
│  │            (Multi-threaded, WAL Mode SQLite)         │   │
│  └──────────────────────────────────────────────────────┘   │
│         │                │                     │             │
│         ▼                ▼                     ▼             │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │
│  │  Clipboard  │  │  Keyboard   │  │     Metrics         │ │
│  │   Monitor   │  │   Tracker   │  │    Calculator       │ │
│  └─────────────┘  └─────────────┘  └─────────────────────┘ │
│                              │                              │
│                              ▼                              │
│           ┌──────────────────────────────────┐              │
│           │         SQLite Database          │              │
│           │   ~/.personal_ai_logger/         │              │
│           │         activity.db              │              │
│           └──────────────────────────────────┘              │
└─────────────────────────────────────────────────────────────┘

📁 Project Structure

meero/
├── logger/                         # Core logging system
│   ├── core/
│   │   ├── scheduler.py            # Multi-threaded task scheduler
│   │   ├── database.py             # SQLite with WAL mode
│   │   └── logger.py               # Application logging
│   ├── trackers/
│   │   ├── activity.py             # Window tracking
│   │   ├── browser.py              # OCR-based URL extraction
│   │   ├── screen.py               # Screenshot + OCR
│   │   ├── clipboard.py            # Clipboard monitoring
│   │   └── keyboard.py             # Typing speed metrics
│   ├── metrics/
│   │   └── calculator.py           # Behavioral metrics engine
│   ├── session/
│   │   └── manager.py              # Session lifecycle
│   ├── privacy/
│   │   └── filter.py               # Sensitive data redaction
│   └── config.py                   # Configuration
├── scripts/
│   ├── start_logger.bat            # Windows startup
│   ├── manage_screenshots.py       # Screenshot utility
│   └── view_metrics.py             # Metrics dashboard
├── requirements.txt
└── README.md

🚀 Quick Start

1️⃣ Clone & Install

git clone https://github.com/talha828/meero.git
cd meero
pip install -r requirements.txt

2️⃣ Install Tesseract OCR

Platform Command
Windows Download from UB-Mannheim/tesseract
macOS brew install tesseract
Linux sudo apt install tesseract-ocr

3️⃣ Run the Logger

python -m logger.main

4️⃣ View Your Metrics

python view_metrics.py

⚙️ Configuration

Edit logger/config.py to customize behavior:

Setting Description Default
ACTIVITY_POLL_INTERVAL Window check frequency 2 sec
SCREENSHOT_INTERVAL Screenshot capture frequency 60 sec
SCREENSHOT_POLICY keep_all, delete_after_ocr, keep_on_text delete_after_ocr
IDLE_THRESHOLD_SECONDS Seconds before considered idle 60
IGNORE_APPS Applications to exclude ["Task Manager"]
ENABLE_KEYBOARD_TRACKING Track typing speed True

📊 Database Schema

Table Purpose
sessions Start/end times, active/idle duration
window_events Active window changes
browser_events URLs and domains visited
screenshots OCR text and file references
clipboard_events Clipboard content (hashed)
typing_metrics Keys per minute by application
error_metrics Errors detected in window titles
context_switches App switching frequency
idle_recovery Recovery time after breaks
tab_explosions Rapid tab switching events
hourly_metrics Aggregated productivity scores

🔒 Privacy & Security

  • 100% Local – No telemetry, no cloud uploads
  • Sensitive Data Redaction – Emails, passwords, credit cards auto-filtered
  • Pause AnytimePAUSE_LOGGING = True stops all tracking
  • App Ignore List – Exclude private applications
  • Hashed Clipboard – Only SHA-256 stored, not raw content

🛠️ Built With

  • SQLite + WAL Mode – Concurrent database access
  • Tesseract OCR – Screen text extraction
  • OpenCV – Image preprocessing for OCR
  • UI Automation – Cross-browser URL detection
  • pynput – Keyboard monitoring
  • Multi-threading – Non-blocking background tasks

🗺️ Roadmap

✅ Phase 1: Meero Logger (Current)

  • Multi-threaded activity tracking
  • OCR-based browser URL extraction
  • Screenshot + text retention policies
  • Behavioral metrics (typing speed, errors, context switches)
  • Privacy filters and local-only storage

🔄 Phase 1.5: Polish & Distribution

  • Web-based metrics dashboard (Streamlit)
  • Weekly email reports
  • System tray icon with controls
  • Export to CSV/JSON

🧪 Phase 2: HPAPDA Integration (Research)

  • Temporal pattern miner (frequent subsequence discovery)
  • Causal graph builder (Granger causality on event streams)
  • Latent state estimator (valence/arousal tracking)
  • Complementary persona engine
  • Multi-armed bandit for trigger optimization

🧠 The Bigger Vision: From Logger to HPAPDA

Meero is Phase 1 of a larger ambition.

The current system is a comprehensive Raw Event Stream—it captures every window switch, keystroke rhythm, browser domain, idle pattern, and contextual screenshot. This is the foundational layer for something much more intelligent.

Phase 2: HPAPDA (High-Precision Adaptive Personality Dynamics Architecture)

HPAPDA is a conceptual blueprint for second-generation AI companions—systems that don't just log what you do, but infer why you do it and adapt their personality in real-time to complement yours.

Phase 1: Meero (This Repo) Phase 2: HPAPDA
Raw event streaming Temporal pattern mining
SQLite storage Causal graph builder
Behavioral metrics Latent state estimator
Rule-based nudges Complementary persona engine

What HPAPDA Enables

  • Pattern Discovery: "After 45 minutes of coding, user opens Twitter for exactly 3 minutes" → variable: coding_fatigue
  • Causal Inference: Does checking Slack cause typing speed to drop? Or do both happen when you're already distracted?
  • Dynamic Persona: An AI that becomes more stable when you're anxious, or gently initiates when you're withdrawn
  • Local-First Intelligence: No cloud, no subscription, no privacy nightmares

📖 Read the full vision: HPAPDA: A Conceptual Blueprint for Second-Generation AI Companions

Meero is the necessary first step—the eyes and ears. HPAPDA is the brain that learns to be a decent, sarcastic, occasionally annoying but ultimately helpful second self.

Interested in contributing to Phase 2? Open an issue with the tag hpapda or reach out directly.


🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License – see the LICENSE file for details.


⚠️ Disclaimer

This tool is intended for personal productivity tracking only. Do not use it to monitor others without their explicit consent. The author assumes no responsibility for misuse.


🙏 Acknowledgments

  • Tesseract OCR – Open source OCR engine
  • UI Automation – Windows accessibility framework
  • All open source contributors who made this possible

📬 Contact

Talha Iqbal@Linkedintalha.developer.01@gmail.com

About

Privacy-first local activity logger capturing windows, browsers, keystrokes & behavioral metrics. Phase 1 of HPAPDA—a blueprint for second-generation AI companions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages