Skip to content

Lansing-Tech-Studio/pybricks-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pybricks Sync

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.

Quick Start

1. Setup (one time)

Chromebook (Linux):

bash tools/setup_chromebook.sh

Windows (PowerShell):

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
.\tools\setup_windows.ps1

This configures git, generates an SSH key, and clones your repo.

2. Sync

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

3. Edit in Pybricks

  1. Open code.pybricks.com
  2. File → Open/Save → Linux filespybricks-projectsprograms

Folder Structure

├── 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

Requirements

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.

Documentation

See WORKFLOW.md for the full student-facing guide, including daily workflow steps and troubleshooting.

About

Tooling for easy backups of Pybricks code to GitHub

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors