[HN Gopher] GitHub CLI is now in beta ___________________________________________________________________ GitHub CLI is now in beta Author : twapi Score : 357 points Date : 2020-02-12 17:05 UTC (5 hours ago) (HTM) web link (github.blog) (TXT) w3m dump (github.blog) | kbd wrote: | It's frustrating that they'd release a new CLI and nowhere | address its relation to their existing 'hub' CLI. | | Edit: found a note in their readme on github: | https://github.com/cli/cli#comparison-with-hub | | > For many years, hub was the unofficial GitHub CLI tool. gh is a | new project for us to explore what an official GitHub CLI tool | can look like with a fundamentally different design. While both | tools bring GitHub to the terminal, hub behaves as a proxy to git | and gh is a standalone tool. | OJFord wrote: | > hub was the unofficial GitHub CLI tool. | | 'unofficial'... https://hub.github.com/ | | I officially despise how meaningless '[un]official' has become. | scarejunba wrote: | I love it. There being a spectrum between "blessed" and "work | of a random" means that we get more software. | | And in the end, since it's open source, it's up to me whether | I derive value from it. | OJFord wrote: | ? My point is that it wasn't 'work of a random'; it was in | a repo under the `github` org; with a first-party GitHub | website. | | OSS is great, I agree, my issue is just with the weird | description of GitHub's older similar tool. | codingaround wrote: | and done by one of the founders. | | But github despises its own 2 founders. As it grew, | culture changed and founders became enemies. So it became | better to write a new tool rather that cooperating with | some people. | | Hub has been in development since 2009, for sure the gh | team could had cooperated. | scarejunba wrote: | That's _my_ point. If a company can release something | without being on the hook for it, that 's awesome. It | encourages them to release half-baked stuff alongside | their platinum stuff which is something I desire far more | than having them only release stuff that's full-baked. | | Simply put, I prioritize more software way more than I | prioritize officialness etc. | turdnagel wrote: | Frustrating that the CLI is an "open" beta while the iOS and | Android clients are not. I'd love to test the iOS beta but I have | no idea where I am on the waiting list. | dijit wrote: | Anything similar to this for gitlab? | simon04 wrote: | https://zaquestion.github.io/lab/ - Lab wraps Git or Hub, | making it simple to clone, fork, and interact with repositories | on GitLab | EamonnMR wrote: | My cynical side wonders if this is a case of Embrace Extend | Extinguish-move developer mindshare off of git (GitHub as | commodity git hosting) and into vendor lock-in. | zelly wrote: | Yes, time to move to gitlab or self hosted gitlab | sneak wrote: | The time to do that was when people asked GitHub to stop | providing services to ICE to help run concentration camps for | children and their military-industrial complex owners at | Microsoft just shrugged and said "whatever". (It continues to | date. Microsoft has always been more than happy to sell | software to the violent and authoritarian. The Snowden slides | are PowerPoint.) | | https://techcrunch.com/2019/11/13/github-faces-more- | resignat... | | But yes, time to switch. I highly recommend Gitea + Drone, | it's the setup I use. Gitea thankfully supports U2F (and | oauth for logging into Drone) which is awesome, and although | they took shit for plainly ripping off GitHub's UI back when | GitHub was beloved, it's super convenient to have a nearly | identical UI to switch to now. | Ididntdothis wrote: | It sort of makes sense with MS being the owner. I definitely | notice that a lot of the new grads don't really know about git. | They think it's all Github. | grogenaut wrote: | I've had a lot of freelancers lately who when I ask for their | ssh public key they send me their GitHub username. Like 10 in | a row. Half of them had public keys even. | | Yet at work no one has this issue with our ghe | GauntletWizard wrote: | Yeah, I don't get that. I use my github as a repository of | my public keys - At least partially because Ubuntu will now | ask for a github username to prefill authorized_keys, but I | had a curl script set up before that - But I would not | confuse "Here's where there's an updated list of my keys" | for "Here's a key"; The response is, at best, `*[]key` | rather than `key` (and assuming you know the | github.com/$USER.keys syntax, which isn't exactly standard) | ronsor wrote: | We're now on "extend." I wonder when "extinguish" will come. | bisby wrote: | For the true pure "EEE" experience. they would need to be | pushing us back towards some other MS product. | | Embrace git. Extend git. Extinguish git. Everyone is tired | of git and just goes to Microsoft VSCode Repos. | | With "gh" in theory they could do that: get everyone using | a custom tool... and while no one is paying attention, | change out the backing infrastructure to use MS Repos Tool. | And you wont even notice because gh was built to make the | transition seamless. (I doubt this is truly the case | because there is a lot of automated tooling that uses git | that would break in that case) | | And now when you decide you want to pull your code off | github to go to gitlab, it becomes too much of a hassle. | juped wrote: | What about Github was ever not vendor lock-in? | clSTophEjUdRanu wrote: | They can't extinguish anything if users don't switch. Users | won't switch unless it provides value. | kzzzznot wrote: | The point is this CLI is providing value. Do you disagree? | strictfp wrote: | So extend? | eeZah7Ux wrote: | Coming from a company with a _40 years_ long tradition of EEE? | Nooo... | miguelmota wrote: | From hub's main developer Mislav's blog [0] | | > Since I personally don't find it valuable to spend my time | maintaining two separate command-line clients for GitHub, I will | gradually reduce my involvement with hub to a point where it | either goes into complete feature-freeze mode or finds new | maintainership. | | So it sounds like gh will be the successor to hub. | | [0] https://mislav.net/2020/01/github-cli/ | tilolebo wrote: | From https://github.com/cli/cli#installation-and-upgrading | | > gh is available via scoop | | And I've been using chocolatey the whole time :facepalm. | | How does scoop compare to choco? (Except for the obvious "no | admin permissions needed") | GordonS wrote: | Scoop is more opinionated, in that there is a single, canonical | version of each app. My experience with chocolately is very | different, as there are often multiple different packaged | versions of any given app, and you've no idea which is the | "best" one. | tilolebo wrote: | I usually go for the one with the most downloads, but it's | true that it can be confusing. Reminds me of the SUSE package | web search back in the days. | iza wrote: | See https://github.com/lukesampson/scoop/wiki/Chocolatey- | Compari... | | In general it is much simpler in its design and implementation. | Most packages are portable and do not use installers. It | doesn't have quite as many packages as chocolatey though. | vips7L wrote: | I've never used Choco, but scoop is fantastic. It's very easy | to contribute to and use. | rumblefrog wrote: | From my experience, I find that Chocolately has way more | packages in their main "bucket" compared to searching for | buckets with choco, however, I do like the isolation of | installed programs with choco. | [deleted] | xvilka wrote: | With some extension even navigating issues can be done in cli | through markdown viewer in console (I opened a suggestion[1] in | Hub's repository). | | [1] https://github.com/github/hub/issues/2192 | KenanSulayman wrote: | Is there a way to install this without using Homebrew? I know | that the author of it works at Github now, but that definitely | shouldn't be the only option.. | blueline wrote: | there are prebuilt binaries | https://github.com/cli/cli/releases/tag/v0.5.4 | geerlingguy wrote: | I've been using Hub[1] (though not aliased to `git`) for years | now, and it's PR management capabilities have been invaluable | working on larger projects. Hopefully GitHub CLI is as stable and | reliable! | | It looks like the main features I use from Hub are already well- | supported in the GitHub CLI, and it looks like whether or not Hub | will still be maintained is an open question[2]. | | Edit: Just noting that `brew install github` doesn't work, it's | actually `brew install github/gh/gh` -- that's a new format for | brew packages I haven't seen before. | | [1] https://github.com/github/hub | | [2] https://github.com/github/hub/issues/2470 | stockkid wrote: | Yeah, Hub is such a valuable tool for automating common tasks | on GitHub such a releasing. Hopefully GitHub CLI will maintain | a feature parity with Hub so that people can transition | smoothly if needed. | cweagans wrote: | brew install github/gh/gh is a shortcut for brew tap github/gh | && brew install gh | | It has worked for several years now, but I'm not sure if it's | documented anywhere. | geerlingguy wrote: | Ah, that makes sense. I've never seen that shortcut before, | but the tap & brew pattern is more familiar. | blackandblue wrote: | also wondering what is going to happen to hub... | Spiritus wrote: | Try `brew install gh` instead, it's part of homebrew/core. | douglasfshearer wrote: | The main developer of this at Github wrote a blogpost about the | design decisions behind CLI, and how it fits/replaces Hub. [0] | | [0] https://mislav.net/2020/01/github-cli/ | [deleted] | rudiv wrote: | I use a similar tool for GitLab [1], I wonder if this will | propel GitLab to maybe put some money and effort into | officially supporting it. | | [1] https://github.com/zaquestion/lab | ekimekim wrote: | One thing I really hope they keep from Hub is the way it | creates pull requests, namely by opening $EDITOR and using the | first line as the PR title and the rest as description, ie. | exactly the same mechansim as git uses for "git commit". | | Needing to navigate a menu to set title and description as it | seems to show in the screenshots seems like completely | unnessecary friction. | geerlingguy wrote: | For the title, it prompts, then for the description, it lets | you either enter an editor of your choice. | | The thing I like most about it in a little use today, though, | is when it goes to create the PR, it lets you choose to | create it directly, or open a 'preview' of the PR in the | browser. This is nice for creating Draft PRs which you're | still working on and should not yet be merged (since, right | now, there's no way to create a PR then put it back into | 'Draft' state). | earenndil wrote: | > first line as the PR title and the rest as description | | > exactly the same mechanism as git uses for "git commit" | | That's not how git commit works. git commit opens $EDITOR and | makes a list of lines (sans commented-out lines) from that. | The first line being a title is only convention, whereas in a | github PR it's a formal element of the system. | wtallis wrote: | It's a bit more than just a convention, since `git log` has | lots of formatting options that rely on that first line | being the title/subject. | CydeWeys wrote: | It's not really just convention. Git commit messages map | directly to emails for workflows that don't use web UIs | like GitHub, with the first line being the subject and the | rest being the email body. That's how you mail a commit to | someone else for them to review it or incorporate it into | their local repo. | | If you don't format your commit messages properly then | they'll just be a sloppy mess in any email-based workflow | (like what Linux uses). | | And the first line is the only line that's displayed in | contexts like `git log`, so it truly is the commit summary | even if you aren't emailing commits. | RandallBrown wrote: | I would be surprised if it didn't work that way. That's the | way PRs work on their website too. | OJFord wrote: | > Edit: Just noting that `brew install github` doesn't work, | it's actually `brew install github/gh/gh` -- that's a new | format for brew packages I haven't seen before. | | It's not new, but what you've perhaps seen is more like `brew | install OJFord/formulae/gh` - 'most' (I haven't surveyed, but | in my experience) people call the repo `homebrew-formulae`, | `homebrew-` gets stripped, leaving: | | > `<GH user>/<repo name less 'homebrew-'>/<formula name>` | jrochkind1 wrote: | Huh, I'm confused that this announcement doesn't even mention | the existing `hub` tool, which is also in the `github` | organization... this is a new rewrite replacement for it? | | I agree the main thing I use `hub` for is PR management. | Specifically creating PRs. | | It had seemed to me that hub was somewhat undermaintained | lately, so I guess I'm glad they've released a new tool which | appears to maybe cover the same things, which perhaps will be | better maintained.... but confused that they are releasing a | new tool which does the same thing as an already existing tool | also from github... | ad_hominem wrote: | Hub was created by Chris Wanstrath, one of the original | GitHub founders, so it's not surprising there's no reference | to it. There's a damnatio memoriae of GitHub's founders and | founding story because of certain subcultures that were | fostered there by the people they chose to hire. | nixpulvis wrote: | So dumb, these are the people who literally created GitHub, | show them the damn respect they deserve. `hub` (a tool I | use to this day) is clearly the predecessor to this | official CLI. | pjc50 wrote: | Could you elaborate, or at least spill the tea? | jamie_ca wrote: | Circa 2014 there was a big blowup of allegations | centering around then-CEO Tom Preston-Werner and his wife | (not an employee, but worked at the office). Tom resigned | as a result. | | I don't know why Wanstrath would be excised from | collective history though - he was founding CEO | (2008-2012) and stepped in again after Tom (2014-2017). | Wikipedia says he's now a technical fellow at MS since | the acquisition. | billygriffin22 wrote: | Hi! I'm on the team building GitHub CLI. We're definitely eager | for your feedback on what things feel like they're missing, and | especially if something is broken or doesn't feel stable or | reliable. Feel free to open an issue if there's anything that | stands out. | | The different homebrew installation you referred to is because | `gh` isn't part of homebrew/core yet as it's very new. So we'll | be adding it in the coming months, but for now that's just a | way for us to maintain our own tap and still provide an easy | install/upgrade path. | cs02rm0 wrote: | _We 're definitely eager for your feedback on what things | feel like they're missing_ | | Uploading releases please! | [deleted] | Spiritus wrote: | >`gh` isn't part of homebrew/core yet as it's very new. So | we'll be adding it in the coming months | | It's been part of homebrew/core for something like two weeks: | https://github.com/Homebrew/homebrew- | core/blob/master/Formul... | atombender wrote: | I use "hub browse" a lot. It's a really quick way to open a | local directory's Github repo. | | Unfortunately, it's quite limited. No way to open a specific | file, for example, or jump to a specific branch other than | the current one. | | I'd love to have something like "gh open". | billygriffin22 wrote: | It's on our roadmap! https://github.com/cli/cli/issues/217 | pooper wrote: | Congratulations on shipping! | | Just installed it on fedora using dnf and tried my usual git | commands using hub instead. So far so good. I haven't tried | any hub specific features yet though. | | It is nice that I can just dnf install hub | billygriffin22 wrote: | Thanks! I'm definitely curious what you think when you | start venturing into creating and checking out PRs in | particular, and how we're managing the `pr status` and | `issue status` commands in terms of what's shown vs. what | you expect or would like to see to get the most relevant | context. | hamidul wrote: | https://www.facebook.com/Norwegian-CrossFit-Final-2020-Live-... | https://www.facebook.com/Norwegian-CrossFit-Championship-Fin... | https://www.facebook.com/Norwegian-CrossFit-Championship-Fin... | https://www.facebook.com/Norwegian-CrossFit-Championship-202... | https://www.facebook.com/CrossFit-Championship-2020-Live-Onl... | https://www.facebook.com/Norwegian-CrossFit-Championship-202... | https://www.facebook.com/Norwegian-CrossFit-Championship-Fin... | https://www.facebook.com/Norwegian-CrossFit-Championship-Fin... | https://www.facebook.com/Norwegian-CrossFit-Championship-202... | https://www.facebook.com/Norwegian-CrossFit-2020-Live-Online... | https://www.facebook.com/Norwegian-CrossFit-Championship-Fin... | https://www.facebook.com/Norwegian-CrossFit-Championship-202... | | https://www.facebook.com/TribalClashAustralia/ | | https://www.facebook.com/Rally-Sweden-2020-Live-Online-10714... | https://www.facebook.com/Rally-Sweden-2020-Live-110507593858... | https://www.facebook.com/Rally-Sweden-2020-102007734721523/ | https://www.facebook.com/WRC-Rally-Sweden-2020-Live-Online-1... | https://www.facebook.com/WRC-Rally-Sweden-2020-Live-10624078... | https://www.facebook.com/WRC-Rally-Sweden-2020-1066217809192... | | https://www.facebook.com/World-Championships-Biathlon-Anthol... | https://www.facebook.com/IBU-World-Championships-Biathlon-An... | https://www.facebook.com/IBU-World-Championships-Biathlon-An... | https://www.facebook.com/World-Championships-Biathlon-2020-1... | https://www.facebook.com/World-Championships-Biathlon-2020-L... | https://www.facebook.com/World-Championships-Biathlon-2020-L... | https://www.facebook.com/Biathlon-World-Championships-Anthol... | https://www.facebook.com/World-Championships-Biathlon-Anthol... | https://www.facebook.com/World-Championships-Biathlon-Anthol... | reddit_clone wrote: | How does this work with internally hosted github server? When I | tried a command on an existing clone folder, it wants to go to | github.com to authenticate. | billygriffin22 wrote: | We don't have GitHub Enterprise Server support yet, but that's | something we're planning to work on after gh is out of beta. | imjustsaying wrote: | Has anyone made a customizable URL bar CLI like Duckduckgo's | shebangs (which is not customizable)? | | This is the new CLI i want most | est31 wrote: | Firefox has the ability to customize shebangs. | https://support.mozilla.org/en-US/kb/assign-shortcuts-search... | [deleted] | guessmyname wrote: | I am glad they used Go to develop this command line tool. | | Knowing how big GitHub is on Ruby and Node.js I was afraid they | had used one of these two languages to bootstrap the program. | | Being able to drop the binary in any computer and have it work | without hundreds of files as dependencies is a bless when you | write programs in Go. | coolreader18 wrote: | Hub[1], the previous Github CLI, was written in Go too, so I | don't think this is much of a surprise. | | [1]: https://github.com/github/hub | guessmyname wrote: | > _Hub, the previous Github CLI, was written in Go too, so I | don 't think this is much of a surprise._ | | Hub was originally a collection of Ruby scripts for +-3 years | [1]. They later refactored the code to use Go: | | * Initial commit on Dec 5, 2009 was 100% Ruby code [2] | | * @jingweno started a refactoring using Go on Apr 8, 2013 | [3][4] | | * The Go rewrite was merged to master on May 23, 2013 [5] | | [1] https://mislav.net/2020/01/github-cli/ | | [2] https://github.com/github/hub/tree/de9bfa2103ee81a547d4fc | 598... | | [3] https://github.com/github/hub/commit/d5615fcb6f9c983fbf5d | 129... | | [4] https://owenou.com/fast-github-command-line-client- | written-i... | | [5] https://github.com/github/hub/tree/0df403f14805d4962ee3ad | b22... | fwip wrote: | "Was written," not "was initially written." Edit: I see | you've edited your comment; I'm leaving this here as-is. | vmchale wrote: | > have it work without hundreds of files as dependencies is a | bless when you write programs in Go. | | lots of languages have that lol | eeZah7Ux wrote: | Shushh... | ksec wrote: | >Node.js | | They use Node.js? | erulabs wrote: | For whatever it's worth, GitHub is on GitHub: | https://github.com/github and says top languages are: Ruby, | JavaScript, Go, C, Shell in that order. | anderspitman wrote: | Embrace, extend, extinguish. Mostly kidding this looks cool. | elpakal wrote: | Awesome, but I really wish GH would open source all of their own | apps. I always find it hypocritical that they do not, given their | OSS advancement. | monkey_slap wrote: | gh is open source https://github.com/cli/cli/ | tengbretson wrote: | Were the GitHub devs doing _anything_ before Microsoft bought | them? All that comes to mind is Atom. MS seems to have really | been a shot in the arm for feature development at GH. | bhl wrote: | I was recently looking into CRDTs for text-editing, and was | surprised to see that Github devs were working on an | experimental text editor (Xray) [1] along with a finer-grained | version control system for real-time collaborative editing | (Memo) [2]. That project, however, seems to have been lost (and | archived) in the Microsoft reshuffling of things. | | [1] https://news.ycombinator.com/item?id=16525735 | | [2] https://github.com/atom-archive/xray/tree/master/memo_core | vmchale wrote: | Wonderful! Was that the fruit of your searches? It seems like | an interesting topic. | bhl wrote: | There are other libraries that I've found and used, Yjs [1] | for an example because it supports the text editor | (ProseMirror) I'm building upon. However, a good version | control system for CRDTs, like git for flat text, does not | still exist. | | [1] http://yjs.dev/ | anchpop wrote: | Memo is really cool, I'm sad it seems to not be worked on | anymore. | Macha wrote: | GitHub Enterprise mostly, I guess. | m0zg wrote: | That's how startups work pre-acquisition. Your acquisition | price is dependent in part on how "large" the company is, that | is, how many employees you have. So the companies start out | small, hiring only the folks who know what they're doing, but | as time progresses and they start thinking about selling | themselves, they hire a bunch of people who have no clue | whatsoever, just to pad the numbers. Surely a 500-person | company is worth more to the acquirer than a 50 person one, | even if those people just slow the core team down to a crawl. | Or at least that's the idea. MS itself isn't really a paragon | of productivity, so the visible improvement in productivity is | quite telling. | cool-RR wrote: | Yes, they were building an amazing product with top-of-the-line | UX that any other company could only dream of building. | tmpz22 wrote: | IIRC they were always making some progress but then they raised | money + got acquired and I assumed headcount ballooned at that | point which allowed them to focus on non-enterprise facing | features more. | dhagz wrote: | My understanding from listening to employees on podcasts and | such was that GitHub had a lot of technical debt (old Rails | versions, hacks on old Rails versions to get features in newer | Rails versions, etc) that they were whittling down going into - | and shortly after - the MS acquisition. | pcr910303 wrote: | Well, there was hub[0] back in the day. I also bet there are a | load of features that I&you have never heard of, but someone is | using them. | | And, not only adding features is doing something; improving | reliability or just maintaining the site, monitoring is also | work... | | So dismissing pre-MS GitHub might not be really appropriate. | | [0] https://hub.github.com/ | Rapzid wrote: | Heh, TravisCI got acquired and laid off a bunch of staff but at | least externally appear to have increased their velocity. | | CircleCI has raised 115M, hire the best people, and are | struggling to release a half-baked UI remake that has been in | progress for seemingly ever(that is now being forced on | everyone this quarter supposedly). | | Not sure what the take away is.. Hard to make sense of it | externally; interesting things going on under the surface | perhaps. | SkyPuncher wrote: | Don't forget CircleCI 1.0 to 2.0 forced migration. | | We made the switch, but quickly looked at other options. I | can't have a vendor willingly introduce major, breaking | changes. | milofeynman wrote: | There are some really nice features in the PR diff section like | line-suggestions. I think that went in before MS but could be | wrong. I'm hoping they add multiline suggestions someday. | | Also the big one for me is their Desktop Client. It has | constantly improved and it makes my life easier. It has only | gotten better after MS acquisition. They added rebase and merge | support recently. I still do stuff from the command line | (interactive rebase the most), but the Desktop Client really | improves my workflow. | dictum wrote: | Hm... Features take some time to get to production. The stuff I | use/appreciate most launched either before Microsoft acquired | them, or shortly after the deal -- so its development predates | that. | xmprt wrote: | I think it was a combination of that as well as increasing | competition from other companies like Gitlab. | hprotagonist wrote: | I wonder how much this will impact or help forge | (https://github.com/magit/forge ) , which i have, to my shame, | never gotten to authenticate properly. | TeMPOraL wrote: | Seems to me that Forge already covers all demonstrated features | via the GitHub API, so I'm guessing: not at all. Forge is | really nice. | | (In case 'tarsius is reading this, one thing I would wish for | is if Forge could work independent of a git repo. I've seen a | pattern in several places now where they run a single project | in Gitlab with just the issue tracker, and no associated | repository.) | mandarg wrote: | forge and github-review (https://github.com/charignon/github- | review) have given me a near-immersion experience for bitesized | code reviews in Emacs. They even work together, via github- | review-forge-pr-at-point! | | The only thing stopping me from using this with larger diffs is | the lack of a good way to show more of the surrounding context | in github-review. Wonder if there is any interest in making | github-review a first-class part of forge. | SEJeff wrote: | Too bad this doesn't work with Github Enterprise :( | billygriffin22 wrote: | Sorry! We're hoping to get to it after gh is out of beta. It's | definitely something we're hearing people want, and I'm excited | for when we can say it just works. :) | SEJeff wrote: | I shared this in our #git internal slack channel and | immediately had a dozen people bemoaning it not supporting | our GHE. Thanks! | chmaynard wrote: | Does checking out a pull request locally include pulling down all | the comments? I assume not, but that would be a cool feature. | billygriffin22 wrote: | It doesn't - it's just the code on that PR, but you can also | use a --preview flag on pr view to get render the body of the | PR in your terminal. We may explore something around | incorporating comments down the road as well. | kccqzy wrote: | Doesn't it bother anyone that in the first graphic they used | typographically correct Unicode quotes, but these quotes won't | work in shell? I initially thought that these were screenshots in | an actual minimalistic terminal emulator but apparently these are | just graphic designs. ___________________________________________________________________ (page generated 2020-02-12 23:00 UTC)