Skip to content

Add biometrics logging command#33

Merged
milldr merged 5 commits into
milldr:mainfrom
NilsLeo:feature/biometrics-logging
May 27, 2026
Merged

Add biometrics logging command#33
milldr merged 5 commits into
milldr:mainfrom
NilsLeo:feature/biometrics-logging

Conversation

@NilsLeo

@NilsLeo NilsLeo commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new biometrics command to the CLI that allows logging weight, body fat percentage, and blood pressure to Cronometer.

Features

  • Weight logging with unit support (kg or lbs)
  • Body fat percentage logging
  • Blood pressure logging (systolic/diastolic)
  • Date support (YYYY-MM-DD, yesterday, -Nd)
  • Integration with existing automation framework

Usage Examples

# Log weight
crono biometrics --weight 90 --unit kg

# Log body fat percentage
crono biometrics --body-fat 19

# Log blood pressure
crono biometrics --systolic 130 --diastolic 76

# Log with date
crono biometrics --weight 90 --date yesterday

Implementation

  • Created src/commands/biometrics.ts - CLI command handler with validation
  • Created src/kernel/biometrics.ts - Playwright automation code generator
  • Updated src/automation/types.ts - Added BiometricEntry interface
  • Updated src/automation/runner.ts - Added logBiometric method
  • Updated src/index.ts - Registered biometrics command with all options

Technical Details

  • Navigates to dashboard (where BIOMETRIC button is located)
  • Uses getByRole selectors for reliable element targeting
  • Implements Tab key press after input to trigger form validation
  • Handles different input patterns for each biometric type (weight, body fat, blood pressure)

Testing

All three biometric types have been tested successfully:

  • ✅ Weight: 90 kg
  • ✅ Body Fat: 19%
  • ✅ Blood Pressure: 130/76 mmHg

🤖 Generated with Claude Code

@milldr milldr left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! but please add all new commands to the README

NilsLeo and others added 4 commits May 23, 2026 16:51
This commit adds a new `biometrics` command to the CLI that allows logging
weight, body fat percentage, and blood pressure to Cronometer.

Features:
- Weight logging with unit support (kg or lbs)
- Body fat percentage logging
- Blood pressure logging (systolic/diastolic)
- Date support (YYYY-MM-DD, yesterday, -Nd)
- Integration with existing automation framework

Implementation:
- Created src/commands/biometrics.ts - CLI command handler
- Created src/kernel/biometrics.ts - Playwright automation code generator
- Updated src/automation/types.ts - Added BiometricEntry interface
- Updated src/automation/runner.ts - Added logBiometric method
- Updated src/index.ts - Registered biometrics command

Technical details:
- Navigates to dashboard (where BIOMETRIC button is located)
- Uses getByRole selectors for reliable element targeting
- Implements Tab key press after input to trigger form validation
- Handles different input patterns for each biometric type

All three biometric types have been tested successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Documents the new biometrics command for logging weight, body fat, and blood pressure,
as well as the recipes command for listing custom recipes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@NilsLeo NilsLeo force-pushed the feature/biometrics-logging branch from 305ddb4 to 373b3fd Compare May 23, 2026 14:51
@NilsLeo

NilsLeo commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

should be good now :)

@milldr milldr merged commit afbcd17 into milldr:main May 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants