{"id":23701000,"url":"https://github.com/lennetech/gluegun-menu","last_synced_at":"2026-02-21T04:01:12.165Z","repository":{"id":35145469,"uuid":"212632763","full_name":"lenneTech/gluegun-menu","owner":"lenneTech","description":"Menu for gluegun CLIs","archived":false,"fork":false,"pushed_at":"2025-05-09T10:29:16.000Z","size":738,"stargazers_count":28,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T21:55:31.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/lenneTech.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-03T16:59:10.000Z","updated_at":"2025-08-30T19:57:22.000Z","dependencies_parsed_at":"2025-09-03T05:32:17.374Z","dependency_job_id":"b7f10161-91ea-4475-8345-6a96f9db5231","html_url":"https://github.com/lenneTech/gluegun-menu","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lenneTech/gluegun-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenneTech%2Fgluegun-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenneTech%2Fgluegun-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenneTech%2Fgluegun-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenneTech%2Fgluegun-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenneTech","download_url":"https://codeload.github.com/lenneTech/gluegun-menu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenneTech%2Fgluegun-menu/sbom","scorecard":{"id":584247,"data":{"date":"2025-08-11","repo":{"name":"github.com/lenneTech/gluegun-menu","commit":"7310f1f4313272d99b3a965248640a6989b90631"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"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":"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":"Code-Review","score":2,"reason":"Found 2/10 approved changesets -- score normalized to 2","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/build.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":"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/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/lenneTech/gluegun-menu/publish.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:22","Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:20","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand 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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 2 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"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:00:21.131Z","repository_id":35145469,"created_at":"2025-08-20T20:00:21.131Z","updated_at":"2025-08-20T20:00:21.131Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-12-30T09:31:25.623Z","updated_at":"2026-02-21T04:01:12.076Z","avatar_url":"https://github.com/lenneTech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gluegun Menu\n\nThe Gluegun Menu is an extension for [Gluegun](https://infinitered.github.io/gluegun) CLIs.\nIt generates an interactive menu structure from the commands of the CLI.\n\n![Gluegun Menu Demo](assets/demo.gif)\n\nThe extension can be integrated into any Gluegun project.\nIt is already integrated in the [lenne.Tech CLI Starter](https://github.com/lenneTech/cli-starter),\nwhich can be initialized comfortably via the [lenne.Tech CLI](https://github.com/lenneTech/cli).\n\n## Integration\n\nIt can be easily integrated into your CLI:\n\n### 1. Install extension:\n\n```bash\n$ npm install @lenne.tech/gluegun-menu\n```\n\n### 2. Integrate extension as plugin:\n\n`src/cli.ts`:\n\n```typescript\n// ...\nconst cli = build()\n  // ...\n  .plugin(__dirname + '/../node_modules/@lenne.tech/gluegun-menu/dist', {\n    commandFilePattern: '*.js',\n    extensionFilePattern: '*.js'\n  })\n  // ...\n  .create();\n// ...\n```\n\n### 3. Prepare main commands\n\n`src/commands/YOUR_COMMAND/YOUR_COMMAND.ts`:\n\n```typescript\nimport { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';\n\n/**\n * YOUR_COMMAND menu\n */\nmodule.exports = {\n  name: 'YOUR_COMMAND',\n  alias: ['YOUR_COMMAND_ALIAS'],\n  description: 'YOUR_DESCRIPTION',\n  hidden: true,\n  run: async (toolbox: GluegunMenuToolbox) =\u003e {\n    await toolbox.menu.showMenu('(PARANT_COMMANDS) YOUR_COMMAND');\n  }\n};\n```\n\n## Parameters of `showMenu`\n\n1. parentCommands?: string  \n   command name OR parent names + command name\n\n2. options?: object\n\n   - level?: number =\u003e Level of the current section (0 = main section)\n   - headline?: string =\u003e Headline for the current section\n   - showHelp?: boolean =\u003e If you want to show the `help` command at the top\n   - hideBack?: boolean =\u003e If you want to hide the `back` command at the bottom\n   - setCache?: boolean =\u003e Re-use these `options` in subsequent menus (doesn't apply for `level`, `headline` or `setCache`)\n   - backLabel?: string =\u003e custom label to indicate `go back` action\n   - cancelLabel?: string =\u003e custom label to indicate `cancel` action\n   - byeMessage?: string =\u003e custom `bye` message\n\nNote: If the options in the main menu are to be used, for example to define the headline,\n`null` or an empty string `''` must be passed as the first parameter:  \n`showMenu(null, {headline: 'Main menu'})`\n\n## Example\n\nExample file structure:\n\n```\nsrc/commands/\n    section1/\n        subsection1/\n            subsection1.ts\n            yyy1.ts\n            yyy2.ts\n        section1.ts\n        xxx1.ts\n        xxx2.ts\n    section2/\n        section2.ts\n        zzz1.ts\n        zzz2.ts\n    brand.ts\n```\n\n`src/commands/brand.ts`:\n\n```typescript\nimport { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';\n\n/**\n * Main menu\n */\nmodule.exports = {\n  name: 'brand',\n  description: 'Welcome to brand CLI',\n  hidden: true,\n  run: async (toolbox: GluegunMenuToolbox) =\u003e {\n    await toolbox.menu.showMenu();\n  }\n};\n```\n\n`src/commands/section1/section1.ts`:\n\n```typescript\nimport { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';\n\n/**\n * Section1 menu\n */\nmodule.exports = {\n  name: 'section1',\n  alias: ['s1'],\n  description: 'Description for section1',\n  hidden: true,\n  run: async (toolbox: GluegunMenuToolbox) =\u003e {\n    await toolbox.menu.showMenu('section1');\n  }\n};\n```\n\n`src/commands/section1/subsection1/subsection1.ts`:\n\n```typescript\nimport { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';\n\n/**\n * Subsection1 menu\n */\nmodule.exports = {\n  name: 'subsection1',\n  alias: ['sub1'],\n  description: 'Description for subsection1',\n  hidden: true,\n  run: async (toolbox: GluegunMenuToolbox) =\u003e {\n    await toolbox.menu.showMenu('section1 subsection1', { headline: 'Subsection1 commands' });\n  }\n};\n```\n\n## Extensions of the toolbox\n\n### toolbox.menu\n\nThe menu extends the toolbox by the functionality to execute commands via a menu in the terminal (see above).\n\n### toolbox.fromMenu\n\nExtends the toolbox to the possibility to determine during the execution of a command whether the command was\ncalled via the menu.\n\n```typescript\nconst NewCommand: GluegunCommand = {\n  // ...\n  run: async (toolbox: GluegunMenuToolbox) =\u003e {\n    //...\n\n    if (toolbox.fromMenu()) {\n      console.log('I was called via the menu');\n    } else {\n      console.log('I was called via a direct command in the terminal');\n    }\n\n    // ...\n  }\n};\nexport default NewCommand;\n```\n\n## Additional parameter options\n\n### toolbox.parameters.options.fromGluegunMenu\n\nFlag that shows whether the command was called via the menu.\n\n## Thanks\n\nMany thanks to the developers of [Glugun](https://infinitered.github.io/gluegun)\nand all the developers whose packages are used here.\n\nMany thanks also to:\n\n- [pascal-klesse](https://github.com/pascal-klesse) for the support during the development\n- [Tazaf](https://github.com/Tazaf) for the idea to set the `fromGlueguneMenu` flag\n\n## License\n\nMIT - see LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flennetech%2Fgluegun-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flennetech%2Fgluegun-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flennetech%2Fgluegun-menu/lists"}