Skip to main content

kovarctl

Command line tool for the lighting of KOVAR keyboards (ROYUAN YC500 firmware, USB ID 3151:4010) on Linux.

Supported models, identified by the firmware model ID:

ID Model Tested
738 KOVAR yes
723 KOVAR Wireless (USB cable) yes
737 KOVAR TKL no
736 KOVAR 60 no

The 2.4 GHz dongle (3151:4011) is not supported, because it uses a different protocol. Connect the keyboard with a USB cable instead.

Installation

pipx install kovarctl

pip install --user kovarctl and uv tool install kovarctl work as well.

The only dependency is click. Your user needs access to the keyboard's /dev/hidraw* nodes. Desktop sessions usually grant it, and the OpenRGB udev rules do too.

Usage

kovarctl list                                    # connected keyboards
kovarctl info                                    # model, firmware, current lighting
kovarctl effects                                 # effects and their options
kovarctl mode wave --direction left --color 00ffff
kovarctl mode breathing --speed 3                # options not given stay as they are
kovarctl mode static --rainbow
kovarctl off
kovarctl side breathing --color red              # side light
kovarctl live ff8000                             # one color for all keys, no flash write
kovarctl live --fade 30                          # rainbow fade for 30 s
some-program | kovarctl live --stdin             # one color per line
kovarctl keys                                    # key names
kovarctl custom set escape=red w=green --activate
kovarctl custom set all=000040
kovarctl custom save picture.json
kovarctl custom load picture.json --activate
kovarctl recover                                 # if the keyboard stopped answering

Use --dry-run to see what would be written, -v to report flash writes, and --device or --id to choose a keyboard when several are connected.

Shell completion

kovarctl can complete commands, effect names and option values such as --direction. This needs the installed kovarctl command; it does not work with python3 -m kovarctl.

Bash (version 4.4 or newer), add to ~/.bashrc:

eval "$(_KOVARCTL_COMPLETE=bash_source kovarctl)"

Zsh, add to ~/.zshrc after compinit has run (frameworks like Oh My Zsh run it for you):

eval "$(_KOVARCTL_COMPLETE=zsh_source kovarctl)"

Fish, add to ~/.config/fish/config.fish:

_KOVARCTL_COMPLETE=fish_source kovarctl | source

Open a new shell afterwards. The completion is generated each time a shell starts (about 30 ms), so it always matches the installed version.

Keyboard flash

The keyboard stores effect settings, the side light and the custom picture in its flash memory. Each write keeps the firmware busy for up to 1.4 seconds. During that time the keyboard ignores requests and can even lock up its lighting interface. kovarctl protects the keyboard in four ways:

  • It reads the current state first and skips writes that change nothing.
  • It waits until the keyboard is idle before sending anything, including across separate kovarctl calls.
  • It refuses more than 12 flash writes per minute unless you pass --force.
  • It refuses to run while another program, such as OpenRGB, has the keyboard open.

For colors that change often, use live. Only switching into live mode is a flash write; after that, colors can change as often as you like.

The blue LED between Esc and F1 cannot be controlled.

Development

Install from a checkout of the repository and run the tests:

pip install -e . pytest
python3 -m pytest

License

MIT, see LICENSE.

Releasing

  1. Set the new version in pyproject.toml, commit and tag it:

    git commit -am 'Release 0.2.0'
    git tag v0.2.0
    
  2. Build the packages and check them, in a virtual environment:

    rm -rf dist/
    python3 -m build
    twine check --strict dist/*
    
  3. Upload to PyPI and push the tag:

    twine upload dist/*
    git push origin main v0.2.0
    

Metadata

Release files for kovarctl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kovarctl 0.1.0
File Size Uploaded Provenance
kovarctl-0.1.0.tar.gz 20.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kovarctl 0.1.0
File Interpreter ABI Platform
kovarctl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / kovarctl-0.1.0.tar.gz

Download URL kovarctl-0.1.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28c092a5e78470d6902898097e11265584af317638c6e95b7e12f3910d200c02
BLAKE2b-256 checksum
How to use checksums
8bee94e0e7429c0d6711eb20334c504da0ec5f74b079d887af9c80818ad240ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / kovarctl-0.1.0-py3-none-any.whl

Download URL kovarctl-0.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27e3af0bfe57b23084dc6ccbe8db68aff3cc057427b634e6a772b25e41a334f0
BLAKE2b-256 checksum
How to use checksums
461cf475082dd94df55e9512f4ef06ed4b0fd3908f5e6904f0160939d69912c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for kovarctl 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page