{"id":50410943,"url":"https://github.com/knu/open-chromium","last_synced_at":"2026-05-31T03:30:59.673Z","repository":{"id":360835820,"uuid":"1251356303","full_name":"knu/open-chromium","owner":"knu","description":"Command line tools for opening URLs in Chromium-based browsers on macOS — picking a profile, an Edge workspace, or a specific window, and reusing an existing tab when one is open.","archived":false,"fork":false,"pushed_at":"2026-05-28T03:02:57.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T05:05:49.901Z","etag":null,"topics":["browser","chrome","chromium","cli","command-line-tool","jxa","macos","microsoft-edge","osascript","url-opener"],"latest_commit_sha":null,"homepage":null,"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/knu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"knu"}},"created_at":"2026-05-27T13:52:45.000Z","updated_at":"2026-05-28T03:03:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/knu/open-chromium","commit_stats":null,"previous_names":["knu/open-chromium"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/knu/open-chromium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knu%2Fopen-chromium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knu%2Fopen-chromium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knu%2Fopen-chromium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knu%2Fopen-chromium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knu","download_url":"https://codeload.github.com/knu/open-chromium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knu%2Fopen-chromium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33718446,"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-05-31T02:00:06.040Z","response_time":95,"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":["browser","chrome","chromium","cli","command-line-tool","jxa","macos","microsoft-edge","osascript","url-opener"],"created_at":"2026-05-31T03:30:58.990Z","updated_at":"2026-05-31T03:30:59.664Z","avatar_url":"https://github.com/knu.png","language":"JavaScript","funding_links":["https://github.com/sponsors/knu"],"categories":[],"sub_categories":[],"readme":"# open-chromium\n\nCommand line tools for opening URLs in Chromium-based browsers on macOS — picking a profile, an Edge workspace, or a specific window, and reusing an existing tab when one is already open.\n\n`open-chromium` drives Microsoft Edge, Google Chrome, Chromium, and other Chromium variants via JXA, so it can do things `open -a` cannot: select a profile through the Profiles menu, target a window by title or by Edge workspace, and activate an already-open tab matching a URL.  `open-browser` is a thin wrapper that picks the first installed candidate browser (Edge → Chrome → Chromium by default) and forwards to `open-chromium`.  `chromium-profile` is a helper that resolves profile display names to on-disk directories and looks up Edge workspaces by name or UUID.\n\n## Installation\n\nDrop the scripts somewhere on your `PATH`:\n\n```console\n% git clone https://github.com/knu/open-chromium.git\n% cp open-chromium/bin/* ~/bin/\n```\n\nKeep the three scripts (`open-browser`, `open-chromium`, `chromium-profile`) in the same directory so they can find each other.\n\n### Requirements\n\n- macOS with at least one Chromium-based browser installed (Microsoft Edge, Google Chrome, Chromium, ...).\n- `jq` on `PATH` — used by `open-browser` to read each browser's `Local State`.  Install via `brew install jq`.\n- Ruby — used by `chromium-profile`.  The system Ruby works.\n- `leveldb` — only needed when resolving Microsoft Edge workspaces by name.  Install via `brew install leveldb`.\n- [`macwin-cli`](https://github.com/knu/macwin) — optional.  When present, `open-chromium` uses it to raise a single window by title without disturbing the rest of the browser's window stack.  Without it, the script falls back to raising the whole application.\n\n## Usage\n\n```console\n% open-browser [-a APPS] [-p PROFILE] [-d PROFILE_DIR] [-w WINDOW] [-i] [-I] URL\n% open-chromium [-a APP] [-p PROFILE] [-d PROFILE_DIR] [-w WINDOW] [-i] [-I] URL\n% chromium-profile [-a APP] dir PROFILE_NAME\n% chromium-profile [-a APP] [-p PROFILE_DIR] workspace (uuid NAME | name UUID | list)\n```\n\nOpen a URL in the first installed browser (Edge, Chrome, then Chromium):\n\n```console\n% open-browser https://example.com/\n```\n\nPick a profile by its display name (as it appears in the browser's Profiles menu):\n\n```console\n% open-browser -p Personal https://example.com/\n```\n\nPick a profile by its on-disk directory (e.g. `Default`, `Profile 2`).  `-d` wins over `-p`:\n\n```console\n% open-browser -d \"Profile 2\" https://example.com/\n```\n\nPick the browser explicitly.  Multiple candidates can be given with `:`, tried in order:\n\n```console\n% open-browser -a \"Google Chrome:Microsoft Edge\" https://example.com/\n```\n\nActivate (or open in) a window with a given title.  Multiple candidates can be given with `:`:\n\n```console\n% open-browser -w \"Work\" https://example.com/\n```\n\nFor Microsoft Edge, `-w` also accepts a workspace UUID or workspace name.  An already-open window matching the title is preferred; only if no such window is open is a workspace launch attempted:\n\n```console\n% open-browser -a \"Microsoft Edge\" -p Work -w \"Project Alpha\" https://example.com/\n```\n\nOpen in incognito mode:\n\n```console\n% open-browser -i https://example.com/\n```\n\nReuse an existing tab when the URL matches ignoring the query string:\n\n```console\n% open-browser -I https://example.com/search?q=foo\n```\n\nIf a tab for the URL is already open in any window of the chosen profile, that tab is activated instead of opening a new one.  If a `chrome://newtab/` or `edge://newtab/` tab is open, it is reused.  When the URL is omitted, `open-chromium` just raises the matching window.\n\n## chromium-profile\n\n`chromium-profile` looks up Chromium browser metadata directly from `Local State` and (for Edge workspaces) the profile's `Sync Data/LevelDB`:\n\n```console\n% chromium-profile -a \"Microsoft Edge\" dir Personal\nDefault\n% chromium-profile -a \"Microsoft Edge\" -p Default workspace list\n01234567-89ab-cdef-0123-456789abcdef\tProject Alpha\n...\n% chromium-profile -a \"Microsoft Edge\" -p Default workspace uuid \"Project Alpha\"\n01234567-89ab-cdef-0123-456789abcdef\n% chromium-profile -a \"Microsoft Edge\" -p Default workspace name 01234567-89ab-cdef-0123-456789abcdef\nProject Alpha\n```\n\nExit status is `0` on a unique match, `1` on no match, `2` on ambiguous match, and `3` on a usage or runtime error.\n\n## Options\n\n### `open-browser`\n\n- `-a APPS` — `:`-separated list of preferred browsers, tried in order; falls back to `Microsoft Edge:Google Chrome:Chromium`.\n- `-p PROFILE` — `:`-separated list of profile display names (as shown in the Profiles menu).\n- `-d PROFILE_DIR` — On-disk profile directory (e.g. `Default`, `Profile 2`).  Wins over `-p`.\n- `-w WINDOW` — `:`-separated list of window titles, or — for Microsoft Edge — workspace names or UUIDs.\n- `-i` — Open in incognito mode.\n- `-I` — Match tabs by URL ignoring the query string.\n\n### `open-chromium`\n\nSame flags as `open-browser`, except `-a` takes a single application name.\n\n### `chromium-profile`\n\n- `-a APP` — Browser app name (default: `Microsoft Edge`).\n- `-p PROFILE_DIR` — Profile directory name (default: `Default`).\n\n## How it works\n\n- Profile selection drives the browser's Profiles menu via System Events, so it works even when a browser does not expose `--profile-directory` on relaunch.\n- When `macwin-cli` is available, the target window is raised by title without disturbing the rest of the application's window stack.  Without it, `open-chromium` falls back to app-level activation.\n- Edge workspaces are resolved from the profile's `Sync Data/LevelDB`.  If Edge is running and holds the database lock, `chromium-profile` snapshots the LevelDB files to a temporary directory and opens that copy.\n\n## Author\n\nCopyright (c) 2026 Akinori Musha.\n\nLicensed under the MIT license.  See `LICENSE` for details.\n\nVisit the [GitHub Repository](https://github.com/knu/open-chromium) for the latest information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknu%2Fopen-chromium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknu%2Fopen-chromium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknu%2Fopen-chromium/lists"}