{"id":25144655,"url":"https://github.com/fzdwx/open","last_synced_at":"2025-04-03T06:14:23.412Z","repository":{"id":58122864,"uuid":"529804395","full_name":"fzdwx/open","owner":"fzdwx","description":"open url in browser / disk","archived":false,"fork":false,"pushed_at":"2024-04-10T08:28:02.000Z","size":8134,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T19:47:02.517Z","etag":null,"topics":["cli"],"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/fzdwx.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}},"created_at":"2022-08-28T08:27:27.000Z","updated_at":"2023-10-07T02:02:31.000Z","dependencies_parsed_at":"2024-04-10T09:44:24.727Z","dependency_job_id":null,"html_url":"https://github.com/fzdwx/open","commit_stats":{"total_commits":85,"total_committers":2,"mean_commits":42.5,"dds":0.0117647058823529,"last_synced_commit":"c5451fc9c6dd4d8fc2839131f5c48632ebab50eb"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fopen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fopen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fopen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzdwx%2Fopen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzdwx","download_url":"https://codeload.github.com/fzdwx/open/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944385,"owners_count":20858772,"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":["cli"],"created_at":"2025-02-08T19:47:07.671Z","updated_at":"2025-04-03T06:14:23.393Z","avatar_url":"https://github.com/fzdwx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open\n\nopen url in browser.\n\n![image](https://user-images.githubusercontent.com/65269574/213114721-8305b43e-2e8f-4a96-ad96-22a35ed2bc1a.gif)\n\n```bash\n$ open alias ls | fzf --preview 'open alias info {}' --bind 'enter:execute(open alias run {})'\n```\n\n## Installation\n\n```shell\ngo install github.com/fzdwx/open@latest \n```\n\n## about auth\n\n1. use gh cli: `gh auth login`\n2. or `export GH_TOKEN=xxx`\n\n## use case\n\navailable commands:\n\n```shell\n## Commands\nalias [subcommand]                  | Manage custom aliases                                     \ncompletion                          | Generate the autocompletion script for the specified shell\ngh [search keyword] | [subcommand]  | open github repo in browser                                  \nhelp [command]                      | Help about any command                                    \nhistory                             | Show open history                                         \nlog                                 | Show open log                                             \nurl                                 | open the specified url\n```\n\n### open url\n\nopen the specified url\n\n```shell\n$ open https://www.bilibili.com/\n$ open url https://www.bilibili.com/\n$ open /root/\n```\n\n### open alias\n\nUser can add alias for url.\n\n```shell\n## add\n$ open alias add https://fzdwx.github.io/ --name blog\n$ open alias add https://google.com/search?q=%s --name google\n\n## delete\n$ open alias remove blog\n\n## list\n$ open alias list\n\n## run\n$ open google \"hello world\"\n```\n\n### open gh\n\nopen github repo in browser\n\n```shell\n## Examples\n$ open gh        -\u003e open https://github.com\n$ open gh .      -\u003e open current dir in github\n$ open gh fzdwx  -\u003e open https://github.com/search?q=fzdwx\n$ open gh -l java sky -\u003e open https://github.com/search?q=sky\u0026l=java\n$ open gh fzdwx -u -\u003e https://github.com/search?q=fzdwx\u0026type=users\n\n## Commands\nprofile p | open your github profile in browser. eg: https://github.com/fzdwx   \nrepo    | search github repo. default is interactive\n\n## Flags\n-f, --closed      | search issues,pr status is closed             \n-c, --commits     | set search type is commits                    \n-d, --debug       | show log in console                           \n-s, --discussions | set search type is discussions                \n-h, --help        | help for gh                                   \n-i, --issues      | set search type is issues                     \n-l, --lang string | search programming languages. eg: go,java,rust\n-m, --marketplace | set search type is marketplace                \n-o, --open        | search issues,pr status is open               \n-g, --packages    | set search type is packages                   \n-p, --pr          | set search type is pull requests              \n-r, --repo        | set search type is repositories               \n-t, --topics      | set search type is topics                     \n-u, --users       | set search type is users                      \n-w, --wikis       | set search type is wikis\n```\n\n## config (env)\n\n```\nGH_TOKEN=xxx\nOPEN_PREVIEW=bat(fallback to cat)\n``` \n\n## RodeMap\n\n- [x] history\n    - [x] history record\n    - [x] history view\n- [x] custom alias\n    - [x] add alias\n    - [x] delete alias\n    - [x] list alias\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fopen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzdwx%2Fopen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzdwx%2Fopen/lists"}