# ============================================= # FastForge – Pebble Intermittent Fasting App # Justfile for Fedora Linux + Pebble SDK 4.9+ (2026) # ============================================= emulator := "basalt" # Default: show all available commands default: @just --list # Aliases (shortcuts) alias b := build alias i := install alias d := dev alias l := logs alias s := screenshot alias c := clean alias k := kill # ───────────────────────────────────────────── # Core development commands # ───────────────────────────────────────────── # Build the app build: pebble build # Install to the basalt emulator (this also starts the emulator if it's not running) install: pebble install --emulator {{emulator}} # Build + Install (the command you will use most often) # Kills any stale emulator first so install never races against the boot animation. dev: -pebble kill pebble build && pebble install --emulator {{emulator}} # Show live logs (run this in a **second** terminal) logs: pebble logs --emulator {{emulator}} # Take a screenshot of the emulator screenshot: pebble screenshot --emulator {{emulator}} # ───────────────────────────────────────────── # Emulator control # ───────────────────────────────────────────── # Kill / stop the running emulator (this is the fixed command) kill: pebble kill # ───────────────────────────────────────────── # Emulator recovery # ───────────────────────────────────────────── # Reset the basalt SPI flash to factory state. # Use this when 'just dev' hangs on the Pebble boot screen — it means the # flash was corrupted (e.g. by killing multiple concurrent qemu processes). reset-flash: -pebble kill bunzip2 -k -c ~/.pebble-sdk/SDKs/4.9.148/sdk-core/pebble/basalt/qemu/qemu_spi_flash.bin.bz2 > ~/.pebble-sdk/4.9.148/basalt/qemu_spi_flash.bin @echo "Flash reset to factory state. Run 'just dev' to reinstall." # ───────────────────────────────────────────── # Maintenance commands # ───────────────────────────────────────────── # Clean all build artifacts clean: rm -rf build/ *.pbw *.elf *.bin *.map *.o config.log .lock-waf* .wafpickle* # Full clean + rebuild + install rebuild: just clean just dev # Quick rebuild + install quick: just build && just install # Run host unit tests (TZ=UTC for deterministic localtime/streak checks) test: make -C tests test # Build with DEBUG=1 compile flag debug-build: DEBUG=1 pebble build # Build + install debug app # Kills any stale emulator first (same reason as dev). debug-dev: -pebble kill DEBUG=1 pebble build && pebble install --emulator {{emulator}} # ───────────────────────────────────────────── # Debug / Testing helpers # ───────────────────────────────────────────── # Build, install, and remind you to open logs dev-with-logs: @echo "✅ Building and installing..." just dev @echo "" @echo "🚀 Now open a second terminal and run: just logs" # Show current SDK version sdk-version: pebble --version # Help / reminder help: @echo "FastForge development commands:" @echo " just dev → build + install (most used)" @echo " just logs → live logs (second terminal)" @echo " just kill → stop the emulator" @echo " just clean → remove build files" @echo " just rebuild → clean + dev" @echo "" @echo "Run 'just' to see all available commands."