Local, single-user training-status app (a Strava Premium replacement). It imports FIT files from a
folder and shows fitness, fatigue, form and weekly load. No cloud, no auth. Planning artifacts live
in openspec/.
uv venv .venv && uv pip install -e '.[dev]' # or: python -m venv .venv && .venv/bin/pip install -e '.[dev]'
export MYFITTY_FIT_DIR=~/Dropbox/Apps/WahooFitness # any folder of .fit files (read-only)
uv run myfitty app # same as: .venv/bin/streamlit run myfitty/app.py- Define your FTP, threshold HR and max HR with the dates they apply from, either in
myfitty.toml(see below) or in the Thresholds panel in the sidebar. Without them activities are listed but unscored. - The app scans the FIT folder when you open it and whenever you press Import now. Files already imported (same size and modification time) are skipped; files modified in the last 2 seconds are left for the next scan.
- Pick a sport and date range in the sidebar. CTL and ATL always use your full history, so a shorter range never changes the values.
Import from the command line (for example from cron) with uv run myfitty ingest (or python -m myfitty.ingest); add --retry-failed to re-read files that failed before, for example after a parser fix. The app and the CLI
can both be used, but not at the exact same moment (DuckDB allows one writer; each waits a few
seconds for the other).
Try it with the bundled fixtures: MYFITTY_FIT_DIR=tests/fixtures uv run myfitty app
(their dates are in March 2026, so widen the date range, which defaults to the last 180 days).
Optional myfitty.toml (copy myfitty.example.toml; it is git-ignored) is read at startup by the app and
by myfitty ingest. Point to another file with MYFITTY_CONFIG. It can set the folders and a
threshold history and the zones for relative effort:
fit_dir = "~/Dropbox/Apps/WahooFitness"
[relative_effort]
zone_edges = [114, 146, 153, 163] # optional; upper bound of zones 1-4 in bpm
[[thresholds]]
metric = "ftp" # ftp | threshold_hr | max_hr
from = 2021-01-17
value = 280Configured thresholds are added to the database at startup when that (metric, date) is not already there, and the affected activities are rescored. Values you edit or add in the app are never overwritten or removed by the file, so it only fills gaps. Invalid files show an error and stop the app (or exit with code 2 for the CLI). Relative paths in the file are relative to the file's folder.
Environment variables override the file.
| Variable | Default | Meaning |
|---|---|---|
MYFITTY_FIT_DIR |
./fit |
Folder scanned (recursively) for .fit files; never modified |
MYFITTY_DB |
./data/myfitty.duckdb |
DuckDB file: activities, thresholds, scores |
MYFITTY_SAMPLES_DIR |
./data/samples |
Parquet files with each activity's 1 Hz samples |
- DuckDB: one row per activity with summary metrics (duration, distance, HR/power averages, normalized power, seconds per heart rate) and its scores; the dated threshold history; and which source files have been seen.
- Parquet: each activity's samples resampled to 1 per second (
t,hr,power,speed,lat,lon,altitude) undersamples/sport=<sport>/year=<yyyy>/. Read them all withread_parquet('data/samples/**/*.parquet', hive_partitioning=true)in DuckDB. - Routes for the heatmap, one simplified route per outdoor activity, in the
activity_trackstable (an activity with no usable GPS gets a zero-point row, so it is not processed again). - Activities are deduplicated on start time + device serial number (or, without a serial, a hash of the file), so the same ride arriving from two folders or under another filename is imported once.
Switch the page from Training to Heatmap (top of the main area) to see where your outdoor activities happened, for the sport and date range chosen in the sidebar:
- Routes draws every route as a thin translucent line, so roads you ride often look stronger. With all sports shown, routes are coloured by sport (a legend sits above the map).
- Density is a smoothed heat layer, built from points spaced evenly every 100 m along the routes
(
DENSITY_SPACING_METRES), so each activity weighs by distance, not by time. - The map zooms to the selected routes whenever the filters change. The date range defaults to the last 180 days; widen it in the sidebar to see more.
- Indoor, treadmill and virtual activities (for example Zwift rides, whose GPS is in a game world) are left off
the map but still count in the training load. Virtual rides are recognised by sub-sport
virtual_activity(NON_GEOGRAPHIC_SUB_SPORTSinmyfitty/metrics/constants.py). - Basemap: the toggle above the map hides the tiles. With the basemap on, the tile provider (CARTO) learns which area you are looking at; with it off, no tile requests are made and everything stays on your machine.
Routes are built when an activity is imported (and filled in on the next import for older activities): GPS
dropouts are never joined (no fix for more than 30 s, or a jump over 300 m, starts a new stretch), and each
stretch is thinned so no point is more than 10 m from the recorded path (TRACK_* constants). For a history
of about 600 activities that keeps about 3% of the points, a few MB.
Thresholds are looked up by the activity's local start date: the latest entry on or before it (the earliest entry if none is that old). Adding a newer entry never changes older activities' scores. Editing or deleting an entry rescores only the activities it applies to.
-
NP (normalized power): 1 Hz power (gaps count as 0), 30 s rolling mean, mean of the 4th powers, 4th root. Not computed for under 30 s of data.
-
TSS (power):
hours × (NP / FTP)² × 100, using moving time. -
hrTSS (when there is no power or no FTP): seconds at each heart rate, grouped by % of threshold HR, each zone scoring a fixed TSS per hour:
% of threshold HR <81 81–89 90–93 94–99 ≥100 TSS per hour 20 40 60 80 100 The table is in
myfitty/metrics/constants.py. -
Relative effort (comparable to Strava's Relative Effort): minutes in each of five heart-rate zones times a per-minute weight of 0.3 / 0.3 / 2.1 / 2.1 / 2.4 for zones 1–5 (
myfitty/metrics/constants.py). Zone edges are the upper bounds of zones 1–4 in bpm, from[relative_effort] zone_edgesinmyfitty.toml(for example[114, 146, 153, 163]), or by default 63 / 80 / 84 / 90% of your max HR. The weights were calibrated against Strava's own numbers for ~390 rides and runs (median ratio 1.0, correlation 0.95, about 19% error per activity); walks and hikes come out roughly 40% lower than Strava. It works for every sport with heart rate and is charted per week. After changing the zones or weights runuv run myfitty rescore. -
CTL / ATL: exponentially weighted averages of daily TSS with 42- and 7-day constants,
x += (tss - x) / N, starting from 0. Days without activity count as 0 and the series runs to today. -
TSB (form) = CTL − ATL on the same day.
-
Weekly load: total TSS per ISO week (Monday start); weekly relative effort is the same for relative effort.
-
Running is always scored by hrTSS, even when the file has power: running power is not comparable with a cycling FTP. The sports are listed in
HR_ONLY_SPORTSinmyfitty/metrics/constants.py. After changing scoring rules, runuv run myfitty rescore. -
Otherwise, power TSS is used when both power and FTP exist, then hrTSS, otherwise the activity is unscored (
no_dataorno_threshold) and counts as 0 load.
.venv/bin/pytest. FIT fixtures in tests/fixtures/ come from python -m tests.fitgen.