Keep-awake is a cli tool that can be used to keep your machine awake.
brew install mdpadberg/tap/ka
scoop bucket add mdpadberg https://github.com/mdpadberg/scoop-bucket.git
scoop install ka
⚠️ Maybe you need to run your terminal in admin mode to make keep awake work
brew install mdpadberg/tap/ka
Note: Keep awake is a fully open-sourced project and will never collect any user data! However if you want to use the keyboard function, you need to enable Accessibility permissions. Add your default terminal in the allowed Accessibility apps:
% ka -h
Usage: ka <COMMAND>
Commands:
keyboard-and-mouse Use keyboard and mouse to keep your machine awake [default random mouse movements & tab & windows/super/command]
keyboard Use keyboard to keep your machine awake [default tab & windows/super/command]
mouse Use mouse to keep your machine awake [default random mouse movements]
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
Use mouse to keep your machine awake
% ka mouse -h
Use mouse to keep your machine awake [default random mouse movements]
Usage: ka mouse [OPTIONS] <TIME>
Arguments:
<TIME> How long you want this command to run
Options:
-t, --timeunit <TIMEUNIT> Timeunit [default: minutes] [possible values: hours, minutes]
-h, --help Print help
-V, --version Print version
Use keyboard to keep your machine awake [default tab & windows/super/command]
% ka keyboard -h
Use keyboard to keep your machine awake [default tab & windows/super/command]
Usage: ka keyboard [OPTIONS] <TIME>
Arguments:
<TIME> How long you want this command to run
Options:
-t, --timeunit <TIMEUNIT> Timeunit [default: minutes] [possible values: hours, minutes]
-h, --help Print help
-V, --version Print version
Set name for this program
% ka keyboard-and-mouse -h
Use keyboard and mouse to keep your machine awake [default random mouse movements & tab & windows/super/command]
Usage: ka keyboard-and-mouse [OPTIONS] <TIME>
Arguments:
<TIME> How long you want this command to run
Options:
-t, --timeunit <TIMEUNIT> Timeunit [default: minutes] [possible values: hours, minutes]
-h, --help Print help
-V, --version Print version