mposcli 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mposcli-0.1.0 → mposcli-0.3.0}/PKG-INFO +188 -64
- {mposcli-0.1.0 → mposcli-0.3.0}/README.md +187 -63
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/__init__.py +1 -1
- mposcli-0.3.0/mposcli/cli_app/copy_mpos.py +92 -0
- mposcli-0.3.0/mposcli/cli_app/flash.py +87 -0
- mposcli-0.3.0/mposcli/cli_app/update.py +61 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/tests/test_readme.py +16 -4
- mposcli-0.3.0/mposcli/tools.py +27 -0
- mposcli-0.3.0/mposcli/user_input.py +87 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/uv.lock +59 -59
- mposcli-0.1.0/mposcli/cli_app/update.py +0 -35
- mposcli-0.1.0/mposcli/user_input.py +0 -37
- {mposcli-0.1.0 → mposcli-0.3.0}/.editorconfig +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.github/workflows/tests.yml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.gitignore +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.idea/.gitignore +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.pre-commit-config.yaml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.pre-commit-hooks.yaml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/Template Python tests.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/Template Python.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/Unittests __all__.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/cli --help.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/dev-cli --help.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.run/dev-cli test.run.xml +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/.venv-app/.gitignore +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/cli.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/dev-cli.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/dist/.gitignore +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/__main__.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_app/__init__.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_app/build.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_app/run_deskop.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/__init__.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/__main__.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/code_style.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/packaging.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/shell_completion.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/testing.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/cli_dev/update_readme_history.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/constants.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/fs_utils.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/mpos_utils.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/tests/__init__.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/tests/test_doctests.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/tests/test_project_setup.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/mposcli/tests/test_readme_history.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/noxfile.py +0 -0
- {mposcli-0.1.0 → mposcli-0.3.0}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mposcli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: CLI helper for MicroPythonOS: https://github.com/MicroPythonOS/MicroPythonOS
|
|
5
5
|
Project-URL: Documentation, https://github.com/jedie/mposcli
|
|
6
6
|
Project-URL: Source, https://github.com/jedie/mposcli
|
|
@@ -25,38 +25,73 @@ Experimental CLI helper for MicroPythonOS: https://github.com/MicroPythonOS/Micr
|
|
|
25
25
|
|
|
26
26
|
Main Idea: Install it via pipx (see below) and use `mposcli` command in MicroPythonOS repository path.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Install, e.g.:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
sudo apt install pipx
|
|
32
|
+
|
|
33
|
+
pipx install mposcli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To upgrade an existing installation: Just call: `pipx upgrade PyHardLinkBackup`
|
|
37
|
+
|
|
38
|
+
Usage e.g.:
|
|
29
39
|
|
|
30
|
-
[comment]: <> (✂✂✂ auto generated main help start ✂✂✂)
|
|
31
40
|
```
|
|
32
|
-
|
|
41
|
+
cd ~/MicroPythonOS
|
|
42
|
+
~/MicroPythonOS$ mposcli run-desktop
|
|
43
|
+
```
|
|
33
44
|
|
|
34
45
|
|
|
46
|
+
## CLI
|
|
35
47
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
│
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
│
|
|
47
|
-
│ •
|
|
48
|
-
|
|
48
|
+
[comment]: <> (✂✂✂ auto generated main help start ✂✂✂)
|
|
49
|
+
```
|
|
50
|
+
usage: mposcli [-h] {build,cp,flash,run-desktop,update,update-submodules,version}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
╭─ options ──────────────────────────────────────────────────────────────────────────────╮
|
|
55
|
+
│ -h, --help show this help message and exit │
|
|
56
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
57
|
+
╭─ subcommands ──────────────────────────────────────────────────────────────────────────╮
|
|
58
|
+
│ (required) │
|
|
59
|
+
│ • build Build MicroPythonOS by calling: ./scripts/build_mpos.sh │
|
|
60
|
+
│ <target> see: https://docs.micropythonos.com/os-development/ │
|
|
61
|
+
│ • cp Copy/update internal_filesystem/lib/mpos files to the device │
|
|
62
|
+
│ via "mpremote fs cp". Display a file chooser to select which │
|
|
63
|
+
│ files to copy/update. But can also be used to copy/update all │
|
|
64
|
+
│ files. see: https://docs.micropythonos.com/os-development/insta │
|
|
65
|
+
│ lling-on-esp32/ │
|
|
66
|
+
│ • flash Flash MicroPythonOS to the device. Display a file chooser to │
|
|
67
|
+
│ select the image to flash. All lvgl_micropython/build/*.bin │
|
|
68
|
+
│ files will be shown in the file chooser. see: https://docs.micr │
|
|
69
|
+
│ opythonos.com/os-development/installing-on-esp32/ │
|
|
70
|
+
│ • run-desktop Run MicroPythonOS on desktop. see: https://docs.micropythonos.c │
|
|
71
|
+
│ om/getting-started/running/#running-on-desktop │
|
|
72
|
+
│ • update Update MicroPythonOS repository. Assume that there is a │
|
|
73
|
+
│ "origin" and/or "upstream" remote configured. Will also ask if │
|
|
74
|
+
│ you want to update the submodules as well, which is │
|
|
75
|
+
│ recommended. │
|
|
76
|
+
│ • update-submodules Updates MicroPythonOS git submodules only. Use "mposcli update" │
|
|
77
|
+
│ to update the main repository and optionally the submodules as │
|
|
78
|
+
│ well. see: https://docs.micropythonos.com/os-development/linux/ │
|
|
79
|
+
│ #optional-updating-the-code │
|
|
80
|
+
│ • version Print version and exit │
|
|
81
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
49
82
|
```
|
|
50
83
|
[comment]: <> (✂✂✂ auto generated main help end ✂✂✂)
|
|
51
84
|
|
|
52
85
|
|
|
53
|
-
|
|
86
|
+
|
|
87
|
+
## mposcli build
|
|
54
88
|
|
|
55
89
|
[comment]: <> (✂✂✂ auto generated build start ✂✂✂)
|
|
56
90
|
```
|
|
57
91
|
usage: mposcli build [-h] [--target {esp32,esp32s3,unix,macOS}] [-v]
|
|
58
92
|
|
|
59
|
-
Build MicroPythonOS by calling: ./scripts/build_mpos.sh <target> see:
|
|
93
|
+
Build MicroPythonOS by calling: ./scripts/build_mpos.sh <target> see:
|
|
94
|
+
https://docs.micropythonos.com/os-development/
|
|
60
95
|
|
|
61
96
|
╭─ options ────────────────────────────────────────────────────────────────╮
|
|
62
97
|
│ -h, --help show this help message and exit │
|
|
@@ -69,35 +104,114 @@ Build MicroPythonOS by calling: ./scripts/build_mpos.sh <target> see: https://do
|
|
|
69
104
|
|
|
70
105
|
|
|
71
106
|
|
|
72
|
-
##
|
|
107
|
+
## mposcli cp
|
|
108
|
+
|
|
109
|
+
[comment]: <> (✂✂✂ auto generated cp start ✂✂✂)
|
|
110
|
+
```
|
|
111
|
+
usage: mposcli cp [-h] [--new-file-limit INT] [--reset | --no-reset] [--repl | --no-repl]
|
|
112
|
+
[-v]
|
|
113
|
+
|
|
114
|
+
Copy/update internal_filesystem/lib/mpos files to the device via "mpremote fs cp". Display
|
|
115
|
+
a file chooser to select which files to copy/update. But can also be used to copy/update
|
|
116
|
+
all files. see: https://docs.micropythonos.com/os-development/installing-on-esp32/
|
|
117
|
+
|
|
118
|
+
╭─ options ──────────────────────────────────────────────────────────────────────────────╮
|
|
119
|
+
│ -h, --help show this help message and exit │
|
|
120
|
+
│ --new-file-limit INT How many of the newest files to show in the file chooser? │
|
|
121
|
+
│ (default: 10) │
|
|
122
|
+
│ --reset, --no-reset Reset the device after copy/update? (default: True) │
|
|
123
|
+
│ --repl, --no-repl After flashing/verify start REPL with mpremote to see the output │
|
|
124
|
+
│ of the device? (default: True) │
|
|
125
|
+
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
|
|
126
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
127
|
+
```
|
|
128
|
+
[comment]: <> (✂✂✂ auto generated cp end ✂✂✂)
|
|
129
|
+
|
|
73
130
|
|
|
74
131
|
|
|
75
|
-
|
|
132
|
+
## mposcli flash
|
|
133
|
+
|
|
134
|
+
[comment]: <> (✂✂✂ auto generated flash start ✂✂✂)
|
|
135
|
+
```
|
|
136
|
+
usage: mposcli flash [-h] [FLASH OPTIONS]
|
|
137
|
+
|
|
138
|
+
Flash MicroPythonOS to the device. Display a file chooser to select the image to flash.
|
|
139
|
+
All lvgl_micropython/build/*.bin files will be shown in the file chooser. see:
|
|
140
|
+
https://docs.micropythonos.com/os-development/installing-on-esp32/
|
|
141
|
+
|
|
142
|
+
╭─ options ──────────────────────────────────────────────────────────────────────────────╮
|
|
143
|
+
│ -h, --help show this help message and exit │
|
|
144
|
+
│ --port STR Port used for esptool and mpremote (default: /dev/ttyUSB0) │
|
|
145
|
+
│ --address STR Address (default: 0x0) │
|
|
146
|
+
│ --flash-size STR Flash Size (default: detect) │
|
|
147
|
+
│ --verify, --no-verify Verify after flashing? (default: True) │
|
|
148
|
+
│ --repl, --no-repl After flashing/verify start REPL with mpremote to see the │
|
|
149
|
+
│ output of the device? (default: True) │
|
|
150
|
+
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
|
|
151
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
76
152
|
```
|
|
77
|
-
|
|
153
|
+
[comment]: <> (✂✂✂ auto generated flash end ✂✂✂)
|
|
78
154
|
|
|
79
|
-
Run MicroPythonOS on desktop. see: https://docs.micropythonos.com/getting-started/running/#running-on-desktop
|
|
80
155
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
156
|
+
|
|
157
|
+
## mposcli run-desktop
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
[comment]: <> (✂✂✂ auto generated run-desktop start ✂✂✂)
|
|
161
|
+
```
|
|
162
|
+
usage: mposcli run-desktop [-h] [--heapsize INT] [--script {None}|STR] [--binary
|
|
163
|
+
{None}|STR] [-v]
|
|
164
|
+
|
|
165
|
+
Run MicroPythonOS on desktop. see: https://docs.micropythonos.com/getting-
|
|
166
|
+
started/running/#running-on-desktop
|
|
167
|
+
|
|
168
|
+
╭─ options ──────────────────────────────────────────────────────────────────────────────╮
|
|
169
|
+
│ -h, --help show this help message and exit │
|
|
170
|
+
│ --heapsize INT Heap size in MB (default: 8, same as PSRAM on many ESP32-S3 │
|
|
171
|
+
│ boards) (default: 8) │
|
|
172
|
+
│ --script {None}|STR Script file (.py) or app name to run. If omitted, starts │
|
|
173
|
+
│ normally. (default: None) │
|
|
174
|
+
│ --binary {None}|STR Optional name of the binary to start. If omitted, shows a file │
|
|
175
|
+
│ chooser to select one from the lvgl_micropython build directory. │
|
|
176
|
+
│ (default: None) │
|
|
177
|
+
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
|
|
178
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
89
179
|
```
|
|
90
180
|
[comment]: <> (✂✂✂ auto generated run-desktop end ✂✂✂)
|
|
91
181
|
|
|
92
182
|
|
|
93
|
-
|
|
183
|
+
|
|
184
|
+
## mposcli update
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
[comment]: <> (✂✂✂ auto generated update start ✂✂✂)
|
|
188
|
+
```
|
|
189
|
+
usage: mposcli update [-h] [-v]
|
|
190
|
+
|
|
191
|
+
Update MicroPythonOS repository. Assume that there is a "origin" and/or "upstream" remote
|
|
192
|
+
configured. Will also ask if you want to update the submodules as well, which is
|
|
193
|
+
recommended.
|
|
194
|
+
|
|
195
|
+
╭─ options ────────────────────────────────────────────────────────────────╮
|
|
196
|
+
│ -h, --help show this help message and exit │
|
|
197
|
+
│ -v, --verbosity Verbosity level; e.g.: -v, -vv, -vvv, etc. (repeatable) │
|
|
198
|
+
╰──────────────────────────────────────────────────────────────────────────╯
|
|
199
|
+
```
|
|
200
|
+
[comment]: <> (✂✂✂ auto generated update end ✂✂✂)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## mposcli update-submodules
|
|
94
206
|
|
|
95
207
|
|
|
96
208
|
[comment]: <> (✂✂✂ auto generated update-submodules start ✂✂✂)
|
|
97
209
|
```
|
|
98
210
|
usage: mposcli update-submodules [-h] [-v]
|
|
99
211
|
|
|
100
|
-
|
|
212
|
+
Updates MicroPythonOS git submodules only. Use "mposcli update" to update the main
|
|
213
|
+
repository and optionally the submodules as well. see: https://docs.micropythonos.com/os-
|
|
214
|
+
development/linux/#optional-updating-the-code
|
|
101
215
|
|
|
102
216
|
╭─ options ────────────────────────────────────────────────────────────────╮
|
|
103
217
|
│ -h, --help show this help message and exit │
|
|
@@ -131,36 +245,38 @@ A virtual environment will be created/updated automatically.
|
|
|
131
245
|
|
|
132
246
|
[comment]: <> (✂✂✂ auto generated dev help start ✂✂✂)
|
|
133
247
|
```
|
|
134
|
-
usage: ./dev-cli.py [-h] {coverage,install,lint,mypy,nox,pip-audit,publish,shell-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
│
|
|
144
|
-
│ •
|
|
145
|
-
│ •
|
|
146
|
-
│ •
|
|
147
|
-
│ •
|
|
148
|
-
│ •
|
|
149
|
-
│ •
|
|
150
|
-
│ •
|
|
151
|
-
│
|
|
152
|
-
│
|
|
153
|
-
│ •
|
|
154
|
-
│ • update-
|
|
155
|
-
│
|
|
156
|
-
│
|
|
157
|
-
│
|
|
158
|
-
│
|
|
159
|
-
│
|
|
160
|
-
│
|
|
161
|
-
│
|
|
162
|
-
│
|
|
163
|
-
|
|
248
|
+
usage: ./dev-cli.py [-h] {coverage,install,lint,mypy,nox,pip-audit,publish,shell-
|
|
249
|
+
completion,test,update,update-readme-history,update-test-snapshot-files,version}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
╭─ options ──────────────────────────────────────────────────────────────────────────────╮
|
|
254
|
+
│ -h, --help show this help message and exit │
|
|
255
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
256
|
+
╭─ subcommands ──────────────────────────────────────────────────────────────────────────╮
|
|
257
|
+
│ (required) │
|
|
258
|
+
│ • coverage Run tests and show coverage report. │
|
|
259
|
+
│ • install Install requirements and 'mposcli' via pip as editable. │
|
|
260
|
+
│ • lint Check/fix code style by run: "ruff check --fix" │
|
|
261
|
+
│ • mypy Run Mypy (configured in pyproject.toml) │
|
|
262
|
+
│ • nox Run nox │
|
|
263
|
+
│ • pip-audit Run pip-audit check against current requirements files │
|
|
264
|
+
│ • publish Build and upload this project to PyPi │
|
|
265
|
+
│ • shell-completion │
|
|
266
|
+
│ Setup shell completion for this CLI (Currently only for bash shell) │
|
|
267
|
+
│ • test Run unittests │
|
|
268
|
+
│ • update Update dependencies (uv.lock) and git pre-commit hooks │
|
|
269
|
+
│ • update-readme-history │
|
|
270
|
+
│ Update project history base on git commits/tags in README.md Will be │
|
|
271
|
+
│ exited with 1 if the README.md was updated otherwise with 0. │
|
|
272
|
+
│ │
|
|
273
|
+
│ Also, callable via e.g.: │
|
|
274
|
+
│ python -m cli_base update-readme-history -v │
|
|
275
|
+
│ • update-test-snapshot-files │
|
|
276
|
+
│ Update all test snapshot files (by remove and recreate all snapshot │
|
|
277
|
+
│ files) │
|
|
278
|
+
│ • version Print version and exit │
|
|
279
|
+
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
164
280
|
```
|
|
165
281
|
[comment]: <> (✂✂✂ auto generated dev help end ✂✂✂)
|
|
166
282
|
|
|
@@ -169,7 +285,15 @@ usage: ./dev-cli.py [-h] {coverage,install,lint,mypy,nox,pip-audit,publish,shell
|
|
|
169
285
|
|
|
170
286
|
[comment]: <> (✂✂✂ auto generated history start ✂✂✂)
|
|
171
287
|
|
|
172
|
-
* [
|
|
288
|
+
* [v0.3.0](https://github.com/jedie/mposcli/compare/v0.2.0...v0.3.0)
|
|
289
|
+
* 2026-02-18 - Add "update" beside "update-submodules"
|
|
290
|
+
* 2026-02-17 - Update requirements
|
|
291
|
+
* 2026-02-16 - update README
|
|
292
|
+
* [v0.2.0](https://github.com/jedie/mposcli/compare/v0.1.0...v0.2.0)
|
|
293
|
+
* 2026-02-16 - New CLI command: "cp" with convenience features.
|
|
294
|
+
* 2026-02-16 - New command: "flash" with file selector
|
|
295
|
+
* 2026-02-16 - Update README.md
|
|
296
|
+
* [v0.1.0](https://github.com/jedie/mposcli/compare/1695026...v0.1.0)
|
|
173
297
|
* 2026-02-16 - Add "update-submodules" command
|
|
174
298
|
* 2026-02-16 - Add "build" command
|
|
175
299
|
* 2026-02-16 - CLI command: "run-desktop"
|