{"id":23609628,"url":"https://github.com/corverroos/opengithub","last_synced_at":"2026-05-09T09:40:37.653Z","repository":{"id":140529689,"uuid":"546552542","full_name":"corverroos/opengithub","owner":"corverroos","description":"Open source code in Github","archived":false,"fork":false,"pushed_at":"2022-10-06T09:47:06.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-27T15:13:32.012Z","etag":null,"topics":["github","go","goland","intellij"],"latest_commit_sha":null,"homepage":"","language":"Go","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/corverroos.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-06T09:01:43.000Z","updated_at":"2022-10-06T09:31:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f16dd3eb-494a-47d1-a1ee-9a394ec1d2f7","html_url":"https://github.com/corverroos/opengithub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Fopengithub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Fopengithub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Fopengithub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corverroos%2Fopengithub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corverroos","download_url":"https://codeload.github.com/corverroos/opengithub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475961,"owners_count":19645041,"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":["github","go","goland","intellij"],"created_at":"2024-12-27T15:13:34.671Z","updated_at":"2025-11-05T22:30:27.926Z","avatar_url":"https://github.com/corverroos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Opengithub\n\n\u003e `opengithub` is a simple tool to open source code in Github. \n\nIt can also be used to quickly and easily share links to locally checked-out code.\n\n## Usage \n\n1. Install `opengithub`:\n```shell\ngo install github.com/corverroos/opengithub\n```\n\n2. Copy a reference to local checked-out source code to the clipboard:\n   - IntelliJ on MacOS, select a line of code and either press `ALT-SHIFT-COMMAND-C` or `Right-click \u003e Copy \u003e Copy Reference`.\n   - The copied code should be in the format: `path/to/file.ext` or `path/to/file.ext:123`\n\n3. Run `opengithub` on your cli to open that file in Github using the default browser:\n```shell\nopengithub\n```\n\n4. Optionally configure `opengithub`:\n   - Explicitly provide the file (default to clipboard): `--file=repo/folder/file.go:123`\n   - Disable auto opening: `--open=false`\n   - Root directory to search for resolve paths (defaults to current dir): `--root=/path/to/my/repos` or `export OPENGITHUB_ROOT=/path/to/my/repos`\n   - Git branch to use (defaults to current branch): `--branch=main` or `export OPENGITHUB_BRANCH=main`\n   - Concise alias: `alias ogh=\"opengithub --root=/path/to/my/repos --branch=main\"`\n\n5. Configure it as an Intellij \"External Tool\":\n   - `Preferences \u003e Tools \u003e External Tools \u003e Add`\n     - Program: `opengithub`\n     - Arguments: `--file=$FilePath$:$LineNumber$`\n     - Working Directory: `$ProjectFileDir$`\n   - Then just select some code, then select `Tools \u003e External Tools \u003e opengithub`\n   \n![Add IntelliJ External Tool](intellij.png \"Add IntelliJ External Tool\")\n\n## Notes\n\nThis is similar to the IntelliJ plugin [Open in Github](https://plugins.jetbrains.com/plugin/7190-open-in-github) which I couldn't get to work.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorverroos%2Fopengithub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorverroos%2Fopengithub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorverroos%2Fopengithub/lists"}