MicroPython deployment & synchronization tool for Raspberry Pi Pico
Project description
Pico Sync Tool
Pico Sync โ a compact CLI tool for convenient work with Raspberry Pi Pico / Pico W running MicroPython. Provides commands for file synchronization, file system browsing, basic file operations on the device, log monitoring, and board reset.
Works on top of mpremote. Supports interactive mode with menus, fzf, language selection (UA/EN).
The tool's goal is to make MicroPython development feel as close to working with a local project as possible.
Features:
- ๐ Sync โ upload files to Pico (src/ or root)
- ๐ง SHA-sync โ only changed files are uploaded (SHA-256)
- ๐ Auto-delete extra files โ files on Pico that don't exist locally are removed
- ๐งผ Empty directory cleanup โ after sync
- โ
.picoignoreโ file ignoring (like.gitignore) - ๐ File viewing and editing โ interactive browser (pick) or
--ls/--cat/--edit(CLI) - ๐ Auto-detect port โ find Pico among serial ports: first by device name (if
.piconameis set), then by saved port, otherwise โ first available Pico - ๐ Serial monitor โ live log viewer from Pico
- ๐ Reboot โ software board reset
- ๐ Interface language โ Ukrainian / English
- ๐ฆ Project management โ save projects with settings
๐ ะฃะบัะฐัะฝััะบะฐ ะฒะตัััั
๐ Details: interactive mode (pick) ยท CLI mode
Table of Contents
Installation
Linux
Recommended (pipx):
pipx install pico_sync
Isolation in a separate environment, doesn't pollute the system.
Alternative (pip):
pip install pico_sync
Can use --user:
pip install --user pico_sync
Windows
Via pip:
pip install pico_sync
Requires Python 3.7+ installed and added to PATH.
Via pipx:
pipx install pico_sync
macOS
Via pip:
pip3 install pico_sync
Via pipx:
pipx install pico_sync
From GitHub (any OS)
git clone https://github.com/toldk98/pico_sync.git
cd pico_sync
pip install .
Portable version (no installation)
git clone https://github.com/toldk98/pico_sync.git
cd pico_sync
pip install pyserial mpremote
python pico_sync_portable.py
Dependencies
- Python 3.7+
pyserialโ serial port communicationmpremoteโ execute commands on Pico
Optional dependencies (for interactive mode)
- fzf โ convenient menu selection. If not installed, numbered selection is used.
Usage
Launch
- Pick:
picosyncorpicosync --pick. Opens a menu with fzf (or numbered selection). โ details - CLI:
picosync <options>. Action flags without interactivity. โ details
Start screen / Help
- Pick: list of saved projects +
[+] add project,[-] remove project,[s] settings,[q] quit. Select project โ main menu. - CLI:
picosync --helpโ all options;picosync project --helpโ project management.
Sync
- Pick:
[d] device โ syncโ filter selection from menu (all/py/py+/nopy/custom). - CLI:
picosync --sync [--filter py|py+|nopy|.ext,.ext2].
Algorithm (shared by both modes):
- Load
.picoignorefrom project root - Take a snapshot of all files on Pico
- Walk the local directory (src/ or root), collect files for sync (skip ignored and
.piconame) - Run SHA-256 on all Pico files in one request
- Compare hashes: match โ skip, missing โ upload, different โ update
- Delete files on Pico without local match (respecting filter)
- Clean empty directories
Files (view, edit, delete)
- Pick:
[f] filesโ browser with directory navigation,[*] findโ search all files; cat/edit/rm in file context menu. Editor: nano/vim (Linux), TextEdit (macOS), notepad (Windows). โ details - CLI:
picosync --ls /โ list root;picosync --ls /spmโ list directory;picosync --cat /main.pyโ content;picosync --edit /config.pyโ editing. โ details
Serial monitor
- Pick:
[d] device โ monitor - CLI:
picosync --monitor
Exit: Ctrl+C. Auto-reconnect on reboot/port change.
Reboot
- Pick:
[d] device โ reboot - CLI:
picosync --reboot
Software reset via mpremote reset.
Device name (piconame)
- Pick:
[c] config โ port_settings โ piconameโ detect (read from Pico), set (write new), clear (delete + clear config). - CLI:
picosync --set-name <name>โ writes/.piconameto Pico and saves to config.
Project settings
- Pick:
[c] configโ port_settings/baud/piconame/init. - CLI:
picosync --port /dev/ttyACM0 --sync,picosync --init,picosync --search_port.
Project management
- Pick: start screen โ
[+] add project(enter path),[-] remove project(select from list). โ details - CLI:
picosync project list,picosync project add /path,picosync project remove <name>. โ details
Global settings
- Pick:
[s] settingsโ[~] lang(switch UA/EN),[!] check update(check for updates). โ details - CLI:
picosync --lang ua/en,picosync --check_update,LANG=ua/LANG=enโ environment variable. โ details
Configuration
Global settings
File: ~/.config/pico_sync/settings.json
{
"language": "ua"
}
- language โ interface language:
"ua"or"en". Auto-detected: first from file, then from$LANG(ifuk*โ"ua", otherwise โ"en"). Changed:- Pick:
[s] settings โ [~] lang - CLI:
--lang ua/en - Shared:
LANG=ua/LANG=en
- Pick:
Project system
File: ~/.config/pico_sync/projects.json
{
"projects": [
{
"name": "my-project",
"root": "/home/user/projects/my-project",
"last_used": "2026-06-29T12:00:00"
}
]
}
Each project contains:
nameโ name (basename of root directory)rootโ absolute path to rootlast_usedโ last used date (ISO 8601)
Projects are sorted by last_used descending.
Project file .picosyncconfig
File: <project_root>/.picosyncconfig
{
"port": "",
"filter": "all",
"piconame": ""
}
| Field | Type | Description |
|---|---|---|
port |
str |
Pico port (e.g. /dev/ttyACM0). Empty = auto-detect |
filter |
str |
Sync filter: all, py, py+, nopy, .ext,.ext2 |
piconame |
str |
Device name for name-based search. Empty = not used |
Created:
- Pick:
[c] config โ init - CLI:
picosync --init
.picoignore
Works like .gitignore. Examples:
# ignore secret.py
secret.py
# ignore entire directory
data/
# ignore by extension
*.mpy
Supports:
*โ any number of characters?โ single character[abc]โ character from set**โ any nesting level!โ negation (don't ignore)- Lines without
/apply to all levels; with/โ to a specific path
Default .picoignore:
__pycache__/
*.pyc
.git/
.DS_Store
Thumbs.db
dist/
*.egg-info/
build/
.idea/
*.swp
*.swo
Port
The tool finds Pico in this order:
- By .piconame (if set) โ iterates all Pico ports, reads
/.piconamefrom each - By port from config โ uses saved port
- Auto-detect โ finds first device with Raspberry Pi USB ID (0x2E8A)
- If nothing found:
- Pick:
[c] config โ port_settings โ portfor manual selection - CLI:
picosync --search_portfor manual selection
- Pick:
Piconame
Optional device name stored in /.piconame on Pico. Allows identifying a specific board when multiple Picos are connected.
Management:
- Pick:
[c] config โ port_settings โ piconamewith options detect (read from Pico), set (write new), clear (delete from Pico and clear config) - CLI:
picosync --set-name <name>โ write name to Pico and save to config
.piconame is automatically excluded from sync (not deleted, not uploaded).
Sync filters
Only affect deletion of extra files from Pico. All files are uploaded regardless of filter.
| Filter | Description |
|---|---|
all |
All files (deletes extras on Pico) |
py |
Only .py |
py+ |
.py, .txt, .json |
nopy |
Everything except .py |
.ext,.ext2 |
Custom comma-separated extensions |
FAQ
Pico not found / port not detected
Make sure Pico is connected with a USB cable (not just power). If auto-detect fails:
- Pick:
[c] config โ port_settings โ portfor manual selection from serial port list - CLI:
picosync --search_portfor interactive selection from serial port list
Two Picos connected simultaneously
Auto-detect picks the first one found. To work with a specific device:
- Pick:
[c] config โ port_settings โ piconame โ set, give it a unique name - CLI:
picosync --set-name <name>, give it a unique name
How to install fzf?
fzf is an optional tool for convenient menu navigation in interactive mode. Without it, numbered input works. Not needed for CLI mode.
- Linux:
sudo apt install fzf(orpacman -S fzf,dnf install fzf) - macOS:
brew install fzf - Windows: download binary from https://github.com/junegunn/fzf/releases
Files not syncing
Check .picoignore โ the file might match an ignore rule. If src/ exists in root, it is synced; otherwise, the root.
Error "No module named 'pyserial' / 'mpremote'"
Install dependencies: pip install pyserial mpremote (only relevant for portable version without package installation).
How to update Pico Sync?
Check for updates: [s] settings โ [!] check update (pick) or picosync --check_update (CLI). Shows newer version, changelog, and links but does not update automatically.
Install update:
- Via pipx:
pipx upgrade pico_sync - Via pip:
pip install --upgrade pico_sync
How to get full help?
CLI: picosync --help, picosync project --help
In pick mode, all available actions are shown in the menu.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pico_sync-1.1.3.tar.gz.
File metadata
- Download URL: pico_sync-1.1.3.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3276c11cce2e94686bc374f8d3dcbbd530aacae04c99b5ce4bf13ec2fa522e0
|
|
| MD5 |
9d830e21361229d790f861a8bbacbb2d
|
|
| BLAKE2b-256 |
609e0ebc48a2ce2e129945a92ba537e3973bc2f20d60211c913c8604165d4766
|
File details
Details for the file pico_sync-1.1.3-py3-none-any.whl.
File metadata
- Download URL: pico_sync-1.1.3-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3748d7268bbef403b5866ee7f688ab779d680e90af3c660948d64e3287d6d30
|
|
| MD5 |
e2ffd95718bb0bd79d765b2374ab0ec7
|
|
| BLAKE2b-256 |
c363947dd1d2b653d3978e52bd7cc820aab6a71bd71958102219344c287b6c7b
|