{"id":20206761,"url":"https://github.com/enquirer/prompt-rawlist","last_synced_at":"2025-07-06T18:35:49.085Z","repository":{"id":57225583,"uuid":"66805480","full_name":"enquirer/prompt-rawlist","owner":"enquirer","description":"Requires Enquirer \u003c2.0. Adds `rawlist` prompt support to Enquirer.","archived":false,"fork":false,"pushed_at":"2017-06-05T03:50:39.000Z","size":106,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T00:02:10.001Z","etag":null,"topics":["ask","cli","enquirer","prompt","questions","radio","readline","terminal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/enquirer.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":"2016-08-29T02:44:52.000Z","updated_at":"2018-12-13T12:23:41.000Z","dependencies_parsed_at":"2022-08-24T10:40:23.376Z","dependency_job_id":null,"html_url":"https://github.com/enquirer/prompt-rawlist","commit_stats":null,"previous_names":["enquirer/enquirer-prompt-rawlist"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/enquirer/prompt-rawlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enquirer%2Fprompt-rawlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enquirer%2Fprompt-rawlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enquirer%2Fprompt-rawlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enquirer%2Fprompt-rawlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enquirer","download_url":"https://codeload.github.com/enquirer/prompt-rawlist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enquirer%2Fprompt-rawlist/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263952452,"owners_count":23534911,"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":["ask","cli","enquirer","prompt","questions","radio","readline","terminal"],"created_at":"2024-11-14T05:25:56.833Z","updated_at":"2025-07-06T18:35:49.045Z","avatar_url":"https://github.com/enquirer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prompt-rawlist [![NPM version](https://img.shields.io/npm/v/prompt-rawlist.svg?style=flat)](https://www.npmjs.com/package/prompt-rawlist) [![NPM monthly downloads](https://img.shields.io/npm/dm/prompt-rawlist.svg?style=flat)](https://npmjs.org/package/prompt-rawlist) [![NPM total downloads](https://img.shields.io/npm/dt/prompt-rawlist.svg?style=flat)](https://npmjs.org/package/prompt-rawlist) [![Linux Build Status](https://img.shields.io/travis/enquirer/prompt-rawlist.svg?style=flat\u0026label=Travis)](https://travis-ci.org/enquirer/prompt-rawlist)\n\n\u003e Rawlist prompt. Can be used as a standalone prompt, or with a prompt system like [Enquirer](http://enquirer.io).\n\n![prompt-rawlist example](https://raw.githubusercontent.com/enquirer/prompt-rawlist/master/docs/example.gif)\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save prompt-rawlist\n```\n\n## Usage\n\n```js\nvar RawList = require('prompt-rawlist');\nvar prompt = new RawList({\n  name: 'colors',\n  message: 'Favorite flavor?',\n  choices: [\n    'chocolate',\n    'strawberry',\n    'vanilla'\n  ]\n});\n\n// async\nprompt.ask(function(answer) {\n  console.log(answer);\n  // chocolate\n});\n\n// promise\nprompt.run()\n  .then(function(answer) {\n    console.log(answer);\n    // chocolate\n  });\n```\n\n## Enquirer usage\n\nRegister as a plugin with [enquirer](http://enquirer.io):\n\n```js\nvar Enquirer = require('enquirer');\nvar enquirer = new Enquirer();\nenquirer.register('rawlist', require('prompt-rawlist'));\n```\n\n### Declarative format\n\nDefine questions using a declarative style, similar to Inquirer.\n\n```js\nvar questions = [\n  {\n    type: 'rawlist',\n    name: 'dinner',\n    message: 'What would you like to do?',\n    choices: [\n      'Order a pizza',\n      'Make a reservation',\n      enquirer.separator(),,\n      'Ask opening hours',\n      'Talk to the receptionist'\n    ]\n  },\n  {\n    type: 'rawlist',\n    name: 'size',\n    message: 'What size would you like?',\n    choices: ['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro']\n  }\n];\n\nenquirer.ask(questions)\n  .then(function (answers) {\n    console.log(answers);\n  });\n```\n\n### Expressive format\n\nRegister questions using enquirer's `.question` method:\n\n```js\nenquirer.question('dinner', {\n  type: 'rawlist',\n  message: 'What would you like to do?',\n  choices: [\n    'Order a pizza',\n    'Make a reservation',\n    enquirer.separator(),\n    'Ask opening hours',\n    'Talk to the receptionist'\n  ]\n});\n\nenquirer.question('size', 'What size would you like?', {\n  type: 'rawlist',\n  choices: ['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro']\n});\n\nenquirer.ask(['dinner', 'size'])\n  .then(function (answers) {\n    console.log(answers);\n    //=\u003e { dinner: 'Order a pizza', size: 'Large' }\n  });\n```\n\n## Attribution\n\nOriginally based on the `rawlist` prompt in [inquirer](https://github.com/sboudrias/Inquirer.js).\n\n## About\n\n### Related projects\n\n* [prompt-base](https://www.npmjs.com/package/prompt-base): Base prompt module used for creating custom prompts. | [homepage](https://github.com/enquirer/prompt-base \"Base prompt module used for creating custom prompts.\")\n* [prompt-checkbox](https://www.npmjs.com/package/prompt-checkbox): Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like [Enquirer](http://enquirer.io). | [homepage](https://github.com/enquirer/prompt-checkbox \"Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like [Enquirer].\")\n* [prompt-confirm](https://www.npmjs.com/package/prompt-confirm): Confirm (yes/no) prompt. Can be used standalone or with a prompt system like [Enquirer](http://enquirer.io). | [homepage](https://github.com/enquirer/prompt-confirm \"Confirm (yes/no) prompt. Can be used standalone or with a prompt system like [Enquirer].\")\n* [prompt-list](https://www.npmjs.com/package/prompt-list): List-style prompt. Can be used as a standalone prompt, or with a prompt system like… [more](https://github.com/enquirer/prompt-list) | [homepage](https://github.com/enquirer/prompt-list \"List-style prompt. Can be used as a standalone prompt, or with a prompt system like [enquirer].\")\n* [prompt-question](https://www.npmjs.com/package/prompt-question): Question object, used by Enquirer and prompt plugins. | [homepage](https://github.com/enquirer/prompt-question \"Question object, used by Enquirer and prompt plugins.\")\n* [prompt-radio](https://www.npmjs.com/package/prompt-radio): Radio prompt. Can be used as a standalone prompt, or as a plugin for [Enquirer](http://enquirer.io). | [homepage](https://github.com/enquirer/prompt-radio \"Radio prompt. Can be used as a standalone prompt, or as a plugin for [Enquirer].\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 04, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenquirer%2Fprompt-rawlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenquirer%2Fprompt-rawlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenquirer%2Fprompt-rawlist/lists"}