idle-server

A Windows background program that reports how long since a human last touched the PC, and tells their input apart from simulated and unexplained input.

One command downloads the latest release and installs it for your user. It does not start the server or register it to start at login; see After installing. Windows only — releases are built for win-x64.

Install

Windows (PowerShell)irm https://idle.bat.nz | iex

Running it again on an installed PC upgrades in place: a running server is stopped, the executable replaced and that server started again. Configuration and logs are left alone.

After installing

Windows (PowerShell)idle-server install # start it at login idle-server start # start it now

idle-server uninstall removes the start-at-login entry again.

Where it installs

LocationNotes
%LOCALAPPDATA%\idle-server Per-user, no admin. The folder is added to your user PATH, so idle-server runs by name in new shells (including WSL).
config.json, state.json and logs\ live beside the executable.
= C:\Users\<you>\AppData\Local\idle-server

Options

Set these as environment variables before running the one-liner.

VariableDefaultMeaning
IDLE_SERVER_VERSIONthe latest releaserelease to install, e.g. 0.1.0
IDLE_SERVER_BINDIRsee Where it installsinstall directory
Windows (PowerShell)# pin a version $env:IDLE_SERVER_VERSION='0.1.0'; irm https://idle.bat.nz | iex # install elsewhere $env:IDLE_SERVER_BINDIR='C:\tools\idle-server'; irm https://idle.bat.nz | iex

Installing as administrator

idle-server install --admin, run from an admin shell, registers a logon task with highest privileges instead, so the server runs as admin at every login and can see input into admin windows. The risk: the default folder is writable without admin rights, so any normal program (including the agents and stray scripts this tool watches) could replace idle-server.exe and gain admin rights at your next login, with no prompt. If you want an admin install, use a protected folder such as C:\Program Files\idle-server (make only config.json writable for your user there; leave logs to the server, since a folder you can write to would let a normal program redirect the admin server's log writes). install --admin warns but still registers.

Windows (PowerShell, as administrator)$env:IDLE_SERVER_BINDIR='C:\Program Files\idle-server'; irm https://idle.bat.nz | iex & 'C:\Program Files\idle-server\idle-server.exe' install --admin

Commands

Windows (PowerShell)idle-server status # JSON: seconds since physical / simulated / unexplained input idle-server status --text # short form, e.g. 6m · sim 1s idle-server log --since 10m # recent input episodes idle-server start # start the server idle-server stop # stop the server idle-server update # replace the executable with the latest release

Exit codes: 0 ok, 1 error, 2 usage, 3 server not running.

From WSL

WSL does not add .exe for you, so run the Windows executable by its full name:

WSLidle-server.exe status