https://github.com/andornaut/keylight
A CLI to control an Elgato Key Light
https://github.com/andornaut/keylight
cli elgato-key-light
Last synced: 8 months ago
JSON representation
A CLI to control an Elgato Key Light
- Host: GitHub
- URL: https://github.com/andornaut/keylight
- Owner: andornaut
- License: mit
- Created: 2021-02-05T01:48:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-07T16:52:32.000Z (about 2 years ago)
- Last Synced: 2024-04-14T21:13:16.073Z (about 2 years ago)
- Topics: cli, elgato-key-light
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Keylight
A CLI to control an [Elgato Key Light](https://www.elgato.com/en/gaming/key-light) for Linux, macOS, and Windows.
Leverages the [pyleglight](https://gitlab.com/obviate.io/pyleglight) library.
## Requirements
* Python >= 3.6
## Installation
Keylight can be downloaded from [pypi.org](https://pypi.org/project/keylight/).
```bash
pip3 install keylight
```
## Usage
```
$ keylight --help
usage: keylight [-h] [-b BRIGHTNESS] [-c COLOR] [--host HOST] [--on | --off | --toggle]
A CLI to control an Elgato Key Light
options:
-h, --help show this help message and exit
-b BRIGHTNESS, --brightness BRIGHTNESS
0 <= BRIGHTNESS <= 100; Prefix with +/- to increment/decrement
-c COLOR, --color COLOR
2900 <= COLOR <= 7000; Prefix with +/- to increment/decrement
--host HOST hostname of the Key Light (omit to use auto-discovery)
--on turn the Key Light on
--off turn the Key Light off
--toggle toggle the Key Light on/off
```
### Examples
```
$ keylight --brightness 45 --color 5500 --on
Auto-discovering Key Light ...
Connected to: Elgato Light @ 192.168.1.100:9123
Brightness: 45%
Color: 5500k
Turning On
$ keylight --host=keylight --off
Connected to: Elgato Light @ keylight:9123
Turning Off
```
#### Aliases
You may find it convenient to use shell aliases:
```
alias koff='keylight --host keylight --off'
alias kon='keylight --host keylight --on'
```
Example usage:
```
# Turn on and set brightness to 20%
$ kon -b20
Connected to: Elgato Light BW42J1A06055 @ keylight:9123
Brightness: 20%
Turning On
```
## Developing
```bash
poetry shell
poetry build
poetry run keylight --on
poetry version patch
poetry publish
```