Convert Figma logo to code with AI

ActivityWatch logoactivitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.

11,773
536
11,773
154

Top Related Projects

Kanban project management software

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.

Quick Overview

ActivityWatch is an open-source, cross-platform application for automatic time-tracking. It monitors your computer usage and provides detailed insights into how you spend your time across different applications and websites. ActivityWatch aims to help users improve productivity and gain a better understanding of their digital habits.

Pros

  • Cross-platform compatibility (Windows, macOS, Linux)
  • Privacy-focused: data is stored locally by default
  • Extensible through plugins and custom watchers
  • Provides detailed visualizations and reports of time usage

Cons

  • Setup and configuration can be complex for non-technical users
  • Some features may require additional setup or coding knowledge
  • Limited mobile support compared to desktop functionality
  • Occasional stability issues reported by some users

Getting Started

To get started with ActivityWatch:

  1. Download the latest release from the official website or GitHub releases page.
  2. Install the application on your system.
  3. Run ActivityWatch and allow it to start tracking your activities.
  4. Access the web interface at http://localhost:5600 to view your data and reports.

For developers who want to contribute or customize ActivityWatch:

# Clone the repository
git clone https://github.com/ActivityWatch/activitywatch.git
cd activitywatch

# Install dependencies
make build

# Run ActivityWatch
make run

Note: ActivityWatch is primarily an application rather than a code library, so direct code examples for usage are not applicable. However, developers can extend its functionality through custom watchers and plugins.

Competitor Comparisons

Kanban project management software

Pros of Kanboard

  • Focused on project management and task organization
  • Includes features like Gantt charts, subtasks, and time tracking
  • Self-hosted solution with more control over data

Cons of Kanboard

  • Less emphasis on personal productivity tracking
  • May require more setup and maintenance as a self-hosted application
  • Limited automatic time tracking capabilities

Code Comparison

Kanboard (PHP):

public function getColumns($project_id)
{
    return $this->db->table(self::TABLE)
        ->eq('project_id', $project_id)
        ->asc('position')
        ->findAll();
}

ActivityWatch (Python):

def get_buckets():
    buckets = _query_buckets(datastore)
    for bucket in buckets:
        if bucket["type"] == "currentwindow":
            yield bucket

The code snippets show different approaches:

  • Kanboard uses a database query to retrieve project columns
  • ActivityWatch focuses on retrieving and processing time-tracking data

Both projects serve different purposes:

  • Kanboard is a task management system
  • ActivityWatch is a time-tracking and productivity tool

While there's some overlap in functionality, they cater to different user needs and use cases.

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.

Pros of vscode-wakatime

  • Seamless integration with Visual Studio Code
  • Extensive language support and project detection
  • Detailed reports and visualizations on the WakaTime dashboard

Cons of vscode-wakatime

  • Requires a WakaTime account and relies on third-party servers
  • Limited privacy control as data is stored on WakaTime's servers
  • Free tier has limitations on data retention and features

Code comparison

ActivityWatch:

from aw_core.models import Event
from aw_client import ActivityWatchClient

client = ActivityWatchClient("my-client")
client.create_bucket("my-bucket", event_type="app.editor.activity")
client.send_event("my-bucket", Event(timestamp=time.now(), duration=0, data={"language": "python"}))

vscode-wakatime:

const wakatime = require('wakatime');

wakatime.init({
  apiKey: 'your-api-key',
  plugin: 'vscode-wakatime/1.0.0'
});

wakatime.sendHeartbeat('/path/to/file.py', 'Python');

Both ActivityWatch and vscode-wakatime offer time-tracking capabilities for developers, but they differ in their approach and features. ActivityWatch focuses on privacy and local data storage, while vscode-wakatime provides a more integrated experience with Visual Studio Code and offers extensive reporting features through its web dashboard. The choice between the two depends on individual preferences for privacy, data ownership, and desired features.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Records 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

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 dataGUISyncOpen Source
ActivityWatch:white_check_mark::white_check_mark:WIP, 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:CentralizedClients
Platforms
WindowsmacOSLinuxAndroidiOS
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 TitleAFKBrowser ExtensionsEditor PluginsExtensible
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

