{"id":13802049,"url":"https://github.com/jeffmakes/mpy-miniterm","last_synced_at":"2025-05-13T12:32:18.565Z","repository":{"id":50125875,"uuid":"135500057","full_name":"jeffmakes/mpy-miniterm","owner":"jeffmakes","description":"Tool for seamless serial debug and file synchronisation with MicroPython devices via the serial REPL","archived":false,"fork":false,"pushed_at":"2024-01-16T17:00:13.000Z","size":55,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T17:51:08.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffmakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-05-30T21:36:26.000Z","updated_at":"2024-07-15T06:34:06.000Z","dependencies_parsed_at":"2024-01-29T19:30:22.189Z","dependency_job_id":"55f74d74-c067-4980-9ef0-462e6ee03623","html_url":"https://github.com/jeffmakes/mpy-miniterm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffmakes%2Fmpy-miniterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffmakes%2Fmpy-miniterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffmakes%2Fmpy-miniterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffmakes%2Fmpy-miniterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffmakes","download_url":"https://codeload.github.com/jeffmakes/mpy-miniterm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253942573,"owners_count":21988084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:34.269Z","updated_at":"2025-05-13T12:32:18.284Z","avatar_url":"https://github.com/jeffmakes.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"readme":"# mpy-miniterm v0.1\n\nTool for seamless serial debug and file synchronisation with MicroPython devices via the serial REPL. \n\nmpy-miniterm allows seamless transitions between serial debugging and file download via the MicroPython REPL, and is intended to provide a smoother user experience than ampy, mpfshell and others. It is particularly useful for targets without USB mass storage functionality, like the ESP-32/8266 boards.\n\nmpy-miniterm is based on  pySerial miniterm. There is an additional menu option for synchronising a source folder on the host to the MicroPython device's filesystem over the serial REPL. mpy-miniterm hashes the files to decide which ones to synchronise, so no time is wasted downloading unchanged files.\n\nmpy-miniterm makes use of a slightly modified version of the ReplControl class from Nick Moore (part of https://github.com/nickzoic/mpy-utils)\n\n## Usage\nSpecify your local folder of source code with the --sync-dir command line option. Then with mpy-miniterm running and connected to your board, press Ctrl+T Ctrl+G to syncronise the code onto the MicroPython target device. After the code is synchronised, the REPL will be active again, and you can reset and run your new code by pressing CTRL-D as usual.\n\nIf the --delete option is specified, files on your MicroPython board that aren't in your source folder will be automatically deleted from the device.\n\n## Dependencies\n\n* [https://pypi.org/project/pyserial/](pyserial)\n\n## Example\n\n# Set up virtualenv (optional)\n```shell\n$ virtualenv venv\nNew python executable in venv/bin/python\nInstalling setuptools, pip, wheel...done.\n$ source venv/bin/activate\n(venv) $\n```\n\n#### Install dependencies\n```shell\n(venv) $ pip install -r requirements.txt\nCollecting pyserial (from -r requirements.txt (line 1))\n  Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl\n  Installing collected packages: pyserial\n  Successfully installed pyserial-3.4\n```\n\n\n#### Set up a new hello world program\n```shell\n$ mkdir src\n$ touch src/boot.py\n$ echo 'print(\"Hello world!\")' \u003e src/main.py\n$\n```\n\n#### Run mpy-miniterm with syncing, and deleting of files that are only on the MicroPython side.\n```shell\n(venv) $ python mpy-miniterm.py /dev/tty.SLAB_USBtoUART --sync-dir src/ --delete\n--- Miniterm on /dev/tty.SLAB_USBtoUART  115200,8,N,1 ---\n--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---\n\n\u003e\u003e\u003e\n\u003e\u003e\u003e\n\n\u003cpress ctrl-T, then ctrl-G to trigger syncing\u003e\n\n--- Synchronising MicroPython code ---\ncopying   'src/boot.py' =\u003e 'boot.py'\ncopying   'src/main.py' =\u003e 'main.py'\n\nMicroPython v1.9.4-8-ga9a3caad0 on 2018-05-11; ESP module with ESP8266\nType \"help()\" for more information.\n\u003e\u003e\u003e\n\n\u003cpress ctrl-D to restart MicroPython\u003e\n\nPYB: soft reboot\n#7 ets_task(40100130, 3, 3fff83ec, 4)\nHello world!\nMicroPython v1.9.4-8-ga9a3caad0 on 2018-05-11; ESP module with ESP8266\nType \"help()\" for more information.\n\u003e\u003e\u003e\n```\n\n#### Exiting mpy-miniterm\n```shell\n\u003e\u003e\u003e\n\n\u003cpress ctrl-]\u003e\n\n--- exit ---\n(venv) $\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffmakes%2Fmpy-miniterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffmakes%2Fmpy-miniterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffmakes%2Fmpy-miniterm/lists"}