Skip to content

richhaase/c2

Repository files navigation

c2 — Concept2 Logbook CLI

A CLI tool for syncing and analyzing rowing data from your Concept2 Logbook. Built with Bun.

Install

Requires Bun v1.0+.

# Install globally
bun install -g @richhaase/c2

# Or install from source
git clone https://github.com/richhaase/c2.git
cd c2
bun install
bun link

Quick Start

# Configure token and goals
bun src/index.ts setup

# Sync workouts
bun src/index.ts sync

# Check your progress
bun src/index.ts status

Usage

Setup

Configure your token and goal settings:

c2 setup

Get your personal access token from log.concept2.com under Settings → Developer. The setup wizard will prompt for your token, goal target, and date range.

Sync Workouts

Pull new workouts from the Concept2 API:

c2 sync

View Workouts

# Show last 10 workouts
c2 log

# Show last 25 workouts
c2 log -n 25

Goal Progress

Track progress toward your distance goal:

c2 status

Training Trends

View weekly trends for pace, volume, stroke rate, and heart rate:

# Last 8 weeks (default)
c2 trend

# Last 12 weeks
c2 trend -w 12

HTML Report

Generate a self-contained HTML progress report:

# Generate report.html in current directory
c2 report

# Custom output path
c2 report -o ~/Desktop/rowing.html

# Generate and open in browser
c2 report --open

# Show more weeks of history
c2 report -w 16

Export Data

Export workouts to CSV, JSON, or JSONL:

# CSV to stdout
c2 export

# JSON format
c2 export -f json

# Filter by date range
c2 export --from 2026-01-01 --to 2026-03-01

# Pipe to file
c2 export -f jsonl > workouts.jsonl

Configuration

Config lives at ~/.config/c2/config.json. Created automatically on c2 setup.

{
  "api": {
    "base_url": "https://log.concept2.com",
    "token": "YOUR_TOKEN"
  },
  "sync": {
    "machine_type": "rower"
  },
  "goal": {
    "target_meters": 1000000,
    "start_date": "2026-01-01",
    "end_date": "2026-12-31"
  },
  "display": {
    "date_format": "%m/%d"
  }
}

Development

# Install dependencies
bun install

# Type check
bun run check

# Run tests
bun test

# Run directly
bun src/index.ts <command>

License

MIT — see LICENSE

About

CLI tool for Concept2 Logbook data sync and analysis

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors