A cross-platform python application to prevent your system from falling asleep.
Project description
Keep Me Alive
Prevent your computer from sleeping โ effortlessly.
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.
ย ย
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:
- Background Daemon (Python) โ runs silently and performs the actual activity simulation. It monitors system state and applies your rules.
- 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
If this tool saves you time, consider buying me a coffee โ
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30c1ad90cb6a73a77965e46960d90c70bac93e6c45ab86c228b2bc1c41544c4
|
|
| MD5 |
a8ec67e716e64e2500324a0d574bf7cd
|
|
| BLAKE2b-256 |
621fb9c68c05ed8510c958f68f0964914000e7a73e616531dc4743f2bcb34e90
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keep_me_alive-1.0.0.tar.gz -
Subject digest:
b30c1ad90cb6a73a77965e46960d90c70bac93e6c45ab86c228b2bc1c41544c4 - Sigstore transparency entry: 1436405302
- Sigstore integration time:
-
Permalink:
amitb2050/keep-me-alive@3738045ef38e036d3f92b4bfe568e53c65b3ebd5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/amitb2050
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3738045ef38e036d3f92b4bfe568e53c65b3ebd5 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ff09b832b408629bc21ddbb8b47ccf3fd5e59bf36896c19456e45780b111e84
|
|
| MD5 |
d6e42bc11b4e148f2a6eb488b28fc91c
|
|
| BLAKE2b-256 |
89c8b47722c752d7f72438c78135529a84e80136e959cc8317694923c5bb79b5
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keep_me_alive-1.0.0-py3-none-any.whl -
Subject digest:
6ff09b832b408629bc21ddbb8b47ccf3fd5e59bf36896c19456e45780b111e84 - Sigstore transparency entry: 1436405323
- Sigstore integration time:
-
Permalink:
amitb2050/keep-me-alive@3738045ef38e036d3f92b4bfe568e53c65b3ebd5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/amitb2050
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3738045ef38e036d3f92b4bfe568e53c65b3ebd5 -
Trigger Event:
workflow_dispatch
-
Statement type: