{"id":23084081,"url":"https://github.com/ddosnotification/interactive-cli-menu","last_synced_at":"2026-02-03T22:04:43.982Z","repository":{"id":264924154,"uuid":"894684134","full_name":"ddosnotification/interactive-cli-menu","owner":"ddosnotification","description":"A sleek and customizable CLI menu with arrow key navigation and actions. No external dependencies!","archived":false,"fork":false,"pushed_at":"2024-11-26T19:58:17.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T18:16:56.817Z","etag":null,"topics":["cli","cli-navigation","cli-tool","command-line","command-line-interface","interactive","menu","node-cli","nodejs","nodejs-menu","npm-package","terminal","terminal-ui","ux-design"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/interactive-cli-menu","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddosnotification.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-26T19:50:42.000Z","updated_at":"2024-11-26T19:58:21.000Z","dependencies_parsed_at":"2024-11-29T01:15:21.746Z","dependency_job_id":null,"html_url":"https://github.com/ddosnotification/interactive-cli-menu","commit_stats":null,"previous_names":["ddosnotification/interactive-cli-menu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Finteractive-cli-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Finteractive-cli-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Finteractive-cli-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddosnotification%2Finteractive-cli-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddosnotification","download_url":"https://codeload.github.com/ddosnotification/interactive-cli-menu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251723025,"owners_count":21633067,"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":["cli","cli-navigation","cli-tool","command-line","command-line-interface","interactive","menu","node-cli","nodejs","nodejs-menu","npm-package","terminal","terminal-ui","ux-design"],"created_at":"2024-12-16T15:48:39.780Z","updated_at":"2025-10-30T20:40:23.222Z","avatar_url":"https://github.com/ddosnotification.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌟 interactive-cli-menu\n\n![npm version](https://img.shields.io/npm/v/interactive-cli-menu)\n![downloads](https://img.shields.io/npm/dm/interactive-cli-menu)\n![GitHub stars](https://img.shields.io/github/stars/ddosnotification/interactive-cli-menu)\n\n**interactive-cli-menu** is a sleek, modern, and customizable NPM package for creating interactive CLI menus. It supports smooth arrow key navigation, actionable items, and beautiful terminal UI—all without external dependencies! Perfect for making your command-line tools pop! 🎉\n\n---\n\n## 🚀 Features\n\n- 🔼 **Arrow Key Navigation**: Effortlessly navigate menus with the up/down arrows.\n- 🎨 **Customizable Styling**: Choose colors, widths, borders, and more.\n- ⚡ **Actionable Items**: Attach custom actions to menu selections.\n- 🪶 **Lightweight**: No external dependencies—100% native Node.js.\n- 🛑 **Graceful Exit**: Cleanly handles `Ctrl+C` to terminate.\n\n---\n\n## 📦 Installation\n\nInstall via NPM:\n\n```bash\nnpm install interactive-cli-menu\n```\n\n---\n\n## 🛠️ Usage\n\n### ✨ Simple Example\n\n```javascript\nconst { createMenu } = require('interactive-cli-menu');\n\nconst menu = createMenu({\n  title: '🍔 Main Menu',\n  width: 50,\n  borderColor: 36, // Cyan\n  highlightColor: 33, // Yellow\n  textColor: 37, // White\n  items: [\n    { label: '🔍 Search', action: () =\u003e console.log('Searching... 🔎') },\n    { label: '⚙️ Settings', action: () =\u003e console.log('Opening settings... 🛠️') },\n    { label: '❌ Exit', action: () =\u003e console.log('Goodbye! 👋') }\n  ]\n});\n\nmenu.render();\n```\n\n### 🖥️ Output\n\n```\n──────────────────────────────────────────────────\n                   🍔 Main Menu\n──────────────────────────────────────────────────\n\n  🔍 Search\n\u003e ⚙️ Settings\n  ❌ Exit\n\n──────────────────────────────────────────────────\n```\n\n### Interact:\n- Use **⬆️ Up** and **⬇️ Down** to navigate.\n- Press **⏎ Enter** to select.\n\n---\n\n## 🎨 API\n\n### `createMenu(options)`\n\n#### `options` (object)\n\n| Option           | Type     | Default       | Description                                                                 |\n|------------------|----------|---------------|-----------------------------------------------------------------------------|\n| `title`          | `string` | `'Menu'`      | Title displayed at the top of the menu.                                    |\n| `width`          | `number` | `60`          | Width of the menu in characters.                                           |\n| `borderColor`    | `number` | `90` (Gray)   | ANSI color code for the border.                                            |\n| `highlightColor` | `number` | `34` (Blue)   | ANSI color code for the selected menu item.                                |\n| `textColor`      | `number` | `37` (White)  | ANSI color code for unselected menu items.                                 |\n| `items`          | `array`  | `[]`          | Array of menu items (see below).                                           |\n\n---\n\n### Menu Items (`items`)\n\nEach item is an object with the following properties:\n\n| Property   | Type       | Description                                            |\n|------------|------------|--------------------------------------------------------|\n| `label`    | `string`   | The text displayed for the menu item (supports emojis).|\n| `action`   | `function` | The function executed when the item is selected.       |\n\n---\n\n## 🌟 Advanced Example: Dynamic Menus with Emojis\n\n```javascript\nconst { createMenu } = require('interactive-cli-menu');\n\nlet items = [\n  { label: '📄 View Files', action: () =\u003e console.log('Listing files... 🗂️') },\n  { label: '➕ Add Item', action: () =\u003e console.log('Adding item... ✅') },\n  { label: '❌ Exit', action: () =\u003e console.log('Goodbye! 👋') }\n];\n\nconst menu = createMenu({\n  title: '🛠️ My CLI Tool',\n  width: 60,\n  borderColor: 35, // Magenta\n  highlightColor: 32, // Green\n  textColor: 37, // White\n  items\n});\n\nmenu.render();\n```\n\n---\n\n## 🛣️ Roadmap\n\n🔮 Future Enhancements:\n- 📂 **Nested Menus**: Add support for multi-level menus.\n- 🌈 **Extended Themes**: More built-in color schemes and styles.\n- 🕵️ **Search**: Enable searchable menus for longer lists.\n- ⌨️ **Custom Keybindings**: Allow custom navigation keys.\n\n---\n\n## 🙌 Contributing\n\nWe ❤️ contributions! If you find a bug or have an idea for improvement, feel free to [open an issue](https://github.com/ddosnotification/interactive-cli-menu/issues) or submit a pull request. \n\n---\n\n## 📄 License\n\n**interactive-cli-menu** is open-source and available under the [MIT License](https://opensource.org/licenses/MIT). \n\n---\n\n✨ **Make your CLI tools stylish and user-friendly with interactive-cli-menu!** 🌟","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddosnotification%2Finteractive-cli-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddosnotification%2Finteractive-cli-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddosnotification%2Finteractive-cli-menu/lists"}