@mirage-cli/oura-cli
v0.1.9
Published
Oura Ring API v2 CLI. Sleep, activity, readiness, HRV, SpO2, workouts. Mirage / Cloudflare-Worker compatible.
Maintainers
Readme
oura-cli
A simple CLI for the Oura Ring API v2. Built with Bun, compiles to a standalone binary. Designed for AI agents — every command has descriptive output in plain text.
Quick Start
bun installAuthentication
oura setupThe interactive setup lets you choose between:
- Personal Access Token — paste your token from cloud.ouraring.com/personal-access-tokens
- OAuth2 — register an app at cloud.ouraring.com/oauth/applications, enter your client ID + secret, then authorize in the browser
Config is saved to ~/.config/oura-cli/config.json. No env vars needed after setup.
Run
bun run src/index.ts helpBuild Binary
bun run build
./oura helpExamples
# Interactive auth setup
oura setup
# Last 7 days of sleep scores
oura daily-sleep
# Specific date range
oura daily-activity --start-date 2025-01-01 --end-date 2025-01-07
# Heart rate (uses datetime)
oura heart-rate --start-datetime 2025-01-15T08:00:00 --end-datetime 2025-01-15T22:00:00
# Personal info
oura personal-info
# Log out (delete stored tokens)
oura logoutEnvironment
Config is stored at ~/.config/oura-cli/ after running oura setup. Env vars are optional overrides:
| Variable | Description |
|---|---|
| OURA_ACCESS_TOKEN | Overrides config token if set |
| OURA_CLIENT_ID | Overrides config OAuth2 client ID |
| OURA_CLIENT_SECRET | Overrides config OAuth2 client secret |
