Skip to main content

A cross-platform python application to prevent your system from falling asleep.

Project description

Keep Me Alive

Keep Me Alive

Prevent your computer from sleeping โ€” effortlessly.

Latest Release PyPI Version MIT License Platform


What is Keep Me Alive?

Keep Me Alive is a lightweight desktop utility that keeps your computer awake by simulating subtle activity in the background. Whether you need to prevent screen dimming during a long download, keep your messaging status "active," or avoid sleep during a presentation โ€” Keep Me Alive has you covered.

  • ๐Ÿ–ฑ๏ธ Simulates natural activity โ€” mouse movements, clicks, key presses, or scroll events
  • ๐Ÿง  Smart โ€” only runs when you actually need it (battery, idle, app-aware)
  • ๐ŸŽ›๏ธ Configurable โ€” fine-tune every parameter from a beautiful native GUI or the command line
  • ๐Ÿ’ป Cross-platform โ€” works on macOS and Windows

Installation

Step 1 โ€” Install the Backend (Required)

The core daemon is a Python package. Install it with pip:

pip install keep-me-alive

This gives you the keep-me-alive CLI and the background daemon that does the actual work. You can use it entirely from the terminal โ€” no GUI needed.

Requires: Python 3.8+

Step 2 โ€” Install the Desktop GUI (Optional)

For a point-and-click experience, download the companion desktop app:

Platform Download
macOS Download .dmg
Windows Download .exe

The GUI is a system tray app that controls the backend visually โ€” it will auto-detect the keep-me-alive command installed in Step 1.

After launching, Keep Me Alive appears in your system tray (menu bar on macOS). Click the icon to enable/disable, open preferences, or set a timed quit.

Core Settingsย ย  Pause & Trigger Settings


Features

๐ŸŽฏ Multiple Jiggle Styles

Style Description
Standard Subtle, randomized mouse movements with human-like Bรฉzier curves
Click Simulates left-clicks at the current cursor position
Scroll Performs mouse wheel scrolls
Keystroke Presses the Shift key
Mixed Randomly combines all of the above for maximum stealth

โฑ๏ธ Smart Scheduling

  • Interval โ€” Set how often activity is simulated (5sโ€“600s)
  • Jitter โ€” Add randomness to the interval so it feels natural (0โ€“100%)
  • Idle Timeout โ€” Only jiggle after the system has been idle for a set duration
  • Timed Quit โ€” Automatically stop after a duration (e.g., 1h30m)

๐Ÿ›‘ Pause Whenโ€ฆ

  • Running on battery power
  • The screen is locked
  • Specific apps are in the foreground (e.g., pause while in Zoom)

๐Ÿš€ Activate Whenโ€ฆ

  • CPU usage exceeds a threshold
  • Certain apps or processes are running
  • A removable drive is mounted
  • Media is playing

โšก Other

  • Hot-reloading โ€” change settings without restarting the daemon
  • Auto-updates โ€” the GUI checks for new versions automatically
  • Launch on Login โ€” optionally start with your system

CLI Usage

The keep-me-alive command controls the background daemon.

# Start the daemon
keep-me-alive start

# Stop the daemon
keep-me-alive stop

# Toggle (start if stopped, stop if running)
keep-me-alive toggle

# Auto-quit after 1 hour and 15 minutes
keep-me-alive timed-quit 1h15m

# Cancel a timed quit
keep-me-alive cancel-quit

# Update preferences from the command line
keep-me-alive config --interval 60 --style click --distance 5

How It Works

Keep Me Alive has two layers:

  1. Background Daemon (Python) โ€” runs silently and performs the actual activity simulation. It monitors system state and applies your rules.
  2. Desktop GUI (Electron) โ€” a tray app that gives you one-click control and a visual preferences panel.

Both share a common configuration file (~/.keep_me_alive_config), so changes from either interface are instantly reflected.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  System Tray UI โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚  Config File โ”‚โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚  CLI Commands โ”‚
โ”‚   (Electron)    โ”‚       โ”‚  (~/.keep_   โ”‚       โ”‚  (Python/     โ”‚
โ”‚                 โ”‚       โ”‚  me_alive_   โ”‚       โ”‚   Typer)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚  config)     โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚ watches
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚   Daemon     โ”‚
                          โ”‚  (Python)    โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Development

Prerequisites

  • Python 3.8+
  • Node.js & npm (for the GUI)

Setup

# Clone the repo
git clone https://github.com/amitb2050/keep-me-alive.git
cd keep-me-alive

# Install the Python package in editable mode
pip install -e .

# Install GUI dependencies
cd gui && npm install

Run Locally

# Start the CLI daemon
keep-me-alive start

# Or launch the Electron GUI in dev mode
cd gui && npm start

Run Tests

pytest

Project Structure

src/keep_me_alive/
โ”œโ”€โ”€ core/        # Jiggler loop, OS hooks, action strategies
โ”œโ”€โ”€ cli/         # CLI commands (Typer)
โ”œโ”€โ”€ config/      # Pydantic settings & config management
gui/             # Electron app (HTML/CSS/JS)
tests/           # Pytest test suite

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

If this tool saves you time, consider buying me a coffee โ˜•

Buy Me a Coffee


License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keep_me_alive-1.0.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keep_me_alive-1.0.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file keep_me_alive-1.0.0.tar.gz.

File metadata

  • Download URL: keep_me_alive-1.0.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for keep_me_alive-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b30c1ad90cb6a73a77965e46960d90c70bac93e6c45ab86c228b2bc1c41544c4
MD5 a8ec67e716e64e2500324a0d574bf7cd
BLAKE2b-256 621fb9c68c05ed8510c958f68f0964914000e7a73e616531dc4743f2bcb34e90

See more details on using hashes here.

Provenance

The following attestation bundles were made for keep_me_alive-1.0.0.tar.gz:

Publisher: publish-pypi.yml on amitb2050/keep-me-alive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file keep_me_alive-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: keep_me_alive-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for keep_me_alive-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ff09b832b408629bc21ddbb8b47ccf3fd5e59bf36896c19456e45780b111e84
MD5 d6e42bc11b4e148f2a6eb488b28fc91c
BLAKE2b-256 89c8b47722c752d7f72438c78135529a84e80136e959cc8317694923c5bb79b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for keep_me_alive-1.0.0-py3-none-any.whl:

Publisher: publish-pypi.yml on amitb2050/keep-me-alive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page