This repository contains multiple installable micrOS packages and applications.
Each package lives in its own folder and includes a package.json that is compatible with mip.
micrOS devices can install these packages from GitHub or from a local mip server.
The tools.py script provides a unified interface to validate packages, create new packages, update package.json files, and start a local mip package registry server.
-h,--helpShow help message and exit.
-v [VALIDATE],--validate [VALIDATE]
Validate one package by name.
If no name is provided, validate all packages.
-s,--serve
Start the local mip package registry server.
-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.
-u UPDATE,--update UPDATE
Update the package.json file of a package by itsPACKAGEname.
Primarily updates the "urls" section.
├── README.md
├── _tools
│ ├── __init__.py
│ ├── app_template
│ │ ├── README.md
│ │ ├── package
│ │ │ ├── LM_app.py
│ │ │ ├── __init__.py
│ │ │ └── shared.py
│ │ └── package.json
│ ├── create_package.py
│ ├── serve_packages.py
│ └── validate.py
└── tools.pymicrOS automatically loads modules only if their filenames match:
LM_*.py
Validate all packages:
python3 tools.py --validateValidate one specific package:
python3 tools.py --validate mypackageThe validation process ensures:
- package.json exists
- all files listed inside package.json actually exist
- the package structure is valid for mip installation
Update the urls section of a package’s package.json:
python3 tools.py --update mypackageThis reads, modifies, and rewrites the package.json file cleanly.
python3 tools.py --create --package myapplication --module myappThis command:
- creates a new folder
- copies the template structure
- fills in package.json with provided values
Start the local mip package registry server:
python3 tools.py --serveimport mip
mip.install("github:BxNxM/micrOSPackages/blinky_example")pacman download "https://github.com/BxNxM/micrOSPackages/blob/main/blinky_example"- Each folder is one micrOS package.
- tools.py manages:
- validation
- package creation
- package.json updating
- local mip server
- validate.py checks package structure and file references.
- serve_packages.py will provide a local mip server.
- Load Modules must follow the LM_*.py naming pattern.
git push -u origin main
