{"id":50884035,"url":"https://github.com/arvis-workflows/arvis-chrome-control","last_synced_at":"2026-06-15T15:01:59.748Z","repository":{"id":57184468,"uuid":"374731437","full_name":"arvis-workflows/arvis-chrome-control","owner":"arvis-workflows","description":"A JXA script and an Arvis Workflow for controlling Google Chrome","archived":false,"fork":false,"pushed_at":"2021-07-03T14:14:04.000Z","size":167,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T14:07:35.239Z","etag":null,"topics":["arvis","arvis-workflow","arvish","chrome","jxa"],"latest_commit_sha":null,"homepage":"","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/arvis-workflows.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":"2021-06-07T16:25:27.000Z","updated_at":"2023-12-20T15:43:59.000Z","dependencies_parsed_at":"2022-09-14T08:50:30.556Z","dependency_job_id":null,"html_url":"https://github.com/arvis-workflows/arvis-chrome-control","commit_stats":null,"previous_names":["jopemachine/arvis-chrome-control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arvis-workflows/arvis-chrome-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvis-workflows%2Farvis-chrome-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvis-workflows%2Farvis-chrome-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvis-workflows%2Farvis-chrome-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvis-workflows%2Farvis-chrome-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arvis-workflows","download_url":"https://codeload.github.com/arvis-workflows/arvis-chrome-control/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvis-workflows%2Farvis-chrome-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34367696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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":["arvis","arvis-workflow","arvish","chrome","jxa"],"created_at":"2026-06-15T15:01:59.588Z","updated_at":"2026-06-15T15:01:59.710Z","avatar_url":"https://github.com/arvis-workflows.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Chrome Control\n==============\n\n![Chrome Control](img/banner.png)\n\n## 🔗 This workflow is converted from [alfred-workflow](https://github.com/bit2pixel/chrome-control).\n\n* Note that there might be some code change or different actions from the original workflow.\n\n* Marked original workflow's creator to author.\n\nA JXA script and an Alfred Workflow for controlling Google Chrome\n(Javascript for Automation).\n\nThis repository is forked from [chrome-control](https://github.com/bit2pixel/chrome-control)\n\nUsage\n-----\n\nMake this file an executable\n```sh\nchmod +x ./chrome.js\n```\n\nThen run: \n```sh\n./chrome.js\n```\n\n\n\u003e MacOS will ask you to allow permissions for this tool to control Chrome.  \n\u003e Feel free to inspect the code before accepting.\n\nIntegration\n-----------\n\nYou can use `chrome-control` to create fun integrations with your favorite tools (Alfred, vim, vscode, iterm2, ...).\n\n### Chrome Control commands\n\nChrome Control commands:\n  - `tabs`: Lists all tabs\n  - `close url \u003ckeywords\u003e`: Close tabs with URLs matching these keywords\n  - `close title \u003ckeywords\u003e`: Close tabs with titles matching these keywords\n  - `dedup`: Close duplicate tabs\n\n\nCommands\n--------\n\n### Close duplicate tabs\n\n```sh\n./chrome.js dedup\n```\n\n\n### Close all tabs by `titles` containing strings \n\u003e Strings are separated by spaces and `case insensitive`.\n\n```sh\n./chrome.js close --title \"inbox\" \"iphone - apple\"\n```\n\n```sh\n./chrome.js close --title inbox iphone\n```\n\n### Close all tabs by `URLs` containing strings\n\u003e Strings are separated by spaces and `case insensitive`.\n\n```sh\n./chrome.js close --url \"mail.google\" \"apple\"\n```\n\n```sh\n./chrome.js close --url google apple\n```\n\n### List all open tabs in all Chrome windows\n\n```sh\n./chrome.js list\n```\n\nThe output is `JSON`, so you can pipe it to `jq`.\n```sh\n./chrome.js list | jq .\n```\n\nReturns a struct like this:\n\n```json\n{\n  \"items\": [\n    {\n      \"title\": \"Inbox (1) - \u003chidden\u003e@gmail.com - Gmail\",\n      \"url\": \"https://mail.google.com/mail/u/0/#inbox\",\n      \"winIdx\": 0,\n      \"tabIdx\": 0,\n      \"arg\": \"0,0\",\n      \"subtitle\": \"https://mail.google.com/mail/u/0/#inbox\"\n    },\n    {\n      \"title\": \"iPhone - Apple\",\n      \"url\": \"https://www.apple.com/iphone/\",\n      \"winIdx\": 0,\n      \"tabIdx\": 1,\n      \"arg\": \"0,1\",\n      \"subtitle\": \"https://www.apple.com/iphone/\"\n    }\n  ]\n}\n```\n\n\u003e `arg` and `subtitle` are used for [Alfred](https://www.alfredapp.com/) integration.\n\n### Close a specific tab in a specific window\n\n\u003e `Window Index` and `Tab Index` is the `arg` returned by the `list` command.\n\n```js\n./chrome.js close 0,13\n```\n\n\n### Focus on a specific tab in a specific window\n\n```js\n./chrome.js focus 0,13\n```\n\n### Show help\n\n```sh\n./chrome.js \n```\n\n### Don't prompt the user\n\n`--yes` flag will cause no questions to be asked to the user. It'll close all tabs straight away.\n\n\u003e Attention: Use this with caution. Make sure you don't have any unsaved work, emails, ... etc.\n\n### Prompt user in Chrome\n\n`--ui` flag will cause the questions to be asked using a Chrome dialog instead of text in command line.\n\n```sh\n./chrome.js close --url apple --ui\n```\n\n## License\n\nCopyright (c) 2019 Renan Cakirerk\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvis-workflows%2Farvis-chrome-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farvis-workflows%2Farvis-chrome-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvis-workflows%2Farvis-chrome-control/lists"}