ouraclaw

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ouraclaw

Ouraclaw

Fetch Oura Ring sleep data via the
ouraclaw
CLI. Outputs JSON to stdout.
通过
ouraclaw
CLI获取Oura Ring睡眠数据,将JSON输出至标准输出(stdout)。

Ensure ouraclaw is installed

确保ouraclaw已安装

bash
which ouraclaw
If not found:
bash
git clone https://github.com/montagao/ouraclaw.git ~/projects/ouraclaw
cd ~/projects/ouraclaw && bun install && bun link
If auth is needed (no tokens in
.env
), run
cd ~/projects/ouraclaw && ouraclaw auth
.
bash
which ouraclaw
如果未找到:
bash
git clone https://github.com/montagao/ouraclaw.git ~/projects/ouraclaw
cd ~/projects/ouraclaw && bun install && bun link
如果需要认证(
.env
文件中无令牌),运行
cd ~/projects/ouraclaw && ouraclaw auth

Commands

命令示例

bash
undefined
bash
undefined

Last night's sleep score

昨晚的睡眠得分

ouraclaw score
ouraclaw score

Date range

日期范围查询

ouraclaw score --start 2025-02-01 --end 2025-02-15
ouraclaw score --start 2025-02-01 --end 2025-02-15

Detailed sleep sessions (stages, HR, HRV, bedtimes)

详细睡眠会话(睡眠阶段、心率、HRV、就寝时间)

ouraclaw sleep
ouraclaw sleep

Date range

日期范围查询

ouraclaw sleep --start 2025-02-01 --end 2025-02-15
undefined
ouraclaw sleep --start 2025-02-01 --end 2025-02-15
undefined

Extracting fields with jq

使用jq提取字段

bash
ouraclaw score | jq '.data[0].score'
ouraclaw sleep | jq '.data[0] | {bedtime_start, bedtime_end}'
ouraclaw score --start 2025-02-01 --end 2025-02-15 | jq '[.data[] | {day, score}]'
bash
ouraclaw score | jq '.data[0].score'
ouraclaw sleep | jq '.data[0] | {bedtime_start, bedtime_end}'
ouraclaw score --start 2025-02-01 --end 2025-02-15 | jq '[.data[] | {day, score}]'

Error handling

错误处理

  • "No access token": Run
    cd ~/projects/ouraclaw && ouraclaw auth
    .
  • 401 after auto-refresh fails: Re-run
    ouraclaw auth
    .
  • "No access token"(无访问令牌):运行
    cd ~/projects/ouraclaw && ouraclaw auth
  • 自动刷新失败后出现401错误:重新运行
    ouraclaw auth