{"id":16471874,"url":"https://github.com/abranhe/lupe","last_synced_at":"2026-03-27T04:31:57.575Z","repository":{"id":46956529,"uuid":"140646519","full_name":"abranhe/lupe","owner":"abranhe","description":"The CLI helper  you need 🥭 ","archived":false,"fork":false,"pushed_at":"2021-09-20T14:40:42.000Z","size":29,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-16T04:03:52.038Z","etag":null,"topics":["cli","command-line","pip","python"],"latest_commit_sha":null,"homepage":"https://p.abranhe.com/lupe","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/abranhe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"abranhe","open_collective":"abranhe","custom":"https://cash.me/$abranhe"}},"created_at":"2018-07-12T01:47:28.000Z","updated_at":"2021-09-20T14:40:45.000Z","dependencies_parsed_at":"2022-09-02T20:12:25.149Z","dependency_job_id":null,"html_url":"https://github.com/abranhe/lupe","commit_stats":null,"previous_names":["abranhe/lupe","abrahamhba/lupe","abrahamcalf/lupe"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/abranhe/lupe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Flupe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Flupe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Flupe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Flupe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abranhe","download_url":"https://codeload.github.com/abranhe/lupe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Flupe/sbom","scorecard":{"id":161601,"data":{"date":"2025-08-11","repo":{"name":"github.com/abranhe/lupe","commit":"95dbb438667c3316df0d189712aff6b30598d5c9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/25 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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/abranhe/lupe/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/abranhe/lupe/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/abranhe/lupe/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/abranhe/lupe/publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:19","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/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":"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":"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":"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":"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":"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 'master'"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T13:37:29.201Z","repository_id":46956529,"created_at":"2025-08-16T13:37:29.205Z","updated_at":"2025-08-16T13:37:29.205Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31019451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: 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":["cli","command-line","pip","python"],"created_at":"2024-10-11T12:15:04.332Z","updated_at":"2026-03-27T04:31:57.541Z","avatar_url":"https://github.com/abranhe.png","language":"Python","funding_links":["https://patreon.com/abranhe","https://opencollective.com/abranhe","https://cash.me/$abranhe"],"categories":[],"sub_categories":[],"readme":"# WIP\n\n\u003e Currently in development.\n\n\u003cp align=\"center\"\u003e\n  \t\u003ca href=\"https://pypi.org/project/lupe\"\u003e\n\t\t\t\u003cimg src=\"https://cdn.abranhe.com/projects/lupe/top.png\"\u003e\n\t\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\tSave time building command-line apps with \u003cb\u003e\u003ca href=\"https://pypi.org/project/lupe\"\u003eLUPE\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/abranhe/lupe/actions/workflows/main.yml\"\u003e\n\t\t\u003cimg src=\"https://github.com/abranhe/lupe/actions/workflows/main.yml/badge.svg\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://app.travis-ci.com/github/abranhe/lupe\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/travis/com/abranhe/lupe.svg?logo=travis\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://pypi.org/project/lupe\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/pypi/v/lupe\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/abranhe/lupe/blob/master/license\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/license/abranhe/lupe.svg\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n\n```console\n$ pip install lupe\n```\n\n## Features\n\n- Parses arguments\n- Converts flags snake_case for easier use\n- Negates flags when using the `--no-` prefix\n- Outputs version when `-v`, `--version`\n- Outputs description and supplied help text when `-h`, `--help`\n\n## Usage\n\nOn the command line:\n\n```console\n$ python main.py dinner --mango --no-banana\n```\n\nOn the app:\n\n```python\n#!/usr/bin/python\nimport lupe\n\nhelp = \"\"\"\nUsage foo [input]\n\nOptions\n  -h, --help      Show this help message and exit\n  -v, --version   Show version and exit\n  -m, --mango     Include a mango\n\nExamples\n\n  $ main.py dinner --mango --no-banana\n\"\"\"\n\ncli = lupe(help, {\n    'flags': {\n        'mango': {\n            'type': 'boolean',\n            'alias': 'm'\n        },\n        'banana': {\n            'type': 'boolean',\n        }\n    }\n})\n\nprint(cli.flags)\n# {'mango': True, 'banana': False}\n\nprint(cli.inputs)\n# ['dinner']\n```\n\n## API\n\n### lupe(help_message, options?)\n\n### lupe(options)\n\nReturns an `object` with:\n\n- `inputs` _(Array)_ - Non-flag arguments\n- `flags` _(Object)_ - Flags converted to snake_case excluding aliases\n- `help` _(string)_ - The help text used with `--help`\n- `show_help([exit_code=2])` _(Function)_ - Show the help text and exit with `exit_code`\n- `show_version()` _(Function)_ - Show the version text and exit\n\n#### help_message\n\nType: `string`\n\n#### options\n\nType: `object`\n\nShortcut for the `help` option.\n\n##### version\n\nType: `string`\n\nVersion of the command-line application.\n\n##### flags\n\nType: `object`\n\nDefine argument flags.\n\nThe key is the flag name in snake_case and the value is an object with any of:\n\n- `type`: Type of value. (Possible values: `string` `boolean` `number`)\n- `alias`: Usually used to define a short flag alias.\n- `default`: Default value when the flag is not specified.\n- `required`: Determine if the flag is required. (Default: false)\n\nNote that flags are always defined using a snake_case key (`my_key`), but will match arguments in kebab-case (`--my-key`).\n\nExample:\n\n```python\nflags = {\n\t'unicorn': {\n\t\t'type': 'string',\n\t\t'alias': 'u',\n\t\t'default': ['rainbow', 'cat'],\n\t\t'required': True,\n\t}\n}\n```\n\n## Credit\n\nBased on [meow](https://github.com/sindresorhus/meow) from [@sindresorhus](https://github.com/sindresorhus)\n\n## License\n\nMIT © [Abraham Hernandez](https://github.com/abranhe)\n\n\u003cp align=\"center\"\u003e\n  \t\u003ca href=\"https://pypi.org/project/lupe\"\u003e\n\t\t\t\u003cimg src=\"https://cdn.abranhe.com/projects/lupe/logo.svg\" width=\"30\"\u003e\n\t\t\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Flupe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabranhe%2Flupe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Flupe/lists"}