logiclink-desk
v0.1.1
Published
CLI tooling for LOGIClink Bluetooth standing desks.
Maintainers
Readme
logiclink-desk
CLI tooling for controlling LOGIClink Bluetooth standing desks.
This project is a Rust command-line application with an optional npm wrapper. It can read the current desk height, send movement commands, move to a target height, and inspect or build the underlying protocol packets used by the desk.
Safety warning
Use this software at your own risk.
This tool sends Bluetooth commands that can make a motorised desk move up or down. Before running any movement command, make sure the area above, below, and around the desk is clear. Keep people, pets, cables, monitors, shelves, chairs, and other objects away from moving parts.
The software cannot guarantee that the desk will stop before hitting an obstruction, reaching a limit, or moving farther than expected. Stay near the desk while it is moving and be ready to stop it using the desk's physical controls or by cutting power if needed.
Do not use this tool unattended, remotely, or in any situation where unexpected desk movement could cause injury or damage.
Requirements
- A LOGIClink Bluetooth standing desk.
- Bluetooth enabled on the machine running the CLI.
- Rust toolchain for local development and building from source.
- Node.js 18 or newer if using the npm wrapper or packaging scripts.
Bluetooth permissions vary by operating system. You may need to allow terminal, shell, or Node/Rust processes to access Bluetooth.
Install dependencies
cargo fetch
npm installnpm install is only required for the npm packaging flow. The Rust CLI itself builds with Cargo.
Run from source
Read the current desk height:
cargo run -- heightMove to a target height in centimetres:
cargo run -- set-height 100Raise or lower by a relative amount in centimetres:
cargo run -- raise 5
cargo run -- lower 2.5If more than one compatible device is visible, pass a device name:
cargo run -- height --device-name "Your Desk Name"Print all commands:
cargo run -- --helpPrint help for a specific command:
cargo run -- set-height --helpBuild
Build a debug binary:
cargo buildBuild an optimised release binary:
cargo build --releaseThe release binary is written to:
target/release/logiclink-deskRun it directly:
./target/release/logiclink-desk heightNPM usage
The npm package is intended to ship prebuilt Rust binaries, so users do not need a Rust toolchain installed.
npx logiclink-desk height
npx logiclink-desk set-height 100The npm CLI entrypoint looks for binaries in prebuilt/<platform>-<arch>/logiclink-desk, for example:
prebuilt/darwin-arm64/logiclink-deskPackaging
Build and stage the current platform binary before packing or publishing:
npm run prepare:binary
npm packThe GitHub Actions workflow publishes to npm whenever changes are pushed to main.
Add an npm automation token as the repository secret NPM_TOKEN before relying on the workflow.
Available npm scripts:
npm run build:release
npm run package:binary
npm run prepare:binaryUseful commands
Read-only commands:
logiclink-desk height
logiclink-desk query get-height
logiclink-desk decode <hex>
logiclink-desk build <command>Movement commands:
logiclink-desk set-height 100
logiclink-desk adjust-height -2.5
logiclink-desk raise 5
logiclink-desk lower 5
logiclink-desk pulse up 5
logiclink-desk burst down 20Profiling and diagnostics:
logiclink-desk watch-motion up 20
logiclink-desk profile-motion down 10
logiclink-desk bench-height-pollDevelopment
Run the test suite:
cargo testCheck formatting:
cargo fmt --checkRun Clippy:
cargo clippy --all-targets --all-features