caffelate
v1.0.1
Published
Simple CLI to keep macOS awake by nudging the mouse cursor.
Downloads
11
Readme
caffelate
caffelate is a lightweight CLI that keeps your machine awake by moving the mouse cursor a single pixel back and forth at fixed intervals. Inspired by the macOS caffeinate command, it provides a straightforward automation layer on top of the nut.js stack.
Usage
npm install -g caffelateSupported on Node.js 16 and newer.
caffelate start # launch the background worker
caffelate stop # stop the worker
caffelate status # check whether the worker is runningConfiguring the interval
The worker moves the cursor every 240 seconds by default.
You can override the interval by adding ~/.config/caffelate/settings.json. If XDG_CONFIG_HOME is set, the file is read from ${XDG_CONFIG_HOME}/caffelate/settings.json.
{
"intervalSeconds": 120
}intervalSecondsmust be a positive number.- If the file is missing or the value is invalid, the CLI falls back to the 240-second default.
Tests
pnpm test