{"id":15552204,"url":"https://github.com/bahmutov/inquirer-confirm","last_synced_at":"2025-09-28T23:31:10.871Z","repository":{"id":29845999,"uuid":"33390801","full_name":"bahmutov/inquirer-confirm","owner":"bahmutov","description":"Simple confirm yes / no command line question that returns a promise, built on top of inquirer","archived":false,"fork":false,"pushed_at":"2024-10-29T21:49:43.000Z","size":184,"stargazers_count":7,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T22:40:03.978Z","etag":null,"topics":["cli"],"latest_commit_sha":null,"homepage":null,"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/bahmutov.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":"2015-04-04T01:51:11.000Z","updated_at":"2021-10-05T11:58:47.000Z","dependencies_parsed_at":"2024-02-14T01:29:10.593Z","dependency_job_id":"82152ee0-6a6a-40b3-b8bc-9f0c43525712","html_url":"https://github.com/bahmutov/inquirer-confirm","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":"0.30508474576271183","last_synced_commit":"94eb70efcec54f8c60c44ee20372a0d52a5c840a"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Finquirer-confirm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Finquirer-confirm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Finquirer-confirm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Finquirer-confirm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/inquirer-confirm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234570361,"owners_count":18854155,"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"],"created_at":"2024-10-02T14:12:14.506Z","updated_at":"2025-09-28T23:31:05.538Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inquirer-confirm\n\n\u003e Simple confirm yes/no question for CLI node applications.\n\u003e Returns a promise; built on top of inquirer\n\n[![NPM][inquirer-confirm-icon]][inquirer-confirm-url]\n\n[![Build status][ci-image]][ci-url]\n[![dependencies][dependencies-image]][dependencies-url]\n[![devdependencies][inquirer-confirm-devdependencies-image] ][inquirer-confirm-devdependencies-url]\n[![renovate-app badge][renovate-badge]][renovate-app]\n\n`npm install inquirer-confirm --save`\n\n## v2.x\n\n```js\nconst confirm = require('inquirer-confirm')\nconfirm({\n  question: 'pass extra?', // 'Are you sure?' is default\n  extra: 42, // undefined is default\n  default: false // true (yes) is default\n}).then(confirmed, cancelled)\n```\n\nWhatever is `extra` is passed to both confirmed and to cancelled callbacks.\n\n## v1.x\n\n```js\nvar confirm = require('inquirer-confirm');\nconfirm('are you ok?')\n  .then(function confirmed() {\n    console.log('you are ok');\n  }, function cancelled() {\n    console.log('sorry to hear that');\n  });\n```\n\nruntime\n\n```\n$ node test.js\n? are you ok? Yes\nyou are ok\n$ node test.js\n? are you ok? No\nsorry to hear that\n```\n\nFor full CLI prompt support see the original [inquirer](https://www.npmjs.com/package/inquirer)\n\n### Passing extra info\n\nIf you need to pass through an additional argument, you can. Same argument is\npassed to both resolve and reject paths.\n\n```js\nconfirm('are you ok?', 'really')\n  .then(function confirmed(a) {\n    console.log(a); // prints \"really\"\n  }, function cancelled(b) {\n    console.log(b);  // prints \"really\"\n  });\n```\n\nRelated: [confirm-click](https://github.com/bahmutov/confirm-click),\n[get-username-and-password](https://github.com/bahmutov/get-username-and-password)\n\n### Small print\n\nAuthor: Gleb Bahmutov \u0026copy; 2015\n\n* [@bahmutov](https://twitter.com/bahmutov)\n* [glebbahmutov.com](http://glebbahmutov.com)\n* [blog](http://glebbahmutov.com/blog)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSpread the word: tweet, star on github, etc.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/inquirer-confirm/issues) on Github\n\n## MIT License\n\nCopyright (c) 2015 Gleb Bahmutov\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n[inquirer-confirm-icon]: https://nodei.co/npm/inquirer-confirm.svg?downloads=true\n[inquirer-confirm-url]: https://npmjs.org/package/inquirer-confirm\n\n[ci-image]: https://travis-ci.org/bahmutov/inquirer-confirm.svg?branch=master\n[ci-url]: https://travis-ci.org/bahmutov/inquirer-confirm\n[dependencies-image]: https://david-dm.org/bahmutov/inquirer-confirm.svg\n[dependencies-url]: https://david-dm.org/bahmutov/inquirer-confirm\n[inquirer-confirm-devdependencies-image]: https://david-dm.org/bahmutov/inquirer-confirm/dev-status.svg\n[inquirer-confirm-devdependencies-url]: https://david-dm.org/bahmutov/inquirer-confirm#info=devDependencies\n[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg\n[renovate-app]: https://renovateapp.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Finquirer-confirm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Finquirer-confirm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Finquirer-confirm/lists"}