Hi everyone,
I would like to be able to create a script that can download the latest firmware, e.g. uhk-firmware-18.0.1.tar.gz and use uhk-agent in a terminal/command line/script (non-interactive isatty) to be able to flash the given firmware file to it. It would be nice to be able to list the available connected devices from the command line as well.
Right now, if I run uhk-agent –help it just spawns an electron container and runs the GUI app.
The CLI args that would be nice to have are:
--help, shows the manual--list-connected-keyboards, shows a list ofkeyboard-ids--flash-to <keyboard-id> --firmware-file <path-to-firmware-file>, shows success (exit code0) or failure and reason (exit codes1..=255).
Any thoughts on how to take what’s under the hood of Agent and compose something like this?
I wanted to ask if anyone here knows what the underlying js or ts files or (other native functions/commands) that already exist (in uhk-agent) that I can re-use to compose something like this.
I could make a separate standalone (cross-platform) binary like uhk-agent-cli (in Rust using with ROC) to prototype this, so as not to pollute uhk-agent AppImage binary.
Thanks, Naz