{"id":37070629,"url":"https://github.com/pyl1b/enhterm","last_synced_at":"2026-01-14T08:14:57.608Z","repository":{"id":57426464,"uuid":"220601875","full_name":"pyl1b/enhterm","owner":"pyl1b","description":"enhterm is Cmd-based framework for writing line-oriented command interpreters.","archived":false,"fork":false,"pushed_at":"2021-12-23T17:06:37.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2025-10-27T09:49:56.796Z","etag":null,"topics":["cmd","python","shell"],"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/pyl1b.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}},"created_at":"2019-11-09T06:32:32.000Z","updated_at":"2021-12-23T17:06:40.000Z","dependencies_parsed_at":"2022-09-11T14:02:12.347Z","dependency_job_id":null,"html_url":"https://github.com/pyl1b/enhterm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pyl1b/enhterm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyl1b%2Fenhterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyl1b%2Fenhterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyl1b%2Fenhterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyl1b%2Fenhterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyl1b","download_url":"https://codeload.github.com/pyl1b/enhterm/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyl1b%2Fenhterm/sbom","scorecard":{"id":751530,"data":{"date":"2025-08-11","repo":{"name":"github.com/pyl1b/enhterm","commit":"b4eacc25ef1bdfecab9a662b5269d016070d4e6b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/pyl1b/enhterm/python-publish.yml/v2?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pyl1b/enhterm/python-publish.yml/v2?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:29","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'v2'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T20:31:22.200Z","repository_id":57426464,"created_at":"2025-08-22T20:31:22.201Z","updated_at":"2025-08-22T20:31:22.201Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cmd","python","shell"],"created_at":"2026-01-14T08:14:56.903Z","updated_at":"2026-01-14T08:14:57.600Z","avatar_url":"https://github.com/pyl1b.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# enhterm\n\nenhterm is an [open source](https://github.com/pyl1b/enhterm.git),\nMIT licensed, [Cmd-based](https://docs.python.org/3/library/cmd.html)\nframework for writing command interpreters.\n\n[![Build Status](https://travis-ci.org/pyl1b/enhterm.svg?branch=master)](https://travis-ci.org/pyl1b/enhterm)\n[![Documentation Status](https://readthedocs.org/projects/enhterm/badge/?version=latest)](https://enhterm.readthedocs.io/en/latest/?badge=latest)\n\nenhterm provides a class that extends \n[cmd.Cmd](https://docs.python.org/3/library/cmd.html) \nand which is also intended to be inherited by a user class,\nwith the end purpose being to create a shell.\n\nFunctionality provided by this package is split among mixins, allowing you\nto construct your own base class if EnhTerm is not suitable.\n\nAs with [cmd.Cmd](https://docs.python.org/3/library/cmd.html), the class\nconstructed as described above can be used like so:\n\n\n    from enhterm import EnhTerm\n\n    from enhterm.provider.parser.argparser import ArgParser\n    from enhterm.provider.parser.argparser.commands import register_commands\n    from enhterm.provider.stream_provider import StreamProvider\n\n    # The stream provider by default reads the input from console.\n    provider = StreamProvider()\n    \n    # The text entered by the user then needs to be interpreted.\n    # Here we use an interpreter based on argparse.\n    provider.parser = ArgParser(provider=provider)\n    subparsers = provider.parser.add_subparsers()\n    \n    # Add built-in commands.\n    register_commands(subparsers)\n\n    # Define you own handler.\n    def do_add(command, integers):\n        return sum(integers)\n\n    # Add this command to the argparse library.\n    parser_add = subparsers.add_parser('add')\n    parser_add.add_argument(\n         'integers', metavar='int', nargs='+', type=int,\n         help='integers to be summed (space separated list)')\n    parser_add.set_defaults(func=do_add)\n\n\n    # Construct the terminal.\n    class MyShell(EnhTerm):\n        \"\"\"\n        Simple terminal.\n        \n        Has a command that can add integers and another one\n        that quits the interpreter.\n        \"\"\"\n        def __init__(self):\n            super().__init__(providers=provider)\n\n\n    if __name__ == '__main__':\n        print(\"Type 'add 1 2 3 4 5 6 7 8 9' and you should get back 45\")\n        print(\"Type '-h' to get back the usage\")\n        MyShell().cmd_loop()\n\n\nInstall\n-------\n\n    pip install enhterm\n\nYou can also download/clone the source, in which case you have to:\n\n    git clone https://github.com/pyl1b/enhterm.git\n    python setup.py install\n        \nTo contribute a patch clone the repo, create a new branch, install in\ndevelop mode:\n        \n    python setup.py develop\n\nWhat is included\n----------------\n\nEach of the elements below are implemented in a distinct \"mixin\" class,\nwhich mean that you can create your own combination using EnhTerm class as\na template.\n\n### Command\n\nAllows python strings to be executed as if the user typed the input at the\nprompt. This is the base for executing commands in a file.\n\n### Exit\n\nProvides the `exit` command that terminates command loop.\n\n### Help\n\nProvides the `help` command which prints information about\nthe use of the command while accounting for custom commands \nand shortcuts.\n\n### Log Level\n\nAllows changing logging verbosity by issuing commands like \n`set loglevel debug`. \n\n### Macro\n\nCan record, remove, list and execute previously recorded commands.\n\n### Messages\n\nDoes not expose any commands but provides the class with a standardized\nway of issuing messages distinct from the logging mechanism.\n\n### Run\n\nAllows executing multiple commands from a string or from a file.\n\n### Sub-commands\n\nCommands are usually identified by using the first word the user types.\nThis mixin allows for a more natural way of issuing commands like \n`new macro` instead of `macro new`. Other mixins then add subcommands\nin their `__init__` method.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyl1b%2Fenhterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyl1b%2Fenhterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyl1b%2Fenhterm/lists"}