- Python 3.10 or higher
- macOS 10.12+ (for full feature support)
- uv package manager (recommended)
# Clone the repository
git clone https://github.com/yourusername/selfspy-python.git
cd selfspy-python
# Install with all dependencies
uv sync --group dev --extra macos
# Or install without development dependencies
uv sync --extra macos# Install from source
pip install -e .
# Install with macOS support
pip install -e ".[macos]"
# Install with development dependencies
pip install -e ".[dev]"Selfspy requires special permissions on macOS to monitor system activity:
-
Accessibility Access (Required)
- Monitors keyboard and mouse activity
- Tracks active windows and applications
-
Screen Recording (Optional)
- Only needed if screen capture features are enabled
- Not required for basic monitoring
# Check current permission status
uv run selfspy check-permissionsThis command will:
- Check which permissions are granted
- Open System Settings to the correct panel
- Guide you through the permission process
Manual Steps:
- Open System Settings → Privacy & Security → Privacy
- Select Accessibility
- Add your terminal application (Terminal.app, iTerm2, etc.)
- Enable the checkbox next to it
macOS support requires PyObjC frameworks:
# Included with --extra macos
uv sync --extra macos
# Or install separately
pip install pyobjc-framework-Quartz pyobjc-framework-ApplicationServicesLimited support using fallback pynput-based tracking:
# Install without macOS extras
uv sync --group dev
# Additional X11 dependencies may be required
sudo apt-get install python3-xlib # Debian/UbuntuBasic support using pynput:
# Install without macOS extras
uv sync --group dev# Check that selfspy command is available
uv run selfspy --help
# Test monitoring (will request permissions on macOS)
uv run selfspy daemon --debug
# Stop with Ctrl+CFor macOS desktop widgets:
# Python widgets (included with main install)
cd desktop-app
./simple_widget.py
# Or the advanced multi-widget system
./selfspy_desktop_advanced.pyBy default, Selfspy stores data in:
- macOS:
~/.selfspy/selfspy.db - Linux:
~/.local/share/selfspy/selfspy.db - Windows:
%APPDATA%\selfspy\selfspy.db
You can override this with the --data-dir flag.
If you want encrypted keystroke storage:
- First run will prompt for password:
uv run selfspy daemon- Or provide password via command line:
uv run selfspy daemon --password "your-password"Passwords are stored securely in your system keychain.
If monitoring doesn't work after granting permissions:
- Completely quit and restart your terminal application
- Re-run permission check:
uv run selfspy check-permissions - Try with
--debugflag to see detailed error messages
If you see PyObjC import errors on macOS:
# Reinstall macOS extras
uv sync --extra macos --reinstallIf you encounter database issues:
# Remove existing database (WARNING: deletes all data)
rm -rf ~/.selfspy/
# Start fresh
uv run selfspy daemon- Usage Guide - Learn how to use Selfspy
- Configuration - Customize your setup
- Desktop Widgets - Setup always-visible activity widgets