graph TD;
  aw-qt[<a href='https://github.com/ActivityWatch/aw-qt'>aw-qt</a>];
  aw-notify[<a href='https://github.com/ActivityWatch/aw-notify'>aw-notify</a>];
  aw-server[<a href='https://github.com/ActivityWatch/aw-server'>aw-server</a>];
  aw-webui[<a href='https://github.com/ActivityWatch/aw-webui'>aw-webui</a>];
  aw-watcher-window[<a href='https://github.com/ActivityWatch/aw-watcher-window'>aw-watcher-window</a>];
  aw-watcher-afk[<a href='https://github.com/ActivityWatch/aw-watcher-afk'>aw-watcher-afk</a>];
  aw-watcher-web[<a href='https://github.com/ActivityWatch/aw-watcher-web'>aw-watcher-web</a>];
  aw-sync[<a href='https://github.com/ActivityWatch/aw-server-rust/tree/master/aw-sync'>aw-sync</a>];

  aw-qt -- Manages --> aw-server;
  aw-qt -- Manages --> aw-notify -- Queries --> aw-server;
  aw-qt -- Manages --> aw-watcher-window -- Watches --> S1[Active window] -- Heartbeats --> aw-server;
  aw-qt -- Manages --> aw-watcher-afk -- Watches --> S2[AFK status] -- Heartbeats --> aw-server;
  Browser -- Manages --> aw-watcher-web -- Watches --> S3[Active tab] -- Heartbeats --> aw-server;
  SF -- Dropbox/Syncthing/etc --> SF;
  aw-server <-- Push/Pull --> aw-sync <-- Read/Write --> SF[Sync folder];
  aw-server -- Serves --> aw-webui -- Queries --> aw-server;

  %% User -- Interacts --> aw-webui;
  %% User -- Observes --> aw-notify;
  %% User -- Interacts --> aw-qt;

classDef lightMode fill:#FFFFFF, stroke:#333333, color:#333333;
classDef darkMode fill:#333333, stroke:#FFFFFF, color:#FFFFFF;

classDef lightModeLinks stroke:#333333;
classDef darkModeLinks stroke:#FFFFFF;

class A,B,C,D,E,G lightMode;
class A,B,C,D,E,G darkMode;

%% linkStyle 0 stroke:#FF4136, stroke-width:2px;
%% linkStyle 1 stroke:#1ABC9C, stroke-width:2px;

About this repository

This repo is a bundle of the core components and official modules of ActivityWatch (managed with git submodule). 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

aw-server is the official implementation of the core service which the other ActivityWatch services interact with. It provides a REST API to a datastore and query engine. It also serves the web interface developed in the aw-webui project (which provides the frontend part of the webapp).

The REST API includes:

  • Access to a datastore suitable for timeseries/timeperiod-data
  • A query engine and language for such data

The webapp includes:

  • Data visualization & browser
  • Query explorer
  • Export functionality

Watchers

ActivityWatch comes pre-installed with two watchers:

  • aw-watcher-afk tracks the user active/inactive state from keyboard and mouse input
  • aw-watcher-window tracks the currently active application and its window title.

There are lots of other watchers for ActivityWatch which can track more types of activity. Like aw-watcher-web which tracks time spent on websites, multiple editor watchers which track spent time coding, and many more! A full list of watchers can be found in the documentation.

Libraries

  • aw-core - core library, provides no runnable modules
  • aw-client - client library, useful when writing watchers

Folder structure

Contributing

Want to help? Great! Check out the CONTRIBUTING.md file!

Questions and support

Have a question, suggestion, problem, or just want to say hi? Post on the forum!