KeyboardCat is a desktop pet application inspired by Bongo Cat. It tracks your keyboard activity, reminds you to take breaks, and rewards you with new cat colors as you reach milestones.
- Keyboard Tracking: Records the number of keyboard presses over time.
- Rest Reminders: Prompts you to take a break at regular intervals.
- Color Unlocks: Unlock new cat colors every 10,000 key presses.
- Python >= 3.12.0
To avoid dependency conflicts, create and activate a virtual environment:
python -m venv venv
venv\Scripts\activate # WindowsInstall the required Python packages listed in requirements.txt:
pip install -r requirements.txtExecute the main script to start KeyboardCat:
python keyboard_cat.pyTo create a standalone executable, use PyInstaller. Ensure you have the necessary files (e.g., cat_icon.ico) in the project directory.
pyinstaller --noconsole --name KeyboardCat --icon=cat_icon.ico --add-data "cat_icon.ico;." --hidden-import=pystray --hidden-import=PIL.Image --hidden-import=keyboard keyboard_cat.pyIf UPX is installed, use the following command to reduce the executable size. Replace your\path\to\upx with the actual path to the UPX directory:
pyinstaller --noconsole --name KeyboardCat --icon=cat_icon.ico --add-data "cat_icon.ico;." --hidden-import=pystray --hidden-import=PIL.Image --hidden-import=keyboard --upx-dir your\path\to\upx --upx-exclude keyboard.pyd keyboard_cat.pyThe packaged executable will be located in the dist directory and can be run directly.
-
Ensure cat_icon.ico is in the project directory for the icon to work correctly.
-
The keyboard library may require administrator privileges on some systems.
-
If you encounter issues with dependencies, verify that your Python version is >= 3.12.0 and that pip is up to date:
pip install --upgrade pip
This project is licensed under the MIT License (or specify your preferred license).