CLI
@hangtime/grip-connect-cli is a ready-made command-line tool for Node.js, Bun, or Deno. It provides interactive mode, colored output, and commands for streaming, watching, exporting, and inspecting devices -- all from the terminal. Built on the Runtime package. Best for: quick data checks, device testing, and interactive exploration.
Install
npm
Package on npm.
npx @hangtime/grip-connect-clinpm install -g @hangtime/grip-connect-cliJSR
The package is also published on JSR. Install from JSR with:
deno add jsr:@hangtime/grip-connect-clipnpm i jsr:@hangtime/grip-connect-cliyarn add jsr:@hangtime/grip-connect-clivlt install jsr:@hangtime/grip-connect-clinpx jsr add @hangtime/grip-connect-clibunx jsr add @hangtime/grip-connect-cliCommands
After installing globally (npm i -g @hangtime/grip-connect-cli), the grip-connect binary is available. Running it without a subcommand starts interactive mode.
Interactive mode
grip-connectPick a device, then pick an action. After each action the CLI loops back so you can run multiple actions on the same connection. Choose Disconnect & exit to stop.
list
List all supported devices and their capabilities (stream, battery, tare, download, active).
grip-connect liststream
Stream force data for a fixed duration.
grip-connect stream progressor # default 10 s
grip-connect stream progressor -d 30000 # 30 s
grip-connect stream progressor -w # indefinite (alias for watch)| Flag | Description | Default |
|---|---|---|
-d, --duration | Stream duration in milliseconds | 10000 |
-w, --watch | Stream indefinitely (Ctrl+C) | false |
watch
Stream indefinitely until Ctrl+C. Prints a session summary (peak, mean, samples, elapsed) on exit.
grip-connect watch motherboardinfo
Show all available device properties: battery, firmware, hardware, manufacturer, serial, model, certification, PnP ID, software, system ID, humidity, and temperature. Only properties supported by the device are displayed.
grip-connect info entralpidownload
Export session data to a file.
grip-connect download forceboard -f json| Flag | Description | Default |
|---|---|---|
-f, --format | Export format: csv, json, xml | csv |
-o, --output | Output directory |
tare
Run tare (zero) calibration. A spinner indicates progress while the device collects baseline samples.
grip-connect tare progressor # default 5 s
grip-connect tare progressor -d 10000 # 10 s| Flag | Description | Default |
|---|---|---|
-d, --duration | Tare duration in milliseconds | 5000 |
active
Monitor activity status using the core active() callback. Prints timestamped status changes until Ctrl+C.
grip-connect active progressor
grip-connect active progressor -t 3.0 -d 1500| Flag | Description | Default |
|---|---|---|
-t, --threshold | Force threshold in kg | 2.5 |
-d, --duration | Duration to confirm activity (ms) | 1000 |
Global options
| Flag | Description |
|---|---|
--json | Output newline-delimited JSON (machine-readable) |
--no-color | Disable colored terminal output |
-V, --version | Print version number |
-h, --help | Display help |
JSON mode
Pass --json to any command for machine-readable output. For stream and watch this produces newline-delimited JSON (one measurement per line). For list and info it outputs a single JSON object.
grip-connect stream progressor --json | jq '.current'
grip-connect list --jsonSupported platforms
The CLI uses webbluetooth for Node.js BLE. Prebuilt binaries support:
| OS | x86 | x64 | arm64 |
|---|---|---|---|
| Windows | ✓ | ✓ | — |
| macOS | — | ✓ | ✓ |
| Linux (glibc) | — | ✓ | ✓ |
WH-C06 is not supported in the CLI or Runtime: the device requires watchAdvertisements(), which is unsupported in the webbluetooth adapter.
Programmatic usage
Looking for a programmatic library to import device classes in your own scripts? See the Runtime package (@hangtime/grip-connect-runtime), which provides the same API as the web library for Node.js, Bun, and Deno.
Next steps
- Runtime - Programmatic library for Node.js, Bun, and Deno scripts.
- Get started - Install and minimal example.
- Examples: Runtime - Runnable Node.js script using the Runtime package.