{"id":21275931,"url":"https://github.com/shirish87/browser-console","last_synced_at":"2025-07-11T08:30:52.348Z","repository":{"id":34080905,"uuid":"37896363","full_name":"shirish87/browser-console","owner":"shirish87","description":"WIP","archived":false,"fork":false,"pushed_at":"2015-06-26T02:49:30.000Z","size":188,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T18:09:24.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/shirish87.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-06-23T04:04:59.000Z","updated_at":"2016-08-03T16:25:07.000Z","dependencies_parsed_at":"2022-07-18T01:10:47.314Z","dependency_job_id":null,"html_url":"https://github.com/shirish87/browser-console","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirish87%2Fbrowser-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirish87%2Fbrowser-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirish87%2Fbrowser-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shirish87%2Fbrowser-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shirish87","download_url":"https://codeload.github.com/shirish87/browser-console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225708257,"owners_count":17511634,"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-21T09:45:29.910Z","updated_at":"2024-11-21T09:45:30.464Z","avatar_url":"https://github.com/shirish87.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# browser-console\nCreates a session with a browser of your choice running on the [BrowserStack Automate](http://www.browserstack.com/automate) platform and allows you to run JavaScript code and receive the output in your local shell.\n\nAlthough written from scratch, this tool uses concepts and code from the excellent [browser-repl](https://github.com/Automattic/browser-repl) module.\n\nThere are plans to make this module platform agnostic so it could be used with any Selenium-based cloud/internal/local service. Feedback and PR's welcome. :)\n\n**Note**: This is a work-in-progress at the moment and is only intended for early testers.\n\n## Requirements\nThis module currently requires you to have a [BrowserStack Automate](http://www.browserstack.com/automate) account. Once created, please set the following environment variables for your shell.\n```\nBROWSERSTACK_USERNAME=\u003cyour-username\u003e\nBROWSERSTACK_KEY=\u003cyour-access-key\u003e\n```\n\n## Install\nUse the following command to install this module globally and make the `browser-console` command available in your shell.\n```\n$ npm install -g browser-console\n```\n\n## Usage\n```\n$ browser-console \u003cbrowser\u003e-\u003cbrowser-version\u003e \u003cos\u003e-\u003cos-version\u003e\n```\nPlease refer to this [list of supported browsers and OSs](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate).\n\nExample:\n```\n$ browser-console firefox-35 windows-7\n```\nOnce your session is initialized and you receive `Ready`, you may begin typing in any JavaScript code you wish to execute in the remote browser.\n\n```\n$ browser-console chrome-42 windows-7\n… Loading …\n… Starting server …\n… Creating tunnel …\n… Starting session …\n… Waiting for client connection …\n… Ready\n › typeof window\n'object'\n › typeof Promise\n'function'\n › typeof Proxy\n'undefined'\n › var f = function func() { console.log('i am func'); }\nundefined\n › f.name\n'func'\n › let test = 'template'\nSyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode\n...\n › var test = 'template'\nundefined\n › console.log(`${test} strings`)\n'template strings'\n```\n\n## Known Issues\n* Functions that create browser dialog boxes such as `alert()` hang the session\n* Usability and messaging could use some improvement\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirish87%2Fbrowser-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshirish87%2Fbrowser-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshirish87%2Fbrowser-console/lists"}