{"id":13475154,"url":"https://github.com/vercel/email-prompt","last_synced_at":"2025-04-04T14:07:08.516Z","repository":{"id":42211541,"uuid":"59433028","full_name":"vercel/email-prompt","owner":"vercel","description":"CLI email prompt with autocompletion and built-in validation","archived":false,"fork":false,"pushed_at":"2023-03-04T03:26:57.000Z","size":66,"stargazers_count":275,"open_issues_count":2,"forks_count":29,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-29T17:18:17.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/email-prompt","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/vercel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-22T20:32:20.000Z","updated_at":"2024-09-17T03:34:35.000Z","dependencies_parsed_at":"2024-01-07T18:02:32.282Z","dependency_job_id":"395858f1-16b5-40e5-bef4-ad95261bd2b6","html_url":"https://github.com/vercel/email-prompt","commit_stats":{"total_commits":75,"total_committers":14,"mean_commits":5.357142857142857,"dds":0.6,"last_synced_commit":"4326cd20acb844d722f82c82d96715a85403fc7f"},"previous_names":["zeit/email-prompt"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Femail-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Femail-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Femail-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vercel%2Femail-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vercel","download_url":"https://codeload.github.com/vercel/email-prompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190250,"owners_count":20898702,"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":[],"created_at":"2024-07-31T16:01:17.811Z","updated_at":"2025-04-04T14:07:08.496Z","avatar_url":"https://github.com/vercel.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# email-prompt\n\nCLI email prompt featuring autocompletion and validation.\nPowers [vercel](https://vercel.com/) `--login`.\n\n![prompt](https://cloud.githubusercontent.com/assets/13041/15456597/36b76246-202a-11e6-99e8-3839514bed57.gif)\n\n## Usage\n\n```js\nimport emailPrompt from 'email-prompt';\n\nlet email;\n\ntry {\n  email = await emailPrompt({\n    /* options */\n  });\n} catch (err) {\n  console.log('\\n\u003e Aborted!');\n  return;\n}\n\nconsole.log('\\n\u003e Hello ' + email);\n```\n\nTo run the demo, [clone](https://help.github.com/articles/cloning-a-repository/) the project and run:\n\n```bash\nnpm install\nnode demo\n```\n\n### Options\n\n- `start` (`String`): the beginning of the prompt. Defaults to `\u003e Enter your email: `\n- `domains` (`Set`): domain names to autocomplete (as `String`). Defaults to:\n  - `aol.com`\n  - `gmail.com`\n  - `google.com`\n  - `yahoo.com`\n  - `ymail.com`\n  - `hotmail.com`\n  - `live.com`\n  - `outlook.com`\n  - `inbox.com`\n  - `mail.com`\n  - `gmx.com`\n  - `icloud.com`\n  - `hey.com`\n  - `zeit.co`\n  - `vercel.com`\n- `forceLowerCase` (`Boolean`): converts all input to lowercase. Defaults to `true`.\n- `suggestionColor` (`String`): a [chalk](https://github.com/chalk/chalk) color. Defaults to `gray`\n- `autocompleteChars` (`Set`): a set of chars that trigger autocompletion. Defaults to:\n  - ↹ Tab\n  - ↵ Return (enter)\n  - → Right arrow\n- `resolveChars` (`Set`): a set of chars that resolve the promise. Defaults to ↵return\n- `abortChars` (`Set`): a set of chars that abort the process. Defaults to Ctrl+C\n- `allowInvalidChars` (`Boolean`): controls whether non-email chars are accepted. Defaults to `false`\n\n### Notes\n\nSome important implementation details:\n\n- `email-prompt` automatically adapts the mode of `process.stdin` for you.\n- The `stdin` stream is `resume`d and `pause`d upon the promise being\n  settled.\n- When the promise resolves or rejects, the previous stdin mode is restored.\n- The `tty` mode is set to `raw`, which means all the caret interactions\n  that you come to expect in a regular `stdin` prompt are simulated.\n  This gives us fine-grained control over the output and powers the\n  validation.\n\n## Authors\n\n- Guillermo Rauch ([@rauchg](https://twitter.com/rauchg)) - [Vercel](https://vercel.com)\n- Leo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo)) - [Vercel](https://vercel.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Femail-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvercel%2Femail-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvercel%2Femail-prompt/lists"}