sindresorhus/dark-mode

Control the macOS dark mode from the command-line

686

stars

27

commits

Swift

primary language

Sep 11, 2025

updated

binary
cli
cli-app
dark-mode
homebrew
macos
swift

README

dark-mode

Control the macOS dark mode from the command-line

Requires macOS 10.10 or later. macOS 10.13 or earlier needs to download the Swift runtime support libraries.

Install

Homebrew
$ brew install dark-mode
npm
$ npm install --global dark-mode-cli
Manually

Download the binary and put it in /usr/local/bin.

Usage

$ dark-mode --help

  Usage
    $ dark-mode [command]

  Commands
    <none>  Toggle dark mode
    on      Enable dark mode
    off     Disable dark mode
    status  Dark mode status

Build

Run ./build. The binary can be found at ./bin/dark-mode.

Building in Xcode works, but it does not export a binary.

Contributors

sindresorhus

24 commits

anderscarling

2 commits

LarsJK

1 commits

sindresorhus/dark-mode

Control the macOS dark mode from the command-line

686

stars

27

commits

Swift

primary language

Sep 11, 2025

updated

binary
cli
cli-app
dark-mode
homebrew
macos
swift

README

dark-mode

Control the macOS dark mode from the command-line

Requires macOS 10.10 or later. macOS 10.13 or earlier needs to download the Swift runtime support libraries.

Install

Homebrew
$ brew install dark-mode
npm
$ npm install --global dark-mode-cli
Manually

Download the binary and put it in /usr/local/bin.

Usage

$ dark-mode --help

  Usage
    $ dark-mode [command]

  Commands
    <none>  Toggle dark mode
    on      Enable dark mode
    off     Disable dark mode
    status  Dark mode status

Build

Run ./build. The binary can be found at ./bin/dark-mode.

Building in Xcode works, but it does not export a binary.

Contributors

sindresorhus

24 commits

anderscarling

2 commits

LarsJK

1 commits

Languages

Swift

91.9%

Shell

8.1%