{"id":29943073,"url":"https://github.com/mongodb-js/pretty-repl","last_synced_at":"2025-08-03T02:13:22.591Z","repository":{"id":42889330,"uuid":"253285874","full_name":"mongodb-js/pretty-repl","owner":"mongodb-js","description":"Extends Node's repl.REPLServer to allow for a colorize function.","archived":false,"fork":false,"pushed_at":"2024-05-14T08:22:53.000Z","size":374,"stargazers_count":27,"open_issues_count":7,"forks_count":4,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-30T05:03:25.327Z","etag":null,"topics":["cli","node-repl","nodejs","syntax-highlighting"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pretty-repl","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/mongodb-js.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-05T16:56:56.000Z","updated_at":"2025-06-03T07:28:27.000Z","dependencies_parsed_at":"2023-12-13T14:27:09.823Z","dependency_job_id":"41851985-a92c-40e3-81cf-d1b22c537cbc","html_url":"https://github.com/mongodb-js/pretty-repl","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mongodb-js/pretty-repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-js%2Fpretty-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-js%2Fpretty-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-js%2Fpretty-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-js%2Fpretty-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-js","download_url":"https://codeload.github.com/mongodb-js/pretty-repl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-js%2Fpretty-repl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268484362,"owners_count":24257660,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","node-repl","nodejs","syntax-highlighting"],"created_at":"2025-08-03T02:13:08.771Z","updated_at":"2025-08-03T02:13:22.580Z","avatar_url":"https://github.com/mongodb-js.png","language":"JavaScript","readme":"# Pretty REPL\n\n![Node.js CI](https://github.com/mmarcon/pretty-repl/workflows/Node.js%20CI/badge.svg)\n\nAn extension of the Node REPL (`repl.REPLServer`) that applies syntax highlighting as the user types.\n\n![Pretty REPL Screenshot](./images/screenshot.png)\n\n## How to use it\n\nInstall the package:\n\n```bash\n$ npm install --save pretty-repl\n```\n\nUse the package:\n\n```javascript\nconst repl = require('pretty-repl');\n\nconst options = {\n    prompt: '→ '\n};\n\nrepl.start(options);\n```\n\n`options` is an an object with the [same options](https://nodejs.org/api/repl.html#repl_repl_start_options) as `repl.REPLServer`.\n\nAdditionally, it's possible to pass an additional `colorize` property to the options object:\n\n```javascript\n{\n    colorize: function (str) {\n        // str is the the string in input.\n        // the function should return the string that has been colorized to output in the REPL.\n    }\n}\n```\n\nIn order to highlighting matching pairs of brackets, a `colorizeMatchingBracket`\nis also available.\n\n## Credits\n\nPretty repl is inspired and includes code fragments from:\n* https://github.com/nodejs/repl\n* https://github.com/aantthony/node-color-readline\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-js%2Fpretty-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-js%2Fpretty-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-js%2Fpretty-repl/lists"}