CLI tool for accessing Oura Ring data.
Appreciate the fine elegance of the terminal braille charts
# Clone the repository
git clone <repository-url>
cd ouracli
# Install dependencies
task py:installSet up your Oura API personal access token:
cp secrets/oura.env.example secrets/oura.env
# Edit secrets/oura.env and add your token# Get daily activity data
ouracli activity "7 days" --json
# Get sleep data for yesterday
ouracli sleep yesterday
# Get all data for today
ouracli all today --json
# Available output formats: tree (default), json, dataframe, markdown, html
ouracli sleep today --markdownFor AI agents and LLMs, use the --ai-help flag to get comprehensive usage instructions in structured formats:
# Get usage guide in markdown format (default)
ouracli --ai-help
# Get usage guide in JSON format for programmatic parsing
ouracli --ai-help --ai-help-format jsonThis follows the dashdash-spec v0.2.0 convention for providing machine-readable CLI documentation.
activity- Daily activity datasleep- Daily sleep datareadiness- Daily readiness scoresheartrate- Heart rate time seriesworkout- Workout summariessession- Session dataspo2- Daily SpO2 datastress- Daily stress datapersonal-info- Personal informationrest-mode- Rest mode periodsall- All available data
Flexible date range options:
today- Current dayyesterday- Previous day1 dayor1 days- Today2 days- Today and yesterdayn days- Last n daysn weeks- Last n weeksn months- Last n monthsYYYY-MM-DD+ period - Start date plus period (e.g.,2024-01-01 7 days)
# Format code
task py:fmt
# Lint code
task py:lint
# Type check
task py:type
# Run tests
task test
# Run tests with coverage
task test:coverage
# Pre-commit checks
task checkMIT
