micrOS Packages ๐ฆ v0.2
June 2, 2026 ยท View on GitHub
micrOS Packages Registry and Tools
This repository contains multiple installable micrOS packages and applications.
Each package lives in its own folder and includes a package.json file compatible with mip.
micrOS devices can install these packages from GitHub or from a local mip server.
In addition to package.json, micrOS packages also include a pacman.json file for package lifecycle management.
๐ฆ Package Catalog
| Project | Short Description |
|---|---|
| blinky_example | Simple package example. Implements basic Pin.OUT operations. |
| async_mqtt | Async MQTT client with micrOS Notifications integration. |
| async_oledui | SSD1306 and SH1106 OLED plug-and-play GUI with trackball support. |
| neopixel_matrix | Neopixel 8x8 LED matrix animations and web control. |
| keychaindemo | 16x32 SSD1306 OLED ESP32-C3 mini keychain demo with DS18 temperature sensor. |
| sim800 | SIM800C GSM modem interface. Call reveice, Test message receive/send. |
| garage_remote | Smart garage remote control with phone_manager |
| phone_manager | Phone number-based user management and access control. |
| color_sensor | TCS3472 RGB and ambient-light sensor integration with NeoPixel indicator support. |
| sound_event | Trainable I2S microphone sound-event recognition with labeled datasets. |
| tof_distance | VL53L0X time-of-flight distance sensor integration. |
| Add your own. |
______ _ _
| _ \ | | | |
| | | |_____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_
| | | / _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __|
| |/ / __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_
|___/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__|
| |
|_|
CLI Tool (tools.py)
The tools.py script provides a unified interface to validate packages, run package unit tests, create new packages, update package metadata, and start a local mip package registry server.
Usage
python3 tools.py [options]
Options
General
-h,--helpShow help message and exit.
Validation
-v [VALIDATE],--validate [VALIDATE]
Validate one package by name.
If no name is provided, validate all packages.
Unit Tests
-ut UNIT_TEST,--unit-test UNIT_TEST
Run unit tests for one package if<package>/testsexists with the normal pytest output.
If no name is provided, run all available package unit tests.
Use-qfor short one-line summaries.
Local mip Server
-s,--serve
Start the local mip package registry server.
Package Creation
-c,--create
Create a new micrOS application package from the template.--package PACKAGE
Name of the package/application when creating a new one.--module MODULE
Public Load Module name (LM_*.py) when creating a new application.
Update package.json
-u UPDATE,--update UPDATE
Update thepackage.jsonfile of a package by itsPACKAGEname.
Primarily updates the "urls" section.
Repository Structure
โ micrOSPackages git:(main) โ tree -L 3
.
โโโ README.md
โโโ _tools <- PACKAGE CREATION AND MAINTENANCE SCRIPTS
โย ย โโโ __init__.py
โย ย โโโ __pycache__
โย ย โย ย โโโ __init__.cpython-312.pyc
โย ย โย ย โโโ create_package.cpython-312.pyc
โย ย โย ย โโโ mip.cpython-312.pyc
โย ย โย ย โโโ serve_packages.cpython-312.pyc
โย ย โย ย โโโ unpack.cpython-312.pyc
โย ย โย ย โโโ validate.cpython-312.pyc
โย ย โโโ app_template
โย ย โย ย โโโ README.md
โย ย โย ย โโโ package
โย ย โย ย โโโ package.json
โย ย โโโ create_package.py
โย ย โโโ mip.py
โย ย โโโ serve_packages.py
โย ย โโโ unpack.py
โย ย โโโ ut_executor.py
โย ย โโโ validate.py
โโโ async_mqtt <- APPLICATION PACKAGE
โย ย โโโ README.md
โย ย โโโ package
โย ย โย ย โโโ LM_mqtt_client.py
โย ย โย ย โโโ __init__.py
โย ย โย ย โโโ pacman.json
โย ย โโโ package.json
โโโ async_oledui <- APPLICATION PACKAGE
โย ย โโโ README.md
โย ย โโโ package
โย ย โย ย โโโ LM_oledui.py
โย ย โย ย โโโ __init__.py
โย ย โย ย โโโ pacman.json
โย ย โย ย โโโ peripheries.py
โย ย โย ย โโโ uiframes.py
โย ย โโโ package.json
โโโ blinky_example <- APPLICATION PACKAGE
โย ย โโโ README.md
โย ย โโโ package
โย ย โย ย โโโ LM_blinky.py
โย ย โย ย โโโ __init__.py
โย ย โย ย โโโ pacman.json
โย ย โโโ package.json
โโโ tools.py
package.json: MicroPython standard formipinstallations
pacman.json: OAM metadata for micrOS package unpack, update, and delete
Load Module Naming Convention
micrOS automatically loads modules only if their filenames match:
LM_*.py
Validating Packages
Validate all packages:
python3 tools.py --validate
Validate one specific package:
python3 tools.py --validate mypackage
The validation process ensures:
package.jsonexists- all files listed inside
package.jsonactually exist - the package structure is valid for
mipinstallation pacman.jsonexists- available unit tests under
<package>/testspass
Run unit tests directly for one package:
python3 tools.py --unit-test mypackage
Run all available package unit tests:
python3 tools.py --unit-test
Updating package.json
Update the urls section of a package's package.json:
python3 tools.py --update mypackage
package.json(urls) generation for all/packagefiles
pacman.jsonmetadata generation frompackage.json
Creating a New micrOS Package
python3 tools.py --create --package myapplication --module myapp
This command:
- creates a new folder
- copies the template structure
- fills in
package.jsonwith the provided values
Local mip Test Server
Start the local mip package registry server:
python3 tools.py --serve
Output:
โ micrOSPackages git:(main) โ ./tools.py --serve
Starting server...
๐ Serving repo root: /Users/bnm/micrOS/micrOSPackages
๐ HTTP server: http://0.0.0.0:8000/
๐ก Detected local IP: http://10.0.1.73:8000/
๐ฆ Available mip packages in repo root:
โข async_mqtt
๐งช Test with curl: curl http://10.0.1.73:8000/async_mqtt/package.json | jq .
๐ On device (repl): import mip; mip.install('http://10.0.1.73:8000/async_mqtt/')
๐ On device (shell): pacman install 'http://10.0.1.73:8000/async_mqtt/'
โข async_oledui
๐งช Test with curl: curl http://10.0.1.73:8000/async_oledui/package.json | jq .
๐ On device (repl): import mip; mip.install('http://10.0.1.73:8000/async_oledui/')
๐ On device (shell): pacman install 'http://10.0.1.73:8000/async_oledui/'
โข blinky_example
๐งช Test with curl: curl http://10.0.1.73:8000/blinky_example/package.json | jq .
๐ On device (repl): import mip; mip.install('http://10.0.1.73:8000/blinky_example/')
๐ On device (shell): pacman install 'http://10.0.1.73:8000/blinky_example/'
๐ ๏ธ Press Ctrl+C to stop.
Installing Packages on a micrOS Device
From GitHub (REPL)
import mip
mip.install("github:BxNxM/micrOSPackages/blinky_example")
From Shell
pacman install "https://github.com/BxNxM/micrOSPackages/blob/main/blinky_example"
Summary
- Each folder is one micrOS package.
tools.pymanages:- validation
- unit test execution
- package creation
package.jsonupdating- local
mipserver
validate.pychecks package structure and file references.ut_executor.pyruns package-local pytest suites from<package>/tests.serve_packages.pyprovides a localmipserver.- Load Modules must follow the
LM_*.pynaming pattern.
Improvement ideas
- Cross compile packages with mpy-cross
- Adapt pacman to prioritize .mpy files
- Add explicit tag/branch flag support for mip wrappers
git push -u origin main