Selfspy logo

Selfspy

Continuously logs computer activity for personal analytics

Selfspy runs as a background daemon on Linux, macOS, and Windows, capturing process names, window titles, mouse clicks, and keystrokes (optionally encrypted) to generate detailed usage statistics and reminders.

Overview

Overview

Selfspy runs as a background daemon on Linux, macOS, and Windows, capturing process names, window titles, mouse clicks, and keystrokes (optionally encrypted) to generate detailed usage statistics and reminders.

Capabilities

The data is stored in a local SQLite file encrypted with Blowfish using a password you provide. You can query the log with the selfstats command‑line tool, applying regular‑expression filters, date ranges, or keystroke‑count sorting to answer questions such as “what did I type yesterday?” or “how much time did I spend in Emacs”. Because only the text columns are encrypted, searches on process names and window titles remain fast. Selfspy can be launched at session start via X init scripts or macOS launch agents, and it offers a --no-text mode to omit sensitive keystrokes entirely.

Highlights

Cross‑platform daemon for Linux, macOS, and Windows
Optional Blowfish encryption of typed text with password protection
SQLite backend with SQLAlchemy models for easy querying
`selfstats` CLI for on‑demand reports, regex searches, and time‑range filters

Pros

  • Provides granular activity data for self‑quantification
  • Works with any application that reports window titles
  • Encryption protects sensitive keystrokes
  • Extensible via Python and direct SQLite access

Considerations

  • Requires Python 2.7; no native Python 3 support
  • Windows installation may need precompiled binaries for dependencies
  • Does not capture screen content or visual context
  • Configuration can be complex for newcomers

Managed products teams compare with

When teams consider Selfspy, these hosted platforms usually appear on the same shortlist.

Clockify logo

Clockify

Time tracking and timesheets for teams and freelancers

Everhour logo

Everhour

Time tracking that integrates deeply with project tools

Harvest logo

Harvest

Time tracking with invoicing and expense tracking

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Developers who want detailed personal productivity metrics
  • Researchers studying computer usage patterns
  • Users needing a searchable log of typed text for recovery
  • Sysadmins who want automated activity auditing on workstations

Not ideal when

  • Environments that mandate Python 3 exclusively
  • Organizations with strict data‑privacy policies prohibiting keylogging
  • Users seeking graphical dashboards out of the box
  • Systems without ability to install required native libraries

How teams use it

Recover lost typed content

Query `selfstats` to retrieve text entered in the last hour, helping restore accidentally closed drafts.

Generate time‑tracking reports

Filter by application and keystroke count to produce accurate work logs for billing or project management.

Identify forgotten passwords

Search encrypted logs for specific domain titles to locate previously typed credentials.

Analyze daily computer usage

Produce statistics on active windows, mouse clicks, and typing intensity to understand productivity patterns.

Tech snapshot

Python100%
Makefile1%

Frequently asked questions

Does Selfspy store passwords in plain text?

No, typed text is encrypted with Blowfish using a user‑supplied password; you can also disable text storage with `--no-text`.

Which operating systems are supported?

Linux (X11), macOS, and Windows, with platform‑specific dependencies noted in the README.

Can I run Selfspy with Python 3?

The project is tested only with Python 2.7; Python 3 compatibility is not provided.

How do I start Selfspy automatically on login?

Add the `selfspy` command to your X session startup files (e.g., `~/.xinitrc`) or, on macOS, place the provided plist in `~/Library/LaunchAgents/`.

What database backend does Selfspy use?

All activity is stored in a local SQLite database, accessible via SQLAlchemy models or the `selfstats` CLI.

Project at a glance

Dormant
Stars
2,479
Watchers
2,479
Forks
231
LicenseGPL-3.0
Repo age13 years old
Last commit7 years ago
Primary languagePython

Last synced 11 hours ago