{"id":45157651,"url":"https://github.com/webscopeio/react-console","last_synced_at":"2026-02-20T05:04:07.688Z","repository":{"id":53077556,"uuid":"158874576","full_name":"webscopeio/react-console","owner":"webscopeio","description":"💻    Simple console emulator in React ","archived":false,"fork":false,"pushed_at":"2023-04-29T22:30:26.000Z","size":2925,"stargazers_count":40,"open_issues_count":8,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T00:11:13.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/webscopeio.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":"2018-11-23T20:18:08.000Z","updated_at":"2024-12-25T18:22:59.000Z","dependencies_parsed_at":"2022-09-04T11:00:13.841Z","dependency_job_id":null,"html_url":"https://github.com/webscopeio/react-console","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/webscopeio/react-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webscopeio%2Freact-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webscopeio%2Freact-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webscopeio%2Freact-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webscopeio%2Freact-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webscopeio","download_url":"https://codeload.github.com/webscopeio/react-console/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webscopeio%2Freact-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29641929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-20T05:03:21.329Z","updated_at":"2026-02-20T05:04:07.680Z","avatar_url":"https://github.com/webscopeio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MIT-licensed console emulator in React. Documentation and more advanced features coming soon!\n\n# react-console\n\n\u003e React component that emulates console behaviour\n\n[![NPM](https://img.shields.io/npm/v/react-console.svg)](https://www.npmjs.com/package/react-console)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n![license-sh badge](https://img.shields.io/endpoint?label=license-sh\u0026url=https%3A%2F%2Flicense.sh%2Fapi%2Fshield%3Fowner%3Dwebscopeio%26repo%3Dreact-console%26repoID%3D158874576%26token_type%3Dbearer%26type%3Dgithub)\n\n\n## Install\n\n```bash\nnpm install --save @webscopeio/react-console\n```\n\n## Demo\n\nhttps://webscopeio.github.io/react-console/\n\n## Screenshot\n\n![Webscope React Console](https://user-images.githubusercontent.com/1083817/48961581-14dce380-ef76-11e8-9d89-66c3815e46fe.png)\n\n## Props\n\n\n| Props                  | Type                                                                  | Description |\n| :--------------------- | :-------------------------------------------------------------------- |:--------------|\n| **commands***          | **CommandsProp** |\n| prompt                 | string |\n| welcomeMessage         | string |\n| autoFocus              | boolean|\n| noCommandFound         | (...str: string[]) =\u003e Promise\u003cstring\u003e |\n| wrapperStyle           | React.CSSProperties | styles for `wrapper` |\n| promptWrapperStyle     | React.CSSProperties | styles for `promptWrapper` |\n| promptStyle            | React.CSSProperties | styles for `prompt` |\n| lineStyle              | React.CSSProperties | styles for `line` |\n| inputStyle             | React.CSSProperties | styles for `input` |\n| wrapperClassName       | string | className for `wrapper` |\n| promptWrapperClassName | string | className for `promptWrapper` |\n| promptClassName        | string | className for `prompt` |\n| lineClassName          | string | className for `line` |\n| inputClassName         | string | className for `input` |\n| history                | string[] | history array |\n| onAddHistoryItem       | (entry: string) =\u003e void | callback called when a new history entry is created |\n| onSanitizeOutputLine   | (line: string) =\u003e string | callback called before a new output line is inserted to DOM |\n\n\\*_are mandatory_\n\n## Usage\n\n```tsx\nimport React, { Component } from 'react'\n\nimport ReactConsole from 'react-console'\n\nconst App = () =\u003e {\n  const [history, setHistory] = useState([\n    \"echo hello world\",\n    \"sleep 1000\",\n    \"sleep 2000\",\n    \"sleep 3000\",\n    \"echo ola\",\n    \"not found\",\n  ])\n\n  return (\n    \u003cdiv\u003e\n      \u003cReactConsole\n        autoFocus\n        welcomeMessage=\"Welcome\"\n        commands={{\n          history: {\n            description: 'History',\n            fn: () =\u003e new Promise(resolve =\u003e {\n               resolve(`${history.join('\\r\\n')}`)\n            })\n          },\n          echo: {\n            description: 'Echo',\n            fn: (...args) =\u003e {\n              return new Promise((resolve, reject) =\u003e {\n                setTimeout(() =\u003e {\n                  resolve(`${args.join(' ')}`)\n                }, 2000)\n              })\n            }\n          },\n          test: {\n            description: 'Test',\n            fn: (...args) =\u003e {\n              return new Promise((resolve, reject) =\u003e {\n                setTimeout(() =\u003e {\n                  resolve('Hello world \\n\\n hello \\n')\n                }, 2000)\n              })\n            }\n          }\n        }}\n      /\u003e\n    \u003c/div\u003e\n  )\n}\nexport default App\n```\n\n## History implementation\n\nYou can provide your own history implementation by providing `onAddHistoryItem` and `history` properties.\nIf you don't provide `history`, up/down arrows \u0026 reverse search won't work.\n\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT) © [jvorcak](https://github.com/jvorcak)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebscopeio%2Freact-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebscopeio%2Freact-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebscopeio%2Freact-console/lists"}