wnlctl is a small Windows 11 Night Light CLI for schedule-preserving state
control.
wnlctl on, wnlctl off, and wnlctl toggle preserve the configured Night
Light schedule and only force the current state.
- Turn Windows Night Light on or off without disabling the configured schedule
- Toggle Night Light from scripts or keyboard shortcut wrappers
- Print plain
on/offoutput for simple shell integration - Print JSON output for scripts and other automation
With Scoop:
scoop bucket add lucidust https://github.com/lucidust/scoop-bucket
scoop install wnlctlOr download wnlctl-windows-x64.zip from the latest GitHub Release, extract
it, and place wnlctl.exe somewhere on your PATH.
To verify the downloaded archive, compare its SHA256 hash with the published
.sha256 file:
Get-FileHash .\wnlctl-windows-x64.zip -Algorithm SHA256wnlctl status
wnlctl status --json
wnlctl on
wnlctl off
wnlctl toggle
wnlctl toggle --json
wnlctl diagnose
wnlctl diagnose --jsonPlain output is on or off.
statusreads the current Night Light state and settings.onwrites the Night Light state value and preserves the schedule.offwrites the Night Light state value and preserves the schedule.toggleswitches the current state and preserves the schedule.diagnosereads additional Night Light diagnostic details without changing any settings.
Use --json for scripts, automation, status bars, and other integrations:
wnlctl status --jsonExample output:
{"enabled":false,"scheduleMode":"sunset-to-sunrise","colorTemperatureKelvin":4751,"scheduleStart":"21:00","scheduleEnd":"05:00","sunsetTime":"00:00","sunriseTime":"00:00"}diagnose --json prints a larger read-only snapshot intended for issue reports
and troubleshooting. It includes the default Night Light CloudStore state,
per-device Night Light CloudStore entries when present, and basic Windows build
information.
Use diagnose when the visible Night Light tint does not match status, or
when reporting behavior that may depend on Windows build, HDR, display color
management, or per-device Night Light state:
wnlctl diagnose
wnlctl diagnose --jsonThe command does not attempt to repair Windows state. It only reads the current user's default and per-device Night Light CloudStore values so that registry state can be compared with what is visible on screen.
Windows does not expose a stable public Night Light management API. wnlctl
uses Windows CloudStore registry data, so behavior should be verified when using
it on a Windows version that has not been tested before.
wnlctl currently supports Windows 11 only. It has been tested by the
maintainer on Windows 11 24H2 (OS Build 26100.8246). Windows 10 and other
Windows versions have not been tested.
wnlctl has no networking code. Runtime access is limited to the current
user's Windows registry values for Night Light state and settings:
HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.bluelightreductionstate\windows.data.bluelightreduction.bluelightreductionstateHKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.settings\windows.data.bluelightreduction.settings
The diagnose command also reads matching per-device Night Light CloudStore
values under the same Current store when Windows has created them, plus basic
Windows version values from:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
Windows itself may sync Night Light settings through Windows Backup or Enterprise State Roaming when those OS features are enabled.
cargo build --releaseThe binary will be written to:
target\release\wnlctl.exe
The registry parsing and serialization code is vendored from
kvnxiao/win-nightlight-cli at commit
7a94ef98ee83d287241d46485b48490a48ac16ee.
The upstream project also provides a CLI command named wnl. This project uses
the separate wnlctl name to avoid command-name overlap while keeping the
tool's purpose explicit. See THIRD_PARTY_NOTICES.md for attribution details.