Skip to main content

A CLI to control an Elgato Key Light

Project description

keylight

A modern CLI to control Elgato Key Lights across Linux, macOS, and Windows.

Built with Typer and powered by the pyleglight library.

Requirements

  • Python ~3.12

Installation

Install keylight via pip or pipx (recommended for CLIs):

pipx install keylight

Usage

Usage: keylight [OPTIONS]

Options:
  -b, --brightness TEXT       0 <= BRIGHTNESS <= 100; Prefix with +/- to increment/decrement
  -c, --color TEXT            2900 <= COLOR <= 7000; Prefix with +/- to increment/decrement
  --host TEXT                 hostname of the Key Light (omit to use auto-discovery)
  -p, --power [on|off|toggle] turn the Key Light on, off, or toggle it
  --help                      Show this message and exit.

Examples

Auto-discovery and basic control:

$ keylight --brightness 45 --color 5500 --power on
Connected to "Elgato Key Light" at 192.168.1.100:9123
Brightness: 45%
Color temperature: 5500k
On/Off: On

Direct host connection and relative adjustments:

$ keylight --host 192.168.1.105 --brightness +10
Connected to "Elgato Key Light Air" at 192.168.1.105:9123
Brightness: 55%
Color temperature: 5500k
On/Off: On

Toggling power:

$ keylight --power toggle
Connected to "Elgato Key Light" at 192.168.1.100:9123
Brightness: 55%
Color temperature: 5500k
On/Off: Off

Shell Aliases

For quicker access, you can define shell aliases in your .bashrc or .zshrc:

alias kon='keylight --power on'
alias koff='keylight --power off'
alias ktoggle='keylight --power toggle'

Development

keylight uses Poetry for dependency management and packaging.

# Enter the virtual environment
poetry shell

# Run the CLI during development
poetry run keylight --help

# Lint and format
poetry run ruff check .

# Build and publish
poetry build
poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keylight-0.2.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keylight-0.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file keylight-0.2.0.tar.gz.

File metadata

  • Download URL: keylight-0.2.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-35-generic

File hashes

Hashes for keylight-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7900d1255b182a98edc6b62784d046280f451fc57c2b67aa1d50129947c65637
MD5 e0072c9fde100e97af7492744119ea45
BLAKE2b-256 dcd1235c42823c42241eb8f35e18dc737561288ad9e8be040ee4271c8325175f

See more details on using hashes here.

File details

Details for the file keylight-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: keylight-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-35-generic

File hashes

Hashes for keylight-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 780d73968b27f94d0820bcf878e0815a21cc315d3f9fef2bc8ee0972857da842
MD5 5b771327f26e6c8dd9e4358b8d83e179
BLAKE2b-256 30758383afde2bed285c1f722b7aed858be8c28fb1cf75e0bd1cf6c5888e1690

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page