{"id":13804544,"url":"https://github.com/wirepair/gcd","last_synced_at":"2025-05-13T17:32:35.230Z","repository":{"id":19077386,"uuid":"22304690","full_name":"wirepair/gcd","owner":"wirepair","description":"Unofficial implementation of the Google Chrome Remote Debugger in Go","archived":false,"fork":false,"pushed_at":"2024-10-16T04:05:44.000Z","size":6908,"stargazers_count":185,"open_issues_count":2,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-17T16:28:59.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/wirepair.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-07-27T06:11:19.000Z","updated_at":"2024-10-16T14:17:19.000Z","dependencies_parsed_at":"2023-12-07T01:54:21.011Z","dependency_job_id":"b0bd4539-d591-46ac-8392-7ec72489cedc","html_url":"https://github.com/wirepair/gcd","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirepair%2Fgcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirepair%2Fgcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirepair%2Fgcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wirepair%2Fgcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wirepair","download_url":"https://codeload.github.com/wirepair/gcd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225247902,"owners_count":17444137,"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-08-04T01:00:49.846Z","updated_at":"2024-11-18T20:32:06.882Z","avatar_url":"https://github.com/wirepair.png","language":"Go","funding_links":[],"categories":["Chrome DevTools Protocol"],"sub_categories":["Libraries for driving the protocol (or a layer above)"],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/wirepair/gcd)](https://goreportcard.com/report/github.com/wirepair/gcd)\n\n# Google Chrome Debugger (GCD)\n\nThis is primarly an auto-generated client library for communicating with a Google Chrome Browser over their [remote client debugger protocol](https://developer.chrome.com/devtools/docs/debugger-protocol). Note that their documentation is partially incorrect and does not contain a lot of the API calls that are actually available.\n\nBecause I'm lazy and there are hundereds of different custom types and API methods, this library has been automatically generated using their [protocol.json](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/devtools/protocol.json\u0026q=protocol.json\u0026sq=package:chromium\u0026type=cs).\n\nThe [gcdapigen](https://github.com/wirepair/gcd/tree/master/v2/gcdapigen) program was created to generate types, event types and commands for gcd.\n\n# Changelog\n\nSee the [CHANGELOG](https://github.com/wirepair/gcd/tree/master/CHANGELOG.md).\n\n## Dependencies\n\ngcd requires the [gcdapi](https://github.com/wirepair/gcd/tree/master/v2/gcdapi) and [gcdmessage](https://github.com/wirepair/gcd/tree/master/v2/gcdmessage) packages. gcdapi is the auto-generated API. gcdmessage is the glue between gcd and gcdapi so we can keep the packages clean.\n\n## The API\n\nThe API consists of of synchronous requests, asynchronous requests / events. Synchronous requests are handled by using non-buffered channels and methods can be called and will return once the value is available. Events are handled by subscribing the response method type and calling the API's \"Enable()\" such as:\n\n```Go\n    target, err := debugger.NewTab()\n    if err != nil {\n    \tlog.Fatalf(\"error getting new tab: %s\\n\", err)\n\t}\n\tconsole := target.Console\n\n\ttarget.Subscribe(\"Console.messageAdded\", func(target *ChromeTarget, v []byte) {\n\n\t\tmsg := \u0026gcdapi.ConsoleMessageAddedEvent{}\n\t\terr := json.Unmarshal(v, msg)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"error unmarshalling event data: %v\\n\", err)\n\t\t}\n\t\tlog.Printf(\"METHOD: %s\\n\", msg.Method)\n\t\teventData := msg.Params.Message\n\t\tlog.Printf(\"Got event: %s\\n\", eventData)\n\t})\n\tconsole.Enable()\n\t// recv events\n\t// console.Disable()\n```\n\n## Usage\n\nFor a full list of api methods, types, event types \u0026 godocs: [Documentation](https://godoc.org/github.com/wirepair/gcd/v2/gcdapi)\n\n## Examples\n\nSee [examples](https://github.com/wirepair/gcd/tree/master/v2/examples)\n\n## Licensing\n\nThe MIT License (MIT)\n\nCopyright (c) 2020 isaac dawson\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\nall copies 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\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirepair%2Fgcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwirepair%2Fgcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwirepair%2Fgcd/lists"}