summaryrefslogtreecommitdiffstatshomepage
path: root/docs/reference
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-09-29 00:45:34 +1000
committerJim Mussared <jim.mussared@gmail.com>2022-10-01 22:44:24 +1000
commit12ca918eb2ac062f6e6df0772e528eef9d050cb7 (patch)
tree49be20380cce7d51d63a9dbf03b8628c622f1cb3 /docs/reference
parent68d094358ec71aa8cdec97e9e6fc3c6d46dedfbf (diff)
downloadmicropython-12ca918eb2ac062f6e6df0772e528eef9d050cb7.tar.gz
micropython-12ca918eb2ac062f6e6df0772e528eef9d050cb7.zip
tools/mpremote: Add `mpremote mip install` to install packages.
This supports the same package sources as the new `mip` tool. - micropython-lib (by name) - http(s) & github packages with json description - directly downloading a .py/.mpy file The version is specified with an optional `@version` on the end of the package name. The target dir, index, and mpy/no-mpy can be set through command line args. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/mpremote.rst14
-rw-r--r--docs/reference/packages.rst16
2 files changed, 22 insertions, 8 deletions
diff --git a/docs/reference/mpremote.rst b/docs/reference/mpremote.rst
index e3902f8e5d..bb0686237a 100644
--- a/docs/reference/mpremote.rst
+++ b/docs/reference/mpremote.rst
@@ -146,6 +146,14 @@ The full list of supported commands are:
variable ``$EDITOR``). If the editor exits successfully, the updated file will
be copied back to the device.
+- install packages from :term:`micropython-lib` (or GitHub) using the ``mip`` tool:
+
+ .. code-block:: bash
+
+ $ mpremote mip install <packages...>
+
+ See :ref:`packages` for more information.
+
- mount the local directory on the remote device:
.. code-block:: bash
@@ -269,3 +277,9 @@ Examples
mpremote cp -r dir/ :
mpremote cp a.py b.py : + repl
+
+ mpremote mip install aioble
+
+ mpremote mip install github:org/repo@branch
+
+ mpremote mip install --target /flash/third-party functools
diff --git a/docs/reference/packages.rst b/docs/reference/packages.rst
index 0c049d1fb2..1ddbecb582 100644
--- a/docs/reference/packages.rst
+++ b/docs/reference/packages.rst
@@ -78,17 +78,17 @@ The :term:`mpremote` tool also includes the same functionality as ``mip`` and
can be used from a host PC to install packages to a locally connected device
(e.g. via USB or UART)::
- $ mpremote install pkgname
- $ mpremote install pkgname@x.y
- $ mpremote install http://example.com/x/y/foo.py
- $ mpremote install github:org/repo
- $ mpremote install github:org/repo@branch-or-tag
+ $ mpremote mip install pkgname
+ $ mpremote mip install pkgname@x.y
+ $ mpremote mip install http://example.com/x/y/foo.py
+ $ mpremote mip install github:org/repo
+ $ mpremote mip install github:org/repo@branch-or-tag
The ``--target=path``, ``--no-mpy``, and ``--index`` arguments can be set::
- $ mpremote install --target=/flash/third-party pkgname
- $ mpremote install --no-mpy pkgname
- $ mpremote install --index https://host/pi pkgname
+ $ mpremote mip install --target=/flash/third-party pkgname
+ $ mpremote mip install --no-mpy pkgname
+ $ mpremote mip install --index https://host/pi pkgname
Installing packages manually
----------------------------