{"id":20032329,"url":"https://github.com/weakish/hubsh","last_synced_at":"2026-05-13T09:32:37.900Z","repository":{"id":146349702,"uuid":"68106976","full_name":"weakish/hubsh","owner":"weakish","description":"command line GitHub/gogs API client in sh","archived":false,"fork":false,"pushed_at":"2022-09-11T15:07:33.000Z","size":472,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T18:11:58.514Z","etag":null,"topics":["0bsd","git","github-client","gogs-client","sh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weakish.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}},"created_at":"2016-09-13T12:38:11.000Z","updated_at":"2023-03-08T13:14:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"5dc2af59-a628-4d71-a9f9-24dee7e16e42","html_url":"https://github.com/weakish/hubsh","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhubsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhubsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhubsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fhubsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weakish","download_url":"https://codeload.github.com/weakish/hubsh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241463555,"owners_count":19967064,"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":["0bsd","git","github-client","gogs-client","sh"],"created_at":"2024-11-13T09:36:41.161Z","updated_at":"2026-05-13T09:32:32.878Z","avatar_url":"https://github.com/weakish.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"hubsh is a command line GitHub API client in sh\n\nFeatures\n--------\n\n- clone `[USER/]REPO`\n- create\n- fork and pull-request\n\nInstall\n--------\n\n### Dependencies\n\n- curl\n- git\n- sh\n\n### With `make`\n\n```sh\n; git clone https://github.com/weakish/hubsh\n; cd hubsh\n; make\n```\n\nFiles will be installed to `/usr/local/bin`.\nIf you want to install other place, edit `config.mk` before running `make`.\n\nMakefile is compatible with both GNU make and BSD make.\n\n### With basher\n\n```sh\n; basher install weakish/gister\n```\n\n### Manually\n\nCopy `bin/hubsh` and `bin/gogsh` to `$PATH`.\n\nUsage\n------\n\n```\n; hubsh --help\nhubsh -- GitHub API client in sh\n\nhubsh [ACTION]\n\nActions:\nauth         check if github acess token is available\nclone        supports clonning from `github_user/repo` and `repo` (your own repo)\ncreate       create this repository on GitHub and add GitHub as origin\nfork         make a fork of a remote repository on GitHub and add as remote\ngit-to-https convert github original from `git://` to `https://`\npull-request send a pull request at GitHub\nwhoami       show github username\nversion      show version\nhelp         this help page\n\nOptions for sub commands:\nclone        [USER/]REPO\ncreate       [-n NAME] [-d DESCRIPTION] [-u HOMEPAGE] [-p] [-I] [-W] [-D]\n             (p: private, I: disable issue, W: disable wiki, D: disable download)\ngit-to-https [-u BRANCH] (also change BRANCH tracking, BRANCH defaults to `master`)\npull-request [-b BASE_BRANCH] [-h HEAD_BRANCH] [[-m MESSAGE_FILE] | [-i ISSUE]]\n             (If `-m` is supplied, the first line of the file will become the subject,\n             the third line to end of file will become the description. If `-m` is not\n             supplied, message will use the most recent (single) commit message.)\n\nFiles:\n\nAuth token is queried in the following order:\n\n- Environment variable `$GITHUB_OAUTH_TOKEN`\n- content of file `$GITHUB_OAUTH_FILE`\n- content of file `~/.config/hubsh`\n- content of file `~/.config/hub`\n\n`hubsh install` will install the following aliases:\ncreate fork git-to-https get pull-request pr\nIf you have already defined aliases above, `hubsh` will keep the original one.\n```\n\nThe `Auth token` is a GitHub personal access token.\nYou need to get it from GitHub \u003e Settings.\n`hubsh auth` will print out a short instruction for getting the token.\n\nYou can add alias in `.gitconfig`, e.g. point `git pr` to `hubsh pull-request`.\n\nhubsh versus hub\n----------------\n\nhub is in Go, so it is supported on any platform supporting Go.\nhubsh is in sh, so it is supported on any platform supporting curl and sh.\n\nhubsh only implemented a small subset of hub features.\nBut there is one new feature `git-to-https`:\nIf some repository is cloned via `git://`, `git-to-https` will convert it to `https`.\n(Useful for insecure network.)\n\n`hubsh pull-request` is different to `hub pull-request`:\n\n- A diffstat is appended to pull request message.\n- hubsh will never bring you to an editor,\n  it either use a file given by `-m`, or just the most recent (single) commit message.\n- hubsh's `-m` is equivalent to hub's `-F`, and hubsh has no option for `-m MESSAGE` in hub.\n- hubsh does not support `-o` and `-f` in hub.\n\n`hubsh create` is also different:\n\n- Instead of `hub create [NAME]`, use `hubsh [-n NAME]`.\n- hubsh has `-I`, `-W`, `-D` to disable issue, wiki, and downloads.\n- If `-d` is not given, `hubsh` will use first line of README.\n- hubsh does not support create repo under organization yet (pull request welcome).\n\ngogsh\n-----\n\nThere is also a client to gogs server -- `gogsh`.\n`gogsh` is a simplified brother of `hubsh`.\nIt supports fewer actions and options.\n\ngh\n--\n\nhubsh was written years before GitHub introduced [gh] as its official command line tool.\nPreviously, the official tool for GitHub is `hub`, first written in Ruby, then in Go.\nI do not use hubsh anymore.\nI switched to [gh].\n\n[gh]: https://github.com/cli/cli\n\n### Usage\n\n```\ngogsh -- Gogs API client in sh\n\ngogsh [ACTION]\n\nActions:\nauth         check if gogs acess token is available\nclone        supports clonning from `gogs_user/repo` and `repo` (your own repo)\ncreate       create this repository on GitHub and add GitHub as origin\nwhoami       show gogsh username (specified in `$GOGS_USER`)\nversion      show version\nhelp         this help page\n\ngogs server is specified in `$GOGS_SERVER`.\nIf not specified, it defaults to `http://127.0.0.1:3000`.\n\nAuth token is queried in the following order:\n\n- Environment variable `$GOGS_OAUTH_TOKEN`\n- content of file `$GOGS_OAUTH_FILE`\n- content of file `~/.config/gogsh`\n```\n\nLicense\n--------\n\n0BSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fhubsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakish%2Fhubsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fhubsh/lists"}