{"id":21107497,"url":"https://github.com/cjhdev/lapel","last_synced_at":"2025-03-14T09:22:24.404Z","repository":{"id":148216395,"uuid":"453673418","full_name":"cjhdev/lapel","owner":"cjhdev","description":"A CLI shell for embedded applications","archived":false,"fork":false,"pushed_at":"2022-01-30T12:59:56.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T03:42:35.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cjhdev.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}},"created_at":"2022-01-30T12:26:00.000Z","updated_at":"2022-01-30T13:03:20.000Z","dependencies_parsed_at":"2023-05-19T11:00:22.008Z","dependency_job_id":null,"html_url":"https://github.com/cjhdev/lapel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjhdev%2Flapel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjhdev%2Flapel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjhdev%2Flapel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjhdev%2Flapel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjhdev","download_url":"https://codeload.github.com/cjhdev/lapel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551442,"owners_count":20309346,"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-11-20T00:40:17.001Z","updated_at":"2025-03-14T09:22:24.359Z","avatar_url":"https://github.com/cjhdev.png","language":"C++","readme":"Lapel\n=====\n\nLapel is a CLI shell suitable for porting to a microcontroller or embedding within a general purpose application. It can be made to work over any reliable serial interface.\n\n## Features\n\n- multi-line editing\n- line completions (tab)\n- line history (up/down)\n- argument tokenizer supporting quotes and escape characters\n- getopt argument parser with support for long and short options\n- users are optional\n    - optional out-of-band login (e.g. if transport layer provides authentication)\n    - optional username and pasword prompt\n    - role based access control\n- multiple shell instances are possible\n- command handlers may yield to wait for input without blocking (and can be 'terminated' by ctrl-c)\n\n## Limitations / Caveats\n\n- requires a C++ compiler (C++11 and up)\n- no redirection, pipes, scripts, and other sophisticated features you might expect in a real shell\n- no concept of file system (for now)\n- ascii only\n- line buffers are allocated from heap\n\n## Builtin Commands\n\n- `help`\n- `clear`: clear screen\n- `resize`: specify the size or ask shell to discover using DSR control code\n- `logout`: logout user\n- `echo`: echo back the arguments\n\n## Examples\n\n- [raw terminal](example/terminal_example.cpp)\n- [Arduino](wrapper/arduino)\n\n## Serial Terminal Compatibility\n\nLapel has been confirmed to work with the following serial terminals:\n\n- GNU Screen\n- Putty\n\n## Building\n\n- create `lapel_config.h` somewhere in search path (lapel source includes this file)\n- add `include` to search path\n- compile sources in `src`\n\nThere are some preprocessor options which can be defined in `lapel_config.h`:\n\n### `#define LAPEL_DEBUG(...)`\n\nPrint debug messages.\n\n### `#define LAPEL_ERROR(...)`\n\nPrint error messages.\n\n### `#define LAPEL_ASSERT(X)`\n\nImplement assert.\n\n## License\n\nSee LICENSE and NOTICE files.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjhdev%2Flapel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjhdev%2Flapel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjhdev%2Flapel/lists"}