{"id":15170408,"url":"https://github.com/khalidbelk/microcli","last_synced_at":"2025-05-14T07:12:39.659Z","repository":{"id":238949436,"uuid":"798059415","full_name":"khalidbelk/microCLI","owner":"khalidbelk","description":"An easy-to-understand command line tool for the BBC micro:bit  🔌 ","archived":false,"fork":false,"pushed_at":"2025-03-17T03:14:01.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T11:15:15.964Z","etag":null,"topics":["bbc-microbit","embedded","iot","microbit","micropython","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khalidbelk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-09T02:34:47.000Z","updated_at":"2025-03-17T03:14:05.000Z","dependencies_parsed_at":"2024-05-09T04:27:47.621Z","dependency_job_id":"4d8bdd44-e074-4e59-8454-5d2baa6080df","html_url":"https://github.com/khalidbelk/microCLI","commit_stats":null,"previous_names":["khalidbelk/microcli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidbelk%2FmicroCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidbelk%2FmicroCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidbelk%2FmicroCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidbelk%2FmicroCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalidbelk","download_url":"https://codeload.github.com/khalidbelk/microCLI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092836,"owners_count":22013294,"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":["bbc-microbit","embedded","iot","microbit","micropython","python"],"created_at":"2024-09-27T08:02:13.743Z","updated_at":"2025-05-14T07:12:34.648Z","avatar_url":"https://github.com/khalidbelk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroCLI 🔌\n\nThis project was built to facilitate the process of interacting directly with your **BBC micro:bit**'s MicroPython filesystem without tools like MakeCode or Python Editor.\nIt's built on top of [Microfs](https://github.com/ntoll/microfs), which has made the process easier.\n\n## Requirements\n\n- Python 3.11\n\n## Usage\n\n**Install dependencies** with :\n\n`\n    pip install -r requirements.txt\n`\n\n**Execute** the command:\n```\n  make\n```\n\n**Use** the program like this:\n```\n./microCLI [-ls | -up | -save | -rm | -rename | -show | -v | --version | -h | --help] \u003cFILENAME\u003e \u003cNEWNAME\u003e\nDESCRIPTION:\n\n    ./microCLI                      : run your main.py file on the micro:bit. The file should be located at the root (same level as the microCLI).\n\n    -h | --help                     : display this message and exit.\n    -ls                             : show the files currently on the micro:bit filesystem.\n    -up \u003cFILENAME\u003e \u003cNEWNAME\u003e        : upload a specific file into the micro:bit. Needs the path of the source file. Accepts an optional argument to name the file you want to upload differently.\n    -save \u003cFILENAME\u003e \u003cNEWNAME\u003e      : save a file from the micro:bit to your device. The file name is required. You can optionally specify a new name for the file you want to save.\n    -rm \u003cFILENAME\u003e                  : delete a file from the micro:bit.\n    -rename \u003cFILENAME\u003e \u003cNEWNAME\u003e    : renames a file directly into the micro:bit. Needs the name of the file you want to rename and the new name. E.g.: -rename hello.py main.py\n    -show \u003cFILENAME\u003e                : show the content of a file on the micro:bit (similar to Unix 'cat' command)\n    -v | --version                  : shows the MicroPython version and some information about the connected micro:bit\n\n```\n\n## Why ?\n\nI was looking for a way to test stuff directly on my micro:bit. After doing some research, I found out that there weren't many options to run Python code on it, aside from the MakeCode / Python Editor online tools. I eventually found a VS Code extension that did the job, but having to use the command palette to navigate every couple of minutes was a hassle (search for the right text to click on...etc), then I found out it was using MicroFS under the hood, so I thought that would be a good starting point to create an easy way to test my code via terminal. While MicroFS is solid, the original repository was not so user-friendly for someone who would just like to quickly run his code into the device, since it's more focused on its pip package 'ufs', which is understandable, but I wanted something more straightforward and simpler.\n\nSo I decided to create something that would suit my needs and make it simpler for others who might be in the same situation.\n\n\nMain advantages:\n\n- Quick Setup: Use a Makefile to build the CLI executable, focusing only on the commands you need.\n- Easy Testing: Apply changes directly to your micro:bit's main.py file with a single command: **./microCLI**\n- More intuitive usage \u0026 enhanced message.\n- More recent \u0026 maintained.\n- Includes additional features such as file renaming and file content display (maybe more to be added).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidbelk%2Fmicrocli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalidbelk%2Fmicrocli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidbelk%2Fmicrocli/lists"}