{"id":29486413,"url":"https://github.com/aka-nikko/desktop-activity-tracker","last_synced_at":"2026-04-18T13:32:43.355Z","repository":{"id":304255529,"uuid":"1018256180","full_name":"aka-nikko/desktop-activity-tracker","owner":"aka-nikko","description":"A Desktop activity tracker that logs all app usage and keystrokes.","archived":false,"fork":false,"pushed_at":"2025-07-13T21:16:31.000Z","size":2019,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T06:04:16.239Z","etag":null,"topics":["cryptography","openai","python","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aka-nikko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-11T22:19:56.000Z","updated_at":"2025-07-13T21:15:07.000Z","dependencies_parsed_at":"2025-07-12T00:29:58.493Z","dependency_job_id":"63417849-edad-4c1d-a54e-decebeb02360","html_url":"https://github.com/aka-nikko/desktop-activity-tracker","commit_stats":null,"previous_names":["aka-nikko/desktop-activity-tracker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aka-nikko/desktop-activity-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Fdesktop-activity-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Fdesktop-activity-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Fdesktop-activity-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Fdesktop-activity-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aka-nikko","download_url":"https://codeload.github.com/aka-nikko/desktop-activity-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aka-nikko%2Fdesktop-activity-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","openai","python","sqlite3"],"created_at":"2025-07-15T08:00:42.220Z","updated_at":"2026-04-18T13:32:43.304Z","avatar_url":"https://github.com/aka-nikko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Desktop Activity Tracker\n## Overview\nA privacy-conscious productivity tracker for Windows that logs app usage, keystrokes (with sensitive input redaction), idle time, and generates daily summaries using OpenAI GPT.\n\n---\n\n## Features\n\n- **Window Tracking:** Logs active window changes and durations.\n- **Keystroke Logging:** Tracks keystrokes, batches logs, and redacts sensitive input (e.g., passwords).\n- **Idle Detection:** Detects and logs periods of user inactivity.\n- **Daily Summaries:** Uses OpenAI GPT to generate a summary of your day based on tracked data.\n- **Credential Security:** Encrypts and stores sensitive credentials using Fernet symmetric encryption.\n- **Hotkey Trigger:** Press a defined hotkey anytime to generate a summary on demand.\n- **Nightly Automation:** Automatically generates a summary at 23:59 each day.\n- **System Tray Control:** Minimal UI with a tray icon to start/stop tracking, trigger summaries, and access config files.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.9+\n- Windows OS\n- [OpenAI API Key](https://platform.openai.com/account/api-keys)\n\n### Installation\n\n1. **Clone the repository:**\n    ```sh\n    git clone https://github.com/your-username/desktop-activity-tracker.git\n    cd desktop-activity-tracker\n    ```\n\n2. **Create and activate a virtual environment:**\n    ```sh\n    python -m venv myenv\n    myenv\\Scripts\\activate\n    ```\n\n3. **Install dependencies:**\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n4. **Set up your `.env` file:**\n    ```\n    OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n    ```\n\n5. **Configure app settings:**\n\n    Edit config/settings.json to customize log paths, summary time, batch size, and GPT model. See the Configuration section for details.\n\n---\n\n## Usage\n\nStart the tracker directly with:\n\n```sh\npython main.py\n```\n\n- The app will run in the background, logging activity and generating summaries.\n- Press `Ctrl+Shift+S` to manually generate a summary.\n- Summaries are saved in the `logs/` directory.\n\nOr, use the system tray interface with:\n\n```sh\npython launcher.py\n```\n\n- Adds a tray icon with controls to start/stop tracking, trigger summaries, and open config files.\n- Clean, minimal UI for quick access and control.\n\n---\n\n## Configuration\nAll runtime settings are stored in a settings.json file. Below is a description of each key:\n| Key                  | Description                                                                                                            |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `LOG_DIR`            | Directory where log files are stored.                                                                                  |\n| `DB_PATH`            | Directory where the SQLite database is located.                                                                        |\n| `DB_FILE`            | Name of the SQLite database file that stores activity data.                                                            |\n| `FERNET_KEY_PATH`    | Directory containing the encryption key used for secure data (Fernet).                                                 |\n| `CREDS_FILE_PATH`    | Path to files containing sensitive credentials (e.g., username, passwords).                                            |\n| `SENSITIVE_KEYWORDS` | List of keywords that are considered sensitive (e.g., login, password, auth). Used to mask or ignore certain activity. |\n| `BATCH_SIZE`         | Number of keystroke entries to collect before writing to the database.                                                 |\n| `FLUSH_INTERVAL`     | Interval in seconds to flush the collected activity data to the database.                                              |\n| `SUMMARY_TRIGGER`    | Hotkey combination to manually trigger activity summary. Example: `\u003cctrl\u003e+\u003cshift\u003e+s`                                   |\n| `SUMMARY_HOUR`       | Hour (24-hour format) to automatically generate daily summary.                                                         |\n| `SUMMARY_MINUTE`     | Minute of the hour when the daily summary is triggered.                                                                |\n| `GPT_MODEL`          | OpenAI model used for summarization (e.g., `gpt-3.5-turbo`).                                                           |\n\n\n## Project Structure\n\n```\n.\n├── main.py\n├── launcher.txt\n├── requirements.txt\n├── .env\n├── logs/\n├── config/\n│   └── settings.py\n├── logging_utils/\n│   └── logger.py\n├── storage/\n│   ├── db.py\n│   └── security.py\n├── summarizer/\n│   └── gpt_summary.py\n└── tracker/\n    ├── idle_detector.py\n    ├── keystroke_tracker.py\n    └── window_tracker.py\n```\n\n---\n\n## Security \u0026 Privacy\n\n- Sensitive keystrokes (e.g., passwords) are redacted and never stored in plain text.\n- Credentials are encrypted using Fernet and stored in `assets/creds.bin`.\n- Your OpenAI API key is loaded from the `.env` file and never logged.\n\n---\n\n## Screenshots\n### Desktop Activity Tracker\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://github.com/aka-nikko/desktop-activity-tracker/blob/main/screenshots/desktop_activity_tracker.png\" width=\"45%\" title=\"Desktop Activity Tracker\"/\u003e\u0026emsp;\n  \u003cimg src=\"https://github.com/aka-nikko/desktop-activity-tracker/blob/main/screenshots/tracking.png\" width=\"45%\" title=\"Tracking\"/\u003e\n\u003c/p\u003e\n\n### Tray UI\n![Tray_icon](https://github.com/aka-nikko/desktop-activity-tracker/blob/main/screenshots/tray_icon.png)\n### Logging\n![Logging](https://github.com/aka-nikko/desktop-activity-tracker/blob/main/screenshots/logging.png)\n### Summary\n![Summary](https://github.com/aka-nikko/desktop-activity-tracker/blob/main/screenshots/gpt-summary.png)\n\n---\n\n## Contributing\n\nPull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\n---\n\n## Credits\n\n- Built with [python-dotenv](https://github.com/theskumar/python-dotenv), [pynput](https://github.com/moses-palmer/pynput), [cryptography](https://cryptography.io/),\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faka-nikko%2Fdesktop-activity-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faka-nikko%2Fdesktop-activity-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faka-nikko%2Fdesktop-activity-tracker/lists"}