mcuctl 0.1.7.dev8__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.
- mcuctl-0.1.7.dev8/LICENSE +21 -0
- mcuctl-0.1.7.dev8/PKG-INFO +77 -0
- mcuctl-0.1.7.dev8/README.md +50 -0
- mcuctl-0.1.7.dev8/VERSION +1 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/__init__.py +51 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/__main__.py +33 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/ble.py +675 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/boards.py +269 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/cli.py +3387 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/config.py +243 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/conpty.py +254 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/desktop_host.py +83 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/emu.py +253 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/espusb.py +321 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/firmware.py +2947 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/firmware_build.py +485 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/firmware_download.py +959 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/hold.py +1306 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/mdns.py +153 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/omip.py +196 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/package_search.py +481 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/panel.py +999 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/parentwatch.py +68 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/pwa.py +655 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/py.typed +0 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/rawpaste.py +516 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/sidecar.py +5587 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/uf2.py +496 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webflash.py +694 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webrepl.py +858 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/app.css +37 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/app.js +81 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/codicons/codicon.css +708 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/codicons/codicon.ttf +0 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/ftp.css +535 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/ftp.js +876 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/icons/icon-192.png +0 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/icons/icon-512.png +0 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/icons/icon.svg +1 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/index.html +165 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/manifest.webmanifest +16 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/webui/sw.js +52 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl/wifiboard.py +497 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/PKG-INFO +77 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/SOURCES.txt +49 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/dependency_links.txt +1 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/entry_points.txt +2 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/requires.txt +10 -0
- mcuctl-0.1.7.dev8/cli/src/mcuctl.egg-info/top_level.txt +1 -0
- mcuctl-0.1.7.dev8/pyproject.toml +72 -0
- mcuctl-0.1.7.dev8/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brad Barnett
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcuctl
|
|
3
|
+
Version: 0.1.7.dev8
|
|
4
|
+
Summary: MicroPython and CircuitPython board tools: serial sessions, file transfer, REPL, package install, and firmware build/download/flash
|
|
5
|
+
Author: Brad Barnett
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/PyDevices/mcuctl
|
|
8
|
+
Project-URL: Issues, https://github.com/PyDevices/mcuctl/issues
|
|
9
|
+
Keywords: micropython,circuitpython,mpremote,circup,esp32,firmware,serial,repl
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: mpremote<1.30,>=1.28
|
|
18
|
+
Requires-Dist: pyserial<4,>=3.5
|
|
19
|
+
Requires-Dist: circup
|
|
20
|
+
Requires-Dist: esptool
|
|
21
|
+
Requires-Dist: bleak<4,>=1.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: build; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff; extra == "dev"
|
|
25
|
+
Requires-Dist: twine; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# mcuctl
|
|
29
|
+
|
|
30
|
+
mcuctl is the board tool for MicroPython-compatible and
|
|
31
|
+
CircuitPython-compatible boards: it moves files, runs code, opens the REPL,
|
|
32
|
+
installs packages and flashes firmware, from VS Code, from a browser tab or from
|
|
33
|
+
a terminal.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ mcuctl
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
That installs the `mcuctl` command and the browser interface (`python -m mcuctl`).
|
|
40
|
+
For VS Code, Cursor and other compatible editors, download `mcuctl-*.vsix` from the
|
|
41
|
+
[latest release](https://github.com/PyDevices/mcuctl/releases/latest) and run
|
|
42
|
+
**Extensions: Install from VSIX…**. [Install](docs/get-started/install.md) has
|
|
43
|
+
the details.
|
|
44
|
+
|
|
45
|
+
You don't need a board to try it. mcuctl can hold a desktop MicroPython
|
|
46
|
+
interpreter open the same way it holds a board:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
mcuctl hold start --spawn micropython
|
|
50
|
+
mcuctl hold ask -d micropython "import sys; print(sys.implementation.name, sys.implementation.version[:2])" --text
|
|
51
|
+
mcuctl hold ask -d micropython "print(sum(range(10)))" --text
|
|
52
|
+
mcuctl hold stop -d micropython
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
micropython (1, 30)
|
|
57
|
+
45
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`hold start` and `hold stop` also print their status as JSON. `-d micropython`
|
|
61
|
+
names the holder, in case a board is held too.
|
|
62
|
+
|
|
63
|
+
For a board, name its port instead: `mcuctl ls -d /dev/ttyACM0 /`, or `COM3` on
|
|
64
|
+
Windows.
|
|
65
|
+
|
|
66
|
+
## Code signing policy
|
|
67
|
+
|
|
68
|
+
The Windows installer will be signed. Free code signing provided by
|
|
69
|
+
[SignPath.io](https://about.signpath.io), certificate by
|
|
70
|
+
[SignPath Foundation](https://signpath.org). SignPath signs Windows only, so
|
|
71
|
+
the Linux `.deb` is not signed. Who builds, reviews and approves each signed
|
|
72
|
+
release, and what the app sends over the network, is in the
|
|
73
|
+
[code signing policy](CODE_SIGNING_POLICY.md).
|
|
74
|
+
|
|
75
|
+
[Docs](https://github.com/PyDevices/mcuctl/blob/main/docs/index.md) · [Examples](https://gallery.omnipython.org/) · [Roadmap](ROADMAP.md)
|
|
76
|
+
|
|
77
|
+
Made by [PyDevices](https://pydevices.com).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# mcuctl
|
|
2
|
+
|
|
3
|
+
mcuctl is the board tool for MicroPython-compatible and
|
|
4
|
+
CircuitPython-compatible boards: it moves files, runs code, opens the REPL,
|
|
5
|
+
installs packages and flashes firmware, from VS Code, from a browser tab or from
|
|
6
|
+
a terminal.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ mcuctl
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
That installs the `mcuctl` command and the browser interface (`python -m mcuctl`).
|
|
13
|
+
For VS Code, Cursor and other compatible editors, download `mcuctl-*.vsix` from the
|
|
14
|
+
[latest release](https://github.com/PyDevices/mcuctl/releases/latest) and run
|
|
15
|
+
**Extensions: Install from VSIX…**. [Install](docs/get-started/install.md) has
|
|
16
|
+
the details.
|
|
17
|
+
|
|
18
|
+
You don't need a board to try it. mcuctl can hold a desktop MicroPython
|
|
19
|
+
interpreter open the same way it holds a board:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
mcuctl hold start --spawn micropython
|
|
23
|
+
mcuctl hold ask -d micropython "import sys; print(sys.implementation.name, sys.implementation.version[:2])" --text
|
|
24
|
+
mcuctl hold ask -d micropython "print(sum(range(10)))" --text
|
|
25
|
+
mcuctl hold stop -d micropython
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
micropython (1, 30)
|
|
30
|
+
45
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`hold start` and `hold stop` also print their status as JSON. `-d micropython`
|
|
34
|
+
names the holder, in case a board is held too.
|
|
35
|
+
|
|
36
|
+
For a board, name its port instead: `mcuctl ls -d /dev/ttyACM0 /`, or `COM3` on
|
|
37
|
+
Windows.
|
|
38
|
+
|
|
39
|
+
## Code signing policy
|
|
40
|
+
|
|
41
|
+
The Windows installer will be signed. Free code signing provided by
|
|
42
|
+
[SignPath.io](https://about.signpath.io), certificate by
|
|
43
|
+
[SignPath Foundation](https://signpath.org). SignPath signs Windows only, so
|
|
44
|
+
the Linux `.deb` is not signed. Who builds, reviews and approves each signed
|
|
45
|
+
release, and what the app sends over the network, is in the
|
|
46
|
+
[code signing policy](CODE_SIGNING_POLICY.md).
|
|
47
|
+
|
|
48
|
+
[Docs](https://github.com/PyDevices/mcuctl/blob/main/docs/index.md) · [Examples](https://gallery.omnipython.org/) · [Roadmap](ROADMAP.md)
|
|
49
|
+
|
|
50
|
+
Made by [PyDevices](https://pydevices.com).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.7.dev8
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
"""mcuctl — MicroPython and CircuitPython board tools.
|
|
6
|
+
|
|
7
|
+
Importing this package has no side effects: nothing is spawned, no socket is
|
|
8
|
+
opened, and no file is written. Entry points live in `mcuctl.cli`,
|
|
9
|
+
`mcuctl.sidecar` and `mcuctl.firmware`.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
__all__ = ["__version__"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _resolve_version() -> str:
|
|
20
|
+
"""Version of this copy of mcuctl.
|
|
21
|
+
|
|
22
|
+
Two deployments have to agree. A pip install of ``mcuctl`` carries
|
|
23
|
+
real distribution metadata. The copy vendored inside the VSIX never gets
|
|
24
|
+
installed, so it ships the repository's root VERSION file alongside the
|
|
25
|
+
package instead. Neither path generates a source file, so nothing can drift
|
|
26
|
+
from the canonical VERSION.
|
|
27
|
+
"""
|
|
28
|
+
try:
|
|
29
|
+
from importlib.metadata import version
|
|
30
|
+
|
|
31
|
+
return version("mcuctl")
|
|
32
|
+
except Exception: # PackageNotFoundError, or no metadata at all
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
here = Path(__file__).resolve()
|
|
36
|
+
candidates = (
|
|
37
|
+
here.with_name("VERSION"), # staged next to the vendored package
|
|
38
|
+
here.parents[3] / "VERSION", # cli/src/mcuctl/__init__.py -> repo root
|
|
39
|
+
)
|
|
40
|
+
for candidate in candidates:
|
|
41
|
+
try:
|
|
42
|
+
text = candidate.read_text(encoding="utf-8").strip()
|
|
43
|
+
except OSError:
|
|
44
|
+
continue
|
|
45
|
+
if text:
|
|
46
|
+
return text
|
|
47
|
+
|
|
48
|
+
return "0.0.0+unknown"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
__version__ = _resolve_version()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
"""``python -m mcuctl`` — the CLI, or the local PWA with no arguments.
|
|
6
|
+
|
|
7
|
+
``python -m mcuctl <subcommand> ...`` behaves exactly like the ``mcuctl``
|
|
8
|
+
console script. ``python -m mcuctl`` with no arguments launches the local PWA
|
|
9
|
+
(file transfer + REPL, served over loopback) instead of the CLI's usual
|
|
10
|
+
"the following arguments are required" error, since a bare invocation from a
|
|
11
|
+
terminal is far more likely to mean "open the app" than "show me the error."
|
|
12
|
+
The ``mcuctl`` console script's no-argument behavior is unchanged.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import sys
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main() -> None:
|
|
21
|
+
if len(sys.argv) == 1:
|
|
22
|
+
from .pwa import main as pwa_main
|
|
23
|
+
|
|
24
|
+
pwa_main([])
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
from .cli import main as cli_main
|
|
28
|
+
|
|
29
|
+
cli_main()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
main()
|