A lightweight toolset that syncs Pybricks Code programs with GitHub. Works on Chromebooks (Crostini) and Windows (PowerShell).
Pybricks Code (browser) ←file picker→ local filesystem ←git→ GitHub
No Chrome extension or Pybricks modification needed — the browser's file picker accesses local files natively.
Chromebook (Linux):
bash tools/setup_chromebook.shWindows (PowerShell):
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
.\tools\setup_windows.ps1This configures git, generates an SSH key, and clones your repo.
python3 tools/sync.py=== Pybricks GitHub Sync ===
1. ⬇ Pull latest from GitHub
2. ⬆ Push my changes to GitHub
3. 📦 Import Pybricks backup ZIP into repo
4. 📤 Create ZIP for Pybricks import
5. 📋 Show what's changed
6. 🔀 Switch branch
0. Exit
Or use direct commands:
python3 tools/sync.py pull
python3 tools/sync.py push "added line follower"
python3 tools/sync.py status
python3 tools/sync.py unzip backup.zip
python3 tools/sync.py zip- Open code.pybricks.com
- File → Open/Save → Linux files → pybricks-projects → programs
├── tools/
│ ├── setup_chromebook.sh # One-time Chromebook setup
│ ├── setup_windows.ps1 # One-time Windows setup
│ └── sync.py # Sync helper (stdlib-only, no pip needed)
├── programs/ # Pybricks .py programs
├── shared/ # Shared libraries
├── WORKFLOW.md # Detailed student guide
└── README.md
Chromebook: Linux (Crostini) enabled — git and python3 are preinstalled.
Windows: Git and Python 3 installed (the setup script can install these via winget).
Both platforms need a GitHub account with SSH key configured. No external Python packages are required.
See WORKFLOW.md for the full student-facing guide, including daily workflow steps and troubleshooting.