A Rust-based system for prescribing and tracking short, high-intensity cardiovascular "microdose" workouts throughout the day.
Krep intelligently prescribes 30-second to 5-minute cardio sessions based on:
- Your recent workout history
- External strength training signals
- Automatic progression tracking
- Time-of-day and recovery considerations
-
Smart Prescription Engine (v1.1 spec)
- VO2 EMOM workouts (burpees, KB swings)
- GTG (Grease the Groove) pull-ups with band assistance
- Mobility drills (hip CARs, shoulder CARs)
- Strength-signal integration (24h lower-body override)
- Time-based VO2 prioritization (>4h since last session)
-
Automatic Progression
- Burpees: Reps → Style transitions (4-count → 6-count → seal)
- KB Swings: Linear rep progression
- Pull-ups: Rep-based GTG progression
-
Robust Persistence
- Write-Ahead Log (WAL) with fs2 file locking
- Atomic CSV rollup for analytics
- Deduplication across WAL and CSV
- 7-day session history window
-
Configuration
- TOML-based config (
~/.config/krep/config.toml) - XDG Base Directory compliance
- Configurable progression parameters
- User-extendable mobility drills
- TOML-based config (
-
Command-Line Interface
krep- Prescribe and log sessionskrep now --category vo2- Force categorykrep now --dry-run- Preview without loggingkrep rollup- Archive WAL to CSV
- GNOME system tray integration (Milestone 5)
- Integration tests (Milestone 4.5)
- CI/CD pipeline (Milestone 6)
- Rust 1.70+ (
rustup install stable) - For tray app (optional): GTK4, libadwaita
# Clone repository
git clone <repo-url>
cd krep
# Build all binaries
cargo build --release
# Or build just the CLI (no GTK dependencies)
cargo build --release -p cardio_cliBinaries will be in target/release/:
cardio_cli- Command-line interfacecardio_tray- GNOME tray app (requires GTK)
# Get your next microdose prescription
krep
# Or explicitly
krep nowExample output:
╭─────────────────────────────────────────╮
│ Vo2 MICRODOSE
╰─────────────────────────────────────────╯
5-Min EMOM: Burpees
Duration: ~300 seconds (5 min)
→ 3 reps
→ Style: FourCount
─────────────────────────────────────────
Press Enter when done
's' + Enter to skip
'h' + Enter to mark 'harder next time'
>
# Mobility work
krep now --category mobility
# VO2 session
krep now --category vo2
# GTG pull-ups
krep now --category gtgkrep now --dry-run# Roll up WAL to CSV
krep rollup
# Also clean up processed WAL files
krep rollup --cleanupKrep can read strength training data from $DATA_DIR/strength/signal.json:
{
"last_session_at": "2025-11-17T10:30:00Z",
"session_type": "lower"
}If a lower-body session was within 24h, Krep will prefer GTG or mobility over VO2.
Optional config file: ~/.config/krep/config.toml
[data]
data_dir = "~/.local/share/krep"
[equipment]
available = ["kettlebell", "pullup_bar", "bands"]
[progression]
burpee_rep_ceiling = 10
kb_swing_max_reps = 15
[mobility]
custom = [
{ id = "90_90", name = "90/90 Hip Stretch", url = "https://..." },
]- State:
$DATA_DIR/wal/state.json- Progression levels - WAL:
$DATA_DIR/wal/microdose_sessions.wal- Append-only session log - CSV:
$DATA_DIR/sessions.csv- Archived sessions for analysis - Strength:
$DATA_DIR/strength/signal.json- External strength training data
Default DATA_DIR: ~/.local/share/krep
-
cardio_core: Core business logic (library)
- Domain types and catalog
- Prescription engine
- Progression algorithms
- Persistence layer (WAL, CSV, state)
- Configuration management
-
cardio_cli: Command-line interface (binary)
- Argument parsing with clap
- Session logging workflow
- CSV rollup commands
-
cardio_tray: GNOME tray app (binary, WIP)
- GTK4/libadwaita UI
- Ayatana AppIndicator integration
- Popup prescription dialogs
- Type Safety: Enum-based metrics, comprehensive validation
- Atomic Operations: fs2 locking, atomic file operations
- Zero Data Loss: WAL-first, staged rollup with .processed archiving
- Testability: 42 unit tests, deterministic prescription logic
- No Unsafe Code:
#![forbid(unsafe_code)]in core library
# Run all tests
cargo test -p cardio_core
# With output
cargo test -p cardio_core -- --nocaptureCurrent test coverage:
- ✅ 42 tests passing
- ✅ Catalog validation
- ✅ Progression algorithms (burpee, KB, pullup)
- ✅ Prescription engine rules
- ✅ WAL persistence & locking
- ✅ CSV rollup & deduplication
- ✅ State management
- ✅ History loading
Krep supports adding new exercises, stretches, and mobility drills. For comprehensive instructions, see:
This guide covers:
- Adding simple movements (mobility drills, stretches)
- Creating movements with automatic progression
- Working with metrics and movement styles
- Multi-block workouts (circuits, complexes)
- Custom progression algorithms
- Testing and validation
Quick Example - Add a mobility drill:
// In cardio_core/src/catalog.rs
movements.insert(
"ankle_cars".into(),
Movement {
id: "ankle_cars".into(),
name: "Ankle CARs".into(),
kind: MovementKind::MobilityDrill,
default_style: MovementStyle::None,
tags: vec!["mobility".into(), "ankle".into()],
reference_url: Some("https://...".into()),
},
);# Debug logs
RUST_LOG=debug krep now
# Info logs (default)
RUST_LOG=info krep now- GNOME tray application
- Integration tests
- GitHub Actions CI
- Installation script
- Time-based prescriptions (cron integration)
- HR zone tracking
- Multi-user support
- Web dashboard for analytics
MIT OR Apache-2.0
Built with: