ActivityWatch / activitywatch
The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing ActivityWatch/activitywatch in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewRecords what you do so that you can know how you've spent your time . All in a secure way where you control the data . Website — Forum — Documentation — Releases Contributor stats — CI overview *Do you want to receive email updates on major announcements?* ***Signup for the newsletter!*** Table of Contents • About • Screenshots • Is this yet another time tracker? • Feature comparison • Installation & Usage • About this repository • Server • Watchers • Libraries • Contributing About The goal of ActivityWatch is simple: *Enable the collection of as much valuable lifedata as possible without compromising user privacy.* We've worked towards this goal by creating an application for safe storage of the data on the user's local machine and as well as a set of watchers which record data such as: • Currently active application and the title of its window • Currently active browser tab and its title and URL • Keyboard and mouse activity, to detect if you are AFK ("away from keyboard") or not It is up to you as user to collect as much as you want, or as little as you want (and we hope some of you will help write watchers so we can collect more). Screenshots You can find more (and newer) screenshots on the website. Installation & Usage Downloads are available on the releases page. For instructions on how to get started, please see the guide in the documentation. Interested in building from source? There's a guide for that too. Is this yet another time tracker? Yes, but we found that most time trackers lack one or more important features. **Common dealbreakers:** • Not open source • The user does not own the data (common with non-open source options) • Lack of synchronization (and when available: it's centralized and the sync server knows everything) • Difficult to setup/use (most open source options tend to target programmers) • Low data resolution (low level of detail, does not store raw data, long intervals between entries) • Hard or impossible to extend (collecting more data is not as simple as it could be) **To sum it up:** • Closed source solutions suffer from privacy issues and limited features. • Open source solutions aren't developed with end-users in mind and are usually not written to be easily extended (they lack a proper API). They also lack synchronization. We have a plan to address all of these and we're well on our way. See the table below for our progress. Feature comparison Basics | | User owns data | GUI | Sync | Open Source | | ------------- |:------------------:|:------------------:|:--------------------------:|:------------------:| | ActivityWatch | :white_check_mark: | :white_check_mark: | [WIP][sync], decentralized | :white_check_mark: | | [Selfspy] | :white_check_mark: | :x: | :x: | :white_check_mark: | | [ulogme] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | | [RescueTime] | :x: | :white_check_mark: | Centralized | :x: | | [WakaTime] | :x: | :white_check_mark: | Centralized | Clients | [sync]: https://github.com/ActivityWatch/activitywatch/issues/35 [Selfspy]: https://github.com/selfspy/selfspy [ulogme]: https://github.com/karpathy/ulogme [RescueTime]: https://www.rescuetime.com/ [WakaTime]: https://wakatime.com/ Platforms | | Windows | macOS | Linux | Android | iOS | | ------------- |:------------------:|:------------------:|:------------------:|:------------------:|:-------------------:| | ActivityWatch | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:x: | | Selfspy | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |:x: | | ulogme | :x: | :white_check_mark: | :white_check_mark: | :x: |:x: | | RescueTime | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |Limited functionality| Tracking | | App & Window Title | AFK | Browser Extensions | Editor Plugins | Extensible | | ------------- |:------------------:|:------------------:|:------------------:|:------------------:|:---------------------:| | ActivityWatch | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Selfspy | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | | ulogme | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | | RescueTime | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | | WakaTime | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Only for text editors | For a complete list of the things ActivityWatch can track, see the page on *watchers* in the documentation. Architecture About this repository This repo is a bundle of the core components and official modules of ActivityWatch (managed with ). Its primary use is as a meta-package providing all the components in one repo; enabling easier packaging and installation. It is also where releases of the full suite are published (see releases). Server ActivityWatch has two server implementations: • (Python) - The current default implementation • - A Rust implementation that is the planned future default Both provide a REST API to a datastore and query engine, and serve the web interface developed in the project (which provides the frontend). The REST API includes: • Access to a datastore suitable for timeseries/timeperiod-data organized in "buckets" (containers grouping related activity data by metadata like client type or hostname) • **Buckets API:** Create, retrieve, and delete data buckets • **Events API:** Read and write timestamped events within buckets • **Heartbeat API:** Watchers use heartbeat signals to update the current state of activity (e.g., active application, AFK status) • **Query API:** simple query scripting language for filtering, merging, grouping, and transforming events • **Client libraries:** Language-specific libraries like (Python), , and that wrap REST endpoints for programmatic access The frontend ( ) includes: • **Data visualization:** Dashboard and timeli…