You Might Be Using Several Health Devices, But Managing Them Is a Headache?
In fact, many of my friends own multiple wearable devices: a Garmin sports watch on their wrist, a Withings sleep tracker on the nightstand, and occasionally a Peloton stationary bike. Each device has its own app, and data is scattered everywhere. Want to check your overall health status in one place? Not possible. That's when you need a tool that integrates all your devices—the Betterness CLI with its connected-devices skill is designed for exactly this.
To be honest, the first time I saw this skill, my immediate reaction was: "Finally, no more switching between different apps!" Today, let's talk about how to use it to manage health device connections. Don't worry—the operations are very simple, just as natural as chatting with a friend.
First, Meet the Prerequisites—Don't Rush Commands
The skill page clearly states that before using it, you must first read ../betterness-shared/SKILL.md. This shared skill handles authentication and global flags. If you run commands directly, you'll likely get errors. I made this mistake before; I thought it would work straight away, but then got hit with a "Permission denied" message. So, follow these steps:
- Make sure you have already installed betterness-cli and configured global authentication (e.g., API key or token).
- Familiarize yourself with global flags, such as
--jsonfor JSON output. - If you haven't installed this skill yet, run:
npx skills add https://github.com/Betterness/betterness-cli --skill betterness-connected-devices
Once that's done, you can start happily typing commands.
First Thing: See What Devices You Currently Have Connected
Run betterness connected-devices list --json, and the terminal will output JSON like this:
[
{
"provider": "GARMIN",
"type": "native",
"syncEnabled": true,
"deviceId": "123456789"
},
{
"provider": "WITHINGS",
"type": "cloud",
"syncEnabled": false,
"deviceId": "abc-def-ghi"
}
]
You can see each device's provider, type (native/cloud), whether sync is enabled, and the device ID. If you have multiple devices but one of them has sync disabled, you can identify the issue here.
Second Thing: Discover Devices That Are Supported but Not Yet Connected
Sometimes you may not know which other brands you can connect besides Garmin. Use betterness connected-devices available --json to list all supported providers that are currently not connected. It will return something like:
[
{"key": "OURA", "name": "Oura Ring", "description": "Sleep and activity tracking ring"},
{"key": "PELOTON", "name": "Peloton", "description": "Fitness bike and treadmill"},
...
]
You can decide whether to connect based on the name and description. For instance, I've always wanted to try the Oura Ring, and after seeing this option, I took action immediately.
Third Thing: Connect a New Device
There are two types of connections: regular devices and Apple HealthKit.
Connecting Regular Devices: Use the link subcommand. For example, if I want to connect my Garmin, I run:
betterness connected-devices link --integration-key GARMIN --json
It will return a URL. You need to open that URL in your browser and authorize Betterness to access your Garmin data. After authorization, the device is automatically connected.
Connecting Apple HealthKit: If you use an iPhone, you first need to generate a connection code through the Junction app. The command is:
betterness connected-devices apple-health-code --json
It returns a connectionCode. You enter this code in the Junction app, and then HealthKit data will be synced to Betterness.
Fourth Thing: Disconnect a Device (Safety First!)
Disconnecting is a sensitive operation; if you accidentally disconnect the wrong one, data collection will be interrupted. So the skill features a "preview mode"—first run with --dry-run to see the effect, then confirm before execution.
# Preview
betterness connected-devices disconnect --integration-key GARMIN --dry-run --json
# Actual disconnect
betterness connected-devices disconnect --integration-key GARMIN --json
By using the preview, you can verify that you're disconnecting the intended device without causing any unintended data loss.