{"id":40150877,"url":"https://github.com/dkaslovsky/tabgrab","last_synced_at":"2026-01-19T15:07:06.940Z","repository":{"id":229376045,"uuid":"776572967","full_name":"dkaslovsky/tabgrab","owner":"dkaslovsky","description":"A small command-line tool to extract or restore the URL of every open tab in the current browser window on macOS.","archived":false,"fork":false,"pushed_at":"2024-07-12T17:02:11.000Z","size":73,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-18T05:32:13.021Z","etag":null,"topics":["bookmarks","browser","command-line","macos","tabs"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dkaslovsky.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}},"created_at":"2024-03-23T21:54:29.000Z","updated_at":"2024-07-22T20:48:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a6c58f7-ce9e-472b-b13f-0568a19e7f0d","html_url":"https://github.com/dkaslovsky/tabgrab","commit_stats":null,"previous_names":["dkaslovsky/tabgrab"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dkaslovsky/tabgrab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaslovsky%2Ftabgrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaslovsky%2Ftabgrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaslovsky%2Ftabgrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaslovsky%2Ftabgrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkaslovsky","download_url":"https://codeload.github.com/dkaslovsky/tabgrab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaslovsky%2Ftabgrab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28572814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T14:39:55.009Z","status":"ssl_error","status_checked_at":"2026-01-19T14:39:01.217Z","response_time":67,"last_error":"SSL_read: 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":["bookmarks","browser","command-line","macos","tabs"],"created_at":"2026-01-19T15:07:02.790Z","updated_at":"2026-01-19T15:07:06.933Z","avatar_url":"https://github.com/dkaslovsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tabgrab\nA small command-line tool to extract or restore the URL of every open tab in the current browser window on macOS.\n\n\u003c/br\u003e\n\n### Overview and Usage\n`tabgrab` is a macOS-specific command-line tool to:\n* output the URL of all open tabs of the current browser window (`tabgrab grab`)\n* reopen tabs in a new browser window from a list of URLs (`tabgrab tabs`)\n\n```\n$ tabgrab -h\ntabgrab: extract and restore URL tabs to and from the active browser window\n\nUsage:\n  grab:\t\textracts the URL from each tab of the active browser window\n  tabs:\t\topens the provided URLs as tabs in a new browser window\n  close:\tcloses tabs based on URL matching\n  version:\tdisplays application version information\n\nRun `tabgrab \u003csubcommand\u003e -help` for subcommand usage and flags\n```\n\nExtract URLs from open tabs with the `grab` command:\n```\n$ tabgrab grab -h\n`grab` extracts the URL from each tab of the active browser window\n\nUsage of grab:\n  -browser string\n    \tbrowser name (default \"chrome\")\n  -clipboard\n    \tuse clipboard for input/output\n  -file string\n    \tpath for output file containing newline-delimited list of URLs\n  -max int\n    \tmaximum number of tabs (default 100)\n  -prefix string\n    \toptional prefix for each URL\n  -quiet\n    \tdisable console output\n  -template string\n    output format specifying tab URL with {{.URL}} tab name with {{.Name}} (default \"{{.URL}}\")\n  -verbose\n    \tenable verbose output\n```\n\nRestore tabs from a list of URL with the `tabs` command:\n```\n$ tabgrab tabs -h\n`tabs` opens the provided URLs as tabs in a new browser window\n\nUsage of tabs:\n  -browser string\n    \tbrowser name (default \"chrome\")\n  -browser-args string\n    \toptional space-delimited arguments to be passed to the browser\n  -clipboard\n    \tuse clipboard for input/output\n  -disable-prefix-warning\n    \tdisables warning for potentially mismatched prefix flag and URL prefixes (default false)\n  -file string\n    \tpath to file containing newline-delimited list of URLs, ignored if -urls or -clipboard flag is used\n  -max int\n    \tmaximum number of tabs (default 100)\n  -prefix string\n    \toptional prefix for each URL\n  -urls string\n    \tnewline-delimited list of URLs, typically the output from the grab command, ignored if -clipboard flag is used\n  -verbose\n    \tenable verbose output\n```\n\nClose tabs based on URL matching with the `close` command:\n```\n$ tabgrab close -h\n`close` closes tabs based on URL matching\n\nUsage of close:\n  -browser string\n    \tbrowser name (default \"brave\")\n  -clipboard\n    \tuse clipboard for input/output\n  -match string\n    \tspace delimited list of strings for matching tab URLs to close\n  -max int\n    \tmaximum number of tabs (default 100)\n  -no-match string\n    \tspace delimited list of strings for non-matching tab URLs to close\n  -prefix string\n    \toptional prefix for each URL\n  -verbose\n```\n\nThe following environment variables can be used to change default flag values:\n* `TABGRAB_BROWSER`: sets the default for the `browser` flag\n* `TABGRAB_BROWSER_ARGS`: sets the default for the `browser-args` flag\n* `TABGRAB_PREFIX`: sets the the default for the `prefix` flag\n* `TABGRAB_TEMPLATE`: sets the the default for the `template` flag\n\n\u003c/br\u003e\n\n### Examples\n\n#### Using stdout\nExtract all open tabs from the browser's current window (defaults)\n```\n$ tabgrab grab\nhttps://github.com/dkaslovsky/tabgrab/tree/main\nhttps://www.espn.com/\nhttps://news.ycombinator.com/\n```\n\nExtract at most 2 open tabs from the current Safari window and output with a specified prefix\n```\n$ tabgrab grab -browser safari -max 2 -prefix \"- \"\n- https://github.com/dkaslovsky/tabgrab/tree/main\n- https://www.espn.com/\n``` \n\n#### Output template\nExtract the name and URL from all open tabs and output in markdown format\n```\n$ tabgrab grab -template \"[{{.Name}}]({{.URL}})\"\n[ESPN - Serving Sports Fans. Anytime. Anywhere.](https://www.espn.com/)\n[Hacker News](https://news.ycombinator.com/)\n```\n\nCombine the above with a prefix\n```\n$ tabgrab grab -template \"[{{.Name}}]({{.URL}})\" -prefix \"* \"\n* [ESPN - Serving Sports Fans. Anytime. Anywhere.](https://www.espn.com/)\n* [Hacker News](https://news.ycombinator.com/)\n```\n\nA prefix can instead be included in the template string if so desired, but must be specified using the `-prefix` flag when restoring tabs with the `tabs` command.\n\n#### Using the clipboard\nTo extract all open tabs to the clipboard:\n```\n$ tabgrab grab -quiet -clipboard\n```\nURL tabs can then be restored from the clipboard:\n```\n$ tabgrab tabs -quiet -clipboard\n```\n\n#### Using a file\n```\n$ tabgrab grab -quiet -file \"my-tabs.txt\"\n```\nURL tabs can then be restored from the clipboard:\n```\n$ tabgrab tabs -quiet -file \"my-tabs.txt\"\n```\n\n#### Multiple outputs\nOutput is written to each of stdout, the clipboard, and a specified file by including both the `-file` and `-clipboard` flags and removing the `-quiet` flag.\n\n\u003c/br\u003e\n\n#### Close tabs\nClose tabs with URLs containing \"foo\":\n```\n$ tabgrab close -match \"foo\"\n```\nClose tabs with URLs containing \"foo\" and \"bar\":\n```\n$ tabgrab close -match \"foo bar\"\n```\nClose tabs with URLs not containing \"foo\":\n```\n$ tabgrab close -no-match \"foo\"\n```\nClose tabs with URLs containing \"foo\" but not containing \"bar\":\n```\n$ tabgrab close -match \"foo\" -no-match \"bar\"\n```\n\n\n\u003c/br\u003e\n\n### Support status for common browsers\n* ChatGPT Atlas - supported\n* Chrome  - supported (default)\n* Brave   - supported\n* Comet   - supported\n* Safari  - supported\n* Firefox - not supported due to compatibility issues with the method used for extracting tab URLs\n\n\u003c/br\u003e\n\n### Installation Options\n* Download a pre-built binary (see [releases](https://github.com/dkaslovsky/tabgrab/releases/latest)):\n  \n    ARM:\n    ```\n    $ curl -o tabgrab -L https://github.com/dkaslovsky/tabgrab/releases/latest/download/tabgrab_darwin_arm64\n    ```\n    AMD:\n    ```\n    $ curl -o tabgrab -L https://github.com/dkaslovsky/tabgrab/releases/latest/download/tabgrab_darwin_amd64\n    ```\n\n* Install using Go:\n    ```\n    $ go install github.com/dkaslovsky/tabgrab@latest\n    ```\n\n* Build from source by cloning this repository and running `go build` in the `tabgrab` root directory.\n\n\u003c/br\u003e\n\n### Security\n`tabgrab` makes no guarantees about security and executes shell commands/Apple Scripts to open browser applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaslovsky%2Ftabgrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkaslovsky%2Ftabgrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaslovsky%2Ftabgrab/lists"}