Get or set screen brightness in OS X
$ npm install --save osx-brightness
const osxBrightness = require('osx-brightness');
osxBrightness.set(0.75).then(() => {
console.log('Changed brightness to 75%');
});
osxBrightness.get().then(brightness => {
console.log(brightness);
//=> 0.4375
});
See the brightness CLI.
MIT © Andreas Gillström