Skip to main content

A utility to manage files on an ESP32 running MicroPython.

Project description

ESP32 Manager CLI

PyPI version Python versions License

A simple command-line utility to upload, download, and manage files on ESP32 boards running MicroPython. Supports reliable file transfers with chunked SHA256 per-chunk validation, auto-port detection, and friendly CLI commands.

⚠️ DISCLAIMER: It probably works with other MicroPython boards like ESP8266, Pyboard, etc. but it hasn't been tested.


✨ Features

  • 📡 Auto-detect serial port (/dev/ttyUSB*, CH340, CP210, etc.)
  • 📂 List files on the device
  • ⬆️ Reliable file upload with chunked transfers and per-chunk hash validation
  • ⬇️ Download and view files from the ESP32
  • 📄 Read files (cat) directly from the device
  • 🗑️ Remove individual or all files (clean command preserves boot.py)
  • 🔁 Reset the board and run main.py
  • Works out of the box with MicroPython raw REPL

📦 Installation

pip install esp32-manager

Or, install from source:

git clone https://github.com/YOUR_GITHUB_USERNAME/esp32-manager.git
cd esp32-manager
pip install -e .

🚀 Usage

After installation, the CLI is available as:

esp32-manager <command> [options]

Available commands

  • ls - List files on the ESP32
  • put <files> - Upload one or more files
  • get <files> - Download files from the ESP32
  • cat <files> - Print file contents
  • rm <files> - Delete files
  • clean - Delete all files (except boot.py)
  • run - Reboot the board (machine.reset())

Options

  • --port DEVICE - Serial port (default: auto-detected)
  • --baudrate N - Baudrate (default: 115200)
  • --raw - Suppress emojis / extra formatting (for scripting)

🛠 Example

# List files on device
esp32-manager ls

# Upload main.py
esp32-manager put src/main.py

# Upload all files in src/
esp32-manager put src/*

# Download files
esp32-manager get config.json main.py

# Print contents of a file
esp32-manager cat main.py

# Delete a file
esp32-manager rm main.py

# Clean all files (except boot.py)
esp32-manager clean

# Reboot device
esp32-manager run

# Specify port and baudrate
python3 esp32_manager.py put main.py --port /dev/ttyUSB1 --baudrate 921600

# Raw output (no emojis)
python3 esp32_manager.py ls --raw

⚠️ Tip: Use put for all source files (main.py, wifi.py, cam.py, control.py, webserver.py, etc.) to keep your ESP32 in sync with your local project.


📜 License

This project is licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License. A copy of the License is provided in the LICENSE file.

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

esp32_manager-1.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esp32_manager-1.0.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file esp32_manager-1.0.1.tar.gz.

File metadata

  • Download URL: esp32_manager-1.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for esp32_manager-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f4189c52677fa904bfee01ecacef959cd6af85213d0d9d52b3e83482b10f2d8b
MD5 b42a531e22b2cfc5f05c65bbd4b83a0c
BLAKE2b-256 b83e8ec36135f99de1268f677bd09fa46474b14662079d017329be778043ee8d

See more details on using hashes here.

File details

Details for the file esp32_manager-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: esp32_manager-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for esp32_manager-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9abe91186a0fb6b892b22bcbde93728efcf46ca9659d07f544ebde86b39746d3
MD5 bf793c0a899c0e76ea00a03754cac22f
BLAKE2b-256 dc9afe2c95d67fc4732ec206b0a910e80091d17464224a973850632c19de0830

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page