Runtime
Use @hangtime/grip-connect-runtime as a programmatic adapter for Node.js, Bun, or Deno. It wraps the core device classes with a Node-compatible BLE stack (webbluetooth) and a filesystem-based download() so you can connect, stream, and export data from scripts and backend services. Best for: data logging, automation, headless testing, and building your own tools on top of the library.
Runtime vs CLI
Runtime is a programmatic library -- import device classes and write your own logic. CLI is a ready-made command-line tool (built on Runtime) with interactive mode, colored output, and commands like stream, watch, info, and tare. Use CLI if you want a tool; use Runtime if you want a library.
Install
npm
Package on npm.
npm install @hangtime/grip-connect-runtimepnpm add @hangtime/grip-connect-runtimeyarn add @hangtime/grip-connect-runtimebun add @hangtime/grip-connect-runtimeJSR
The package is also published on JSR. Install from JSR with:
deno add jsr:@hangtime/grip-connect-runtimenpx jsr add @hangtime/grip-connect-runtimebunx jsr add @hangtime/grip-connect-runtimeUsage
Import device classes from @hangtime/grip-connect-runtime and use the same connect/stream/notify API as on web. The only difference is that BLE is provided by the webbluetooth polyfill and download() writes files to disk instead of triggering a browser download.
import { Progressor } from "@hangtime/grip-connect-runtime"
const device = new Progressor()
// Subscribe to real-time force data
device.notify((data) => {
console.log(`${data.current.toFixed(2)} ${data.unit} Peak: ${data.peak.toFixed(2)}`)
})
// Optional: detect when user is pulling
device.active((isActive) => console.log(isActive ? "Active" : "Inactive"), {
threshold: 2.5,
duration: 1000,
})
// Connect and stream
await device.connect(
async () => {
console.log("Battery:", await device.battery())
console.log("Firmware:", await device.firmware())
device.tare(5000) // optional: zero calibration
await device.stream(30000) // stream for 30 seconds
await device.stop()
device.download("json") // writes data-export-*.json to disk
device.disconnect()
},
(err) => console.error("Connection failed:", err.message),
)Exported classes
The runtime package re-exports all device classes from the core library with Node-compatible overrides:
| Class | Device |
|---|---|
Climbro | Climbro |
Entralpi | Entralpi |
ForceBoard | PitchSix Force Board |
KilterBoard | Kilter Board |
Motherboard | Griptonite Motherboard |
mySmartBoard | mySmartBoard |
PB700BT | NSD PB-700BT |
Progressor | Tindeq Progressor |
SmartBoardPro | SmartBoard Pro |
WHC06 | Weiheng WH-C06 — unsupported (requires watchAdvertisements, not available in webbluetooth) |
All classes share the same device interface and support the same methods as their web counterparts. See Devices for device-specific methods.
Supported platforms
The runtime uses webbluetooth for Node-compatible BLE. Prebuilt binaries support:
| OS | x86 | x64 | arm64 |
|---|---|---|---|
| Windows | ✓ | ✓ | — |
| macOS | — | ✓ | ✓ |
| Linux (glibc) | — | ✓ | ✓ |
Supported runtimes
- Node.js: Requires a machine with Bluetooth. The
webbluetoothpackage provides the BLE layer. - Bun: Same API as Node.js; ensure BLE is available on the host.
- Deno: Use
deno add jsr:@hangtime/grip-connect-runtimeand run with permissions required by the BLE layer.
Example
The monorepo includes a runtime example that uses this package. Run it from the repo root:
npm install
npm run start --workspace ./examples/runtimeEnsure Bluetooth is available and the device is in range.
Next steps
- Get started - Install and minimal example.
- CLI - Ready-made command-line tool built on this package.
- API - Full device interface and data types.
- Examples: Runtime - Runnable Node.js script.