{"id":22053289,"url":"https://github.com/bertrandom/press-enter","last_synced_at":"2025-05-11T20:51:21.384Z","repository":{"id":25309743,"uuid":"28736390","full_name":"bertrandom/press-enter","owner":"bertrandom","description":"BBS-style ANSI color enter prompts for Node.js modules or the CLI","archived":false,"fork":false,"pushed_at":"2015-01-07T18:25:48.000Z","size":301,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T11:54:20.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/press-enter","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/bertrandom.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}},"created_at":"2015-01-03T05:57:08.000Z","updated_at":"2024-06-21T08:01:30.000Z","dependencies_parsed_at":"2022-07-25T12:32:09.667Z","dependency_job_id":null,"html_url":"https://github.com/bertrandom/press-enter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpress-enter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpress-enter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpress-enter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fpress-enter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandom","download_url":"https://codeload.github.com/bertrandom/press-enter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253632929,"owners_count":21939386,"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-11-30T15:16:10.874Z","updated_at":"2025-05-11T20:51:21.326Z","avatar_url":"https://github.com/bertrandom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# press-enter\n\nBBS-style ANSI color enter prompts for Node.js modules or the CLI\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/demo.gif)\n\nThere are 9 animated prompts and 6 static prompts.\n\nThe animated prompts were ported from an old PCBoard PPE ([EPE1PWA.ZIP](http://cd.textfiles.com/ppes/E/EPE1PWA.ZIP)) originally released on February 17, 1994, a little over twenty years ago.\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/file_id.diz.png)\n\nThe static prompts were extracted from the default install of Iniquity BBS software v1.01, released on July 26, 1997.\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/iniquity.png)\n\nHere's are the prompts in use in their corresponding software:\n\n### Animated prompt in PCBoard\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/pcboard.gif)\n\n### Static prompt in Iniquity\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/iniquity_enter.png)\n\nStatic prompts:\n\n![image](https://raw.githubusercontent.com/bertrandom/press-enter/gh-pages/static.gif)\n\n# Installation\n\n`npm install -g press-enter`\n\n# Usage\n\nTo use `press-enter`, your terminal must support ANSI colors with bright settings. I use iTerm2 with the Report Terminal Type setting at `xterm-256color` and colors set to the `Dark Background` preset.\n\n## CLI usage\n\n```\npress-enter [style] [color]\n  style: 0-13\n  color: red, yellow, green, blue, cyan, magenta, grey\n```\n\nFor example, if you want to use the 4th prompt in Red, you can type\n\n```\npress-enter 4 red\n```\n\nor specify that in your shell scripts.\n\n0-8 are animated prompts, 9-13 are static.\n\nRunning `press-enter` by itself will default to the 3rd style in the color blue.\n\n## Node usage\n\nYou can use `press-enter` anywhere where you want to control flow. The callback fires after the user presses enter.\n\n### pressEnter([options], callback)\n\nOptions is an optional hash, you can omit it:\n\n```\nvar pressEnter = require('press-enter');\n\npressEnter(function() {\n\tprocess.exit();\n});\n```\n\n| Option | Description |\n| ------------ | ------------- |\n| style | Style from 0-13, 0-8 are animated, 9-13 are static |\n| color | red, yellow, green, blue, cyan, magenta, grey. Defaults to blue. |\n| centered | Whether or not to try to detect the number of columns in the terminal and center the prompt. Defaults to true. |\n| input | Node.js stream, defaults to stdin |\n| output | Node.js stream, defaults to stdout |\n\nExample specifying options:\n\n```\nvar pressEnter = require('press-enter');\n\npressEnter({style: 3, color: red}, function() {\n\tprocess.exit();\n});\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fpress-enter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandom%2Fpress-enter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fpress-enter/lists"}