{"id":20238385,"url":"https://github.com/basilfx/arduino-commandline","last_synced_at":"2025-08-23T09:08:57.200Z","repository":{"id":10049375,"uuid":"12097259","full_name":"basilfx/Arduino-CommandLine","owner":"basilfx","description":"No-nonsense serial command line interpreter.","archived":false,"fork":false,"pushed_at":"2015-08-02T00:01:53.000Z","size":119,"stargazers_count":27,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T19:56:39.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/basilfx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-14T01:38:39.000Z","updated_at":"2024-06-03T09:29:56.000Z","dependencies_parsed_at":"2022-08-26T10:31:24.534Z","dependency_job_id":null,"html_url":"https://github.com/basilfx/Arduino-CommandLine","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/basilfx/Arduino-CommandLine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2FArduino-CommandLine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2FArduino-CommandLine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2FArduino-CommandLine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2FArduino-CommandLine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basilfx","download_url":"https://codeload.github.com/basilfx/Arduino-CommandLine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basilfx%2FArduino-CommandLine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746302,"owners_count":24813556,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-14T08:33:55.480Z","updated_at":"2025-08-23T09:08:57.173Z","avatar_url":"https://github.com/basilfx.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CommandLine v2.1.0\nNo-nonsense serial command line interpreter for Arduino.\n\n## Installation\n* [Download](https://github.com/basilfx/Arduino-CommandLine/archive/master.zip) or clone this repository to `Arduino/libraries/CommandLine`.\n* Restart Arduino IDE.\n* Check the examples.\n\n## Howto\nA `CommandLine` instance wraps a `Serial` instance. The `CommandLine::update` method should be invoked to run the read, print and eval loop.\n\nCommands can be added with `CommandLine::add` by passing a `Command` structure that takes a command and a callback. Alternatively, you can add a command on-the-fly. In that case, it will allocate memory via `malloc`, but you cannot remove or disable a command afterwards.\n\nA command can be a single word only (no spaces). It will be tokenized using `strtok` using spaces. If an input string matches a command (first match), the attached callback will be invoked with a `char *` to the rest of the arguments (should be parsed using `strtok`).\n\nBasic support for history is added in version 2.1.0.\n\n## Configuration\nThis library shouldn't be the biggest part of your flash and/or memory footprint. Therefore, several parameters and functions that can be toggled or modified to improve memory usage. Just define them before `CommandLine.h` is included.\n\n* `COMMANDLINE_BUFFER` \u0026mdash; number of characters to buffer for one line. Default is 32 characters.\n* `COMMANDLINE_COUNT` \u0026mdash; number of commands that can be added or remove (including on-the-fly ones). Default is 8.\n* `COMMANDLINE_PRE_POST` \u0026mdash; if defined, enable support for pre and post callback.\n* `COMMANDLINE_HISTORY` \u0026mdash; number of commands to keep in history (for up/down key support). Default is 2.\n\n### Note 1\nDue to the limitations (or design choices) of the Arduino IDE and its build process, the above defines cannot be overridden when using the Arduino IDE. There are three options:\n\n* Add `CommandLine.cpp` and `CommandLine.h` to your project and modify `CommandLine.h` as desired. Make sure you remove the library from your `Arduino/libraries/` folder.\n* Modify the `*.build.extra_flags` property in `boards.txt` to add compiler defines (e.g. `-DCOMMANDLINE_PRE_POST`).\n* Use a Makefile to compile your sketch and add the desired defines (e.g. `CXX_FLAGS=-DCOMMANDLINE_PRE_POST`).\n\n### Note 2\nEnabling history support may cause memory issues. When enabled, it will allocate `N * COMMANDLINE_BUFFER` bytes, so use with caution.\n\n## License\nSee the `LICENSE` file (MIT license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilfx%2Farduino-commandline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasilfx%2Farduino-commandline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasilfx%2Farduino-commandline/lists"}