Latest build: Loading…

Your CGM data,
in your terminal

A small, GUI-free companion to Trndi — one-shot readings for scripts, or a full text-mode graph.

$ trndi-cli
12.9 mmol/L → (±0.0)  21:55
$ trndi-cli --spark
▃▃▄▅▅▅▅▄▄▃▃▂▂▂▁▁▁▂▃▃▃▄▅▇██████▇▇▆▆▅  7.1 mmol/L ↘ (-0.4)  20:15
🌙 Nightscout 📡 Dexcom Share 💙 Tandem Source 🩸 Medtronic CareLink 🩹 FreeStyle Libre 📶 xDrip+

Linux • Raspberry Pi • Windows • FreeBSD • Haiku
macOS builds from source

Build Status
Zero Config with Trndi installed
1 Single binary
6 CGM Sources
Free & Open Source

Screenshots

See it in action

The --graph mode: eight hours of readings as coloured bars, with a shaded forecast past the divider on the right

Graph mode with forecast

The --stats output: average, standard deviation, GMI, extremes and a five-band time-in-range breakdown

Statistics

Features

One binary, many modes

One-shot Reading

Run it bare and get the current value, trend arrow, delta and time on one line. Perfect for a prompt, MOTD or status bar.

Scriptable Alarms

--check reports the range in the exit code — high, low, stale or unreachable — so a cron job can alarm without parsing output.

📊

TUI Graph

--graph draws the last hours as a colour-coded bar graph in a Free Vision text UI. Arrow keys inspect readings, F5 refreshes.

🔮

Forecast

Trndi's own prediction model adds a shaded half-hour forecast, shown only when the fit is trustworthy and labelled with its confidence.

📈

Sparkline

--spark compresses the last hours into a single coloured line of block glyphs. Piped output comes out plain for status-bar modules.

🧮

Statistics

--stats summarises any window up to a week: average, spread, GMI, extremes and a five-band time-in-range breakdown.

🏥

Ambulatory Glucose Profile

--agp folds two weeks onto a 24-hour axis with median and percentile bands — the view diabetes clinics work from.

📄

CSV Export

--csv writes readings with time, value, delta, trend and range band, ready for a spreadsheet or your own analysis.

🔋

Device Status

--device lists sensor life, reservoir, pump and transmitter batteries and the basal rate, where the backend reports them.

👥

Multi-User

Trndi's accounts carry over: --profile picks which person a run follows, so two terminals can watch two people.

🔗

Shares Trndi's Settings

Built on the same API and platform layer as the desktop app. If Trndi is set up, trndi-cli needs no configuration at all.

💝

Free & Open Source

GPLv3, like Trndi. No subscription, no ads, no data collection. Tab completion for bash, zsh and fish included.

Get started

Download trndi-cli

A single binary per platform — no installer needed.

🐧

Linux x64

Most distributions (amd64)

Download for Linux
🥧

Raspberry Pi

ARM64 / aarch64 Linux

Download for Pi
🪟

Windows

Windows 10 & 11 (x64)

Download .exe

Needs libcurl.dll, see below

More platforms:

Windows on ARM

Native ARM64 .exe

Windows Notes

The Windows builds load libcurl.dll at start. Download the matching package from curl.se/windows, rename its libcurl-x64.dll (or libcurl-arm64.dll from the win64a-mingw package for ARM64) to libcurl.dll, and place it next to the exe or in PATH.

Linux, BSD & Haiku Notes

Mark the file executable (chmod +x trndi-cli-linux-amd64) and run it. Building from source with make and sudo make install also installs tab completion for bash, zsh and fish. macOS has no prebuilt binary yet but builds the same way. Build instructions →

All versions: View all releases on GitHub

Setup

Quick Setup

🖥️ Already running Trndi?

Then you are done. trndi-cli reads the same settings file the desktop app saves — backend, credentials, unit and thresholds — including every account in multi-user mode.

🧭 Headless machine?

Run trndi-cli --setup. A text-mode settings window asks for the backend, address and secret, with a Test button that connects before saving. See the manual for every key.

Usage

trndi-cli               print the current reading and exit
trndi-cli --check       ... with the range in the exit code, for scripts
trndi-cli --graph       interactive TUI graph (F5 refresh, F6 forecast, F7 AGP, F9 settings, Q exits)
trndi-cli --predict     ... with the forecast drawn from the start
trndi-cli --stats 6     summarise the last 6 hours (1 to 168)
trndi-cli --spark 8     the last 8 hours as a one-line sparkline (1 to 24)
trndi-cli --agp 7       time-of-day percentile profile of the last 7 days (3 to 28)
trndi-cli --csv 72      the last 72 hours of readings as CSV, oldest first
trndi-cli --device      sensor life, reservoir, batteries and basal, where reported
trndi-cli --unit mgdl   any mode above in mg/dL (or mmol) for this run only
trndi-cli -p Anna ...   any mode above against that account's settings
trndi-cli --setup       settings window: backend, address, secret, unit, limits

💡 Exit codes: 0 OK • 1 not configured • 2 unknown backend • 3 connection failed • 4 no recent reading • with --check: 5 above high, 6 below low.

trndi-cli --check >/dev/null; [ $? -eq 6 ] && notify-send -u critical "Low glucose"

Join the community

Ask questions, share your setup, report bugs, or just hang out with other Trndi users and contributors.