Local automation API

Automate Windows monitor brightness with the Display Dimmer CLI API.

Use Display Dimmer from PowerShell, Task Scheduler, Stream Deck, AutoHotkey, C# helper apps, and sensors while the app keeps ownership of monitor identity, DDC/CI, fallback, schedules, and app rules.

Local-only PowerShell JSON output DDC/CI + fallback

Script brightness safely

Call one command and let Display Dimmer handle display identity, DDC/CI health, gamma fallback, and live UI state.

Build real integrations

Drive brightness from keyboard tools, Task Scheduler, Stream Deck, AutoHotkey, C# apps, and desk sensors.

Cooperate with automation

Use named sources so external controllers can stand down while schedules or app rules own a display.

Quick start

Local automation is a Display Dimmer Pro feature. Install or update Display Dimmer, start the app, then open Settings > Advanced > Local automation > Manage... and turn on Local automation.

1

List connected displays

DisplayDimmer.Cli.exe --list-displays

Copy a targetId. Prefer a stable dd_... target for scripts you plan to keep.

2

Set brightness for one display

DisplayDimmer.Cli.exe --set-brightness 70 --target dd_your_stable_id

Brightness changes are live-only by default. Add --save only when a script should change saved Display Dimmer settings.

3

Read state for scripts

DisplayDimmer.Cli.exe --get-state --target all --json --pretty

JSON state includes brightness, contrast, control mode, and automation state so helper tools can make better decisions.

Practical command chooser

Use the app-owned commands for normal brightness and contrast work. They keep Display Dimmer's sliders, fallback path, and automation state in sync.

Brightness

Set an absolute value or adjust relative to the current value.

DisplayDimmer.Cli.exe --set-brightness 40 --target primary
DisplayDimmer.Cli.exe --adjust-brightness -10 --target dd_your_stable_id

Contrast

Change Display Dimmer's software/gamma contrast state.

DisplayDimmer.Cli.exe --set-contrast 60 --target dd_your_stable_id
DisplayDimmer.Cli.exe --adjust-contrast 5 --target primary

DDC/CI or gamma route

Force the route only when a script needs a specific control path.

DisplayDimmer.Cli.exe --set-brightness 35 --brightness-mode gamma --target dd_your_stable_id
DisplayDimmer.Cli.exe --set-brightness 70 --brightness-mode ddc --target dd_your_stable_id
DisplayDimmer.Cli.exe --set-ddc enabled --target dd_your_stable_id

State and watch

Poll state once, or stream cached state changes as JSON Lines.

DisplayDimmer.Cli.exe --get-state --target all --json --pretty
DisplayDimmer.Cli.exe --watch --json

Automation handoff behavior

By default, --set-brightness acts like a manual override. That is usually what you want for a keyboard shortcut, macro button, or no-motion dimmer.

Manual override

Use --source cli when a script is intentionally taking control and should interrupt active schedules or app rules for the target.

DisplayDimmer.Cli.exe --set-brightness 45 --target primary --source cli

Cooperative external source

Use a stable source name when a sensor or helper should apply only when Display Dimmer automation is not already controlling the display.

DisplayDimmer.Cli.exe --set-brightness 45 --target dd_your_stable_id --source desk-light-sensor

Handoff-only update

Refresh a standing-by external value without moving the display or interrupting schedules and app rules.

DisplayDimmer.Cli.exe --update-external-brightness 45 --target dd_your_stable_id --source desk-light-sensor

Where the CLI fits

This page gives you the practical path into the CLI. Use GitHub for runnable examples, exact JSON fields, exit codes, and deeper integration notes.

Advanced DDC/CI and VCP commands

VCP commands are for monitor-specific DDC/CI features such as input source, monitor volume, raw hardware contrast, color presets, power mode, or usage time. Prefer normal Display Dimmer brightness and contrast commands unless you intentionally need a raw monitor value.

Use VCP writes carefully. VCP support and accepted values vary by monitor. High-impact writes require --force and a target that resolves to exactly one display.
DisplayDimmer.Cli.exe --list-vcp --target dd_your_stable_id --pretty
DisplayDimmer.Cli.exe --get-vcp input-source --target dd_your_stable_id --pretty
DisplayDimmer.Cli.exe --set-vcp input-source hdmi1 --target dd_your_stable_id --force

Local-only by design

The CLI sends requests to the already-running Display Dimmer app. There is no network listener. The local automation pipe is created for the current Windows user, and Local automation must be enabled from Display Dimmer before scripts can control the app.

CLI API FAQ

Is this the full CLI reference?

No. This page is the product-friendly tutorial. Use GitHub for the complete command reference, JSON fields, exit codes, VCP tables, and runnable examples.

Can it control external monitors?

Yes, when Display Dimmer detects the display. Normal brightness commands use Display Dimmer's DDC/CI-or-gamma route instead of bypassing the app state.

Can I control every display at once?

Yes. Use --target all for every connected display, or repeat --target for a specific set of displays. Use stable dd_... targets for saved scripts.

Can I use it with Task Scheduler, Stream Deck, or AutoHotkey?

Yes. Any local tool that can run a command can call DisplayDimmer.Cli.exe, including PowerShell scripts, Windows Task Scheduler, Stream Deck actions, AutoHotkey shortcuts, and small helper apps.

Does the CLI replace schedules and app rules?

No. The CLI is designed to cooperate with Display Dimmer automation. Use --source cli for deliberate manual overrides, or a named source with --update-external-brightness when an external controller should stand by.

Control brightness from your own tools

Run the commands above to verify your setup, then open GitHub for the full CLI API reference, exit codes, JSON schemas, and runnable examples.

View GitHub