GitHub CLI is now in beta
github.blog
github.blog
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.
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.
Source: MS employee now works at GitHub
[1] https://news.ycombinator.com/item?id=16525735
[2] https://github.com/atom-archive/xray/tree/master/memo_core
[1] http://yjs.dev/
There has been some work done by people from the ML@B over at Berkeley (?) to greatly improve github-linguist, the tool GitHub uses (I think) to identify programming languages in GitHub repositories. The project is named lexicon (used to be hosted at https://lexicon.github.io/ but now it 404s...) and the results seemed very interesting.
Tried pinging github support about open-sourcing this work, but it seems it's not going to happen. I had very friendly and helpful people answering me, and I totally understand not wanting to open-source something. I just feel a bit sad for the lost opportunity.
"Every day, millions of files are uploaded onto Github, a coding repository where users share code and collaborate on projects. But how do you tell what language those files are written in?
Identifying programming languages are surprisingly hard. Symbols used in one language often have different meanings in another. For example, ‘#’ in python indicates a comment, while in C it indicates a preprocessor command. Even worse, code in one language can actually contain code in different languages, such as HTML, which can contain CSS and/or Javascript.
At the moment, Github uses a giant checklist to identify unique quirks in the language. For example, if the code contains “:- module”, then it’s probably"); background-size: 1px 1px; background-position: 0px calc(1em + 1px);"> Mercury. However, most languages simply don’t have enough unique quirks for this method to be accurate enough.
The current solution the Github team at ML@B came up with is to use a machine learning algorithm called a Naïve Bayes Classifier. To optimize the program, they used Github’s checklist as a guideline for choosing the correct language rather than a hard-and-fast rule. Currently, the team is working on scraping Rosetta Code, a large repository of code in hundred of different programming languages, for data that they can use for training the program and testing its accuracy. Eventually, they will want to see if implementing other models, such as neural networks, can improve accuracy."
I'm certain I saw more advanced claims of success on this project and that github knows about it, since last time I asked they were 'still talking about it internally', but every link I had is dead...
WELL now that I googled seriously, I think I was too pessimistic, there seems to be some movement on this front at github : https://github.blog/2019-07-02-c-or-java-typescript-or-javas...
Excited to see what's coming out of this new endeavour... Just sent an email to github support, fingers crossed.
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.
We made the switch, but quickly looked at other options. I can't have a vendor willingly introduce major, breaking changes.
Given a re-write though, I think the way it's moved forward is a bit of a train wreck:
* It's incomplete information wise.
* They threw the baby out with the bathwater as far as UX. Nice things like when you visit a job with failed tests it high-lights that fact and failures; gone.
* They implemented the new log viewer with a virtual scroller. Browser search can search into it, and it has no integrated search. You can select past the buffer size of course. Zero extra value to the user here.
* It seems like the people working on the project have little product empathy. I would almost think it's been outsourced. When very obvious missing feature or issues(compared to the current UI) are pointed out, we get platitudes like "Thanks for letting us know as we iterate on this. We are all in this together!".
* Supposedly it's now being forced on the user base Q1 2020 in this state.
* As a nit, it's uninspired and ugly as sin IMHO from a design standpoint. It looks like an off-the-shelf Atlassian SPA theme. And janky. Somehow the sidebar got wider AND dropped the test explaining the icons?!
The whole thing seems like a boondoggle of epic proportions. Did I mention they seem to also be simultaneously rolling out GraphQL; because GraphQL?! I'm somewhat surprised and saddened there aren't more people pushing back on it and leaving feedback in their forums. Meanwhile we can't filter entire workflows, and we can't filter for PRs. Sigh.
I do like many aspects of their service, so it's a shame to see something play out like this :/
Primary push was the Dear GitHub letter and the isaacs/GitHub repo which documented hundreds of such small issues. Also, the GitHub refined plugin, features of which GitHub keeps reimplementing now.
Prior to Microsoft, it seems that the devs had free reign to develop whatever features they wanted, completely undirected by any sense of product management.
We stopped using their enterprise product (which they shipped as an obfuscated ruby blob) because they wouldn't listen to us and help us with the problems we were having.
To me this largely looks like they're actively listening to their own developers, or have a structure in place to allow devs to take the initiative to address the needs they're facing.
But I have zero insight in how MS works internally, so I can only guess :)
> 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.
Edit: I sound very confused in this thread because I still call the old Golang version gh in my scripts. Thought it was the same codebase graduating till I read this.
The point of using a command line is not because a VT100 emulator is an ideal way to view data (it's not). It's so we can combine commands, using pipes and redirection. I don't want to learn special new filtering flags. I want to get raw data that I can pipe to grep or cut or any of the other dozens of tools I've been learning and using for the past 25 years.
The point of using a distributed version control system is so I can store it all locally. This new tool defaults to only 30 items, and cannot fetch more than 100. So even if you're willing to put up with the multi-second latency of hitting their servers for every command line operation (it feels like CVS all over again), you still can't say "give me everything and let me grep it". You have no choice but to use the 3 ways they give you to filter (assignee, label, state -- not title, comments, or date).
I've got a 50Mbps network connection, a 500GB SSD, 16GB of memory, and an 8-core CPU, and now instead of putting all that to work running JavaScript to access my bug reports, I'm fetching them as plain text at a maximum of about 5000 bytes at a time. (Net throughput is on par with an Apple II with a 14.4Kbps modem.) Is this an improvement?
I do not understand why GitHub Issues aren't git repos, like most other GitHub collections. Then we wouldn't need a completely new (and slow/complex/limited) tool to read bug reports on the command line. Perlis had this figured out back in 1982: using common tools for disparate data is a killer feature. That's why we're still using the command line in a way that looks nearly identical to how it worked in the 1980's, and a few generations of other interfaces have come and gone since then and failed to displace it.
Wait you can't grep over your case base if you use this tool?
Have they at least improved their code search? Last few times I used it it was very limited.
It doesn't even print a message or use a nonzero return code to indicate the output is incomplete. What's the point of running "gh issue list | grep foo"? There's no way to distinguish between "there are no 'foo' issues" and "there's 250 'foo' issues (but they happen to not be at the top of the list)".
Code search seems to be out of scope for the CLI. (It arguably doesn't even do issue search -- just basic filtering on a couple predefined fields.) But that's no problem because I've got all my source code on my machine already! I can use grep, git-grep, or any other tool I want (ack/ag/rg are popular).
Doing that would make their implementation trickier since they'd have to find a way to make issues play nicely with the git object system which may not be completely trivial. On top of that they have very little incentive to do that because having a custom API and custom tools to access it increases lock-in. If github issues were just git repositories you'd be able to migrate them very easily. I'm sure they very much don't want to decentralize this.
I agree with your general point though, I'm very much a shell power user but I seldom use these tools because they don't seem particularly more efficient than just using the web browser in my experience. As you point out the power of the shell is to combine commands. If I just want shortcuts to list various attributes of the project I can do that with bookmark keywords in firefox for instance.
And of course these reasons are poor and hide the fact that with systems like Github (Gitlab and Bitbucket are the same), issue tracking and thelike are locked in. I only know the wiki which can be accessed as git repository (at least in Gitlab and Github). Which other Github "collections" are exposed as git repository?
"pr checkout" is the only command that seems truly useful and a time saver to me.
cpr="!f() { git fetch origin refs/pull/$1/head && git checkout FETCH_HEAD; }; f"
`git cpr 207` then checks out PR #207.The best you can hope for is to make the issues readily exportable in a standard CSV format. Does it already do this?
The optimist would say limiting contributions to issues on web platform made the formatting ( markdown ) consistent. So that linking back to issues and commits was more standard, and therefore made Github Issues a nice tool to use over the competition at the time.
> formatting ( markdown ) consistent.
This actually is not a good argument because Markdown is specifically designed to be readable as plain text.I love the command line too, and I get what you're saying, but why don't you just use their API?
Tell me what you think: http://9ol.es/pty.txt
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.
'unofficial'... https://hub.github.com/
I officially despise how meaningless '[un]official' has become.
And in the end, since it's open source, it's up to me whether I derive value from it.
OSS is great, I agree, my issue is just with the weird description of GitHub's older similar tool.
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.
Simply put, I prioritize more software way more than I prioritize officialness etc.
Has some good incite in the history of hub, and why they chose to move this direction.
- see the language stats for this repo
- see commit history in one tap
- read the full readme
- see all files at top level
- etc.
If you're already hard at work on this, thanks in advance.
And honestly, this official app personally feels that it's even worse to navigate. Hard to navigate to your most recent repos, reading/following issues/PRs is terrible (a good 1/6th of my screen is covered by a tab in the bottom corner that I accidentally open a lot of the time when scrolling), no CI information, can't differentiate what's new and old discussion when opening a notification, can't check other branches, can't generate tokens (very useful when commiting from someone else's machine if you have 2FA), and in general it prioritizes elements without a clear reason, like the "subscribe"/"unsubscribe" button for repos.
I currently still prefer the Fasthub app for now. It still doesn't have all features above or from the web version, and it's not updated often since the app is being refactored entirely, but it's open source and it has a decent UI/UX. Definitely better than the beta official app.
In theory, I would prefer a native mobile app to a web page, for a number of reasons. First of all, a web page is ideally static, with no JavaScript and no interactivity other than POST submission — a native app provides a developer the opportunity to add behaviour and interactivity appropriately. Second, a native app can be customised to the particular needs of working on a mobile device.
But in practice I avoid apps like the plague. I no longer trust that Android will properly shield one app's data from other apps: for all I know the GitHub app will upload all of my photos and text files to Microsoft for analysis. And then so many mobile apps aren't even native mobile: they are just wrapped web pages, in which case one gets the worst of both worlds: a potentially-insecure app which can break the sandbox, and a non-native web-page interface.
I used to be really excited about smart phones, but now all I really want is something with a web browser, phone calls, Signal and offline maps.
- if an app has access to your photos and you didn't approve so, it's a bug. Even worse, it's a security issue and you could probably collect a nice $10k to $30k bounty.
- apps that are just web pages are bad, yes but not for the reasons you underlined.
- anything that breaks the sandbox is a security issue. Nowadays it's pretty rare, too.
- if an app asks for access to your files and can't work without it, it's a badly designed app and you'd be right to complain. IMHO this is an issue that should be addressed at two levels: 1/ the OS should be able to generate fake data to let old apps work. 2/ any newly released app that tries to work around this should be banned from stores.
And yes, we're also definitely investing in the mobile app as well and the reception from the beta has been really positive so I'm excited for when we're able to roll it out to everyone.
The demo of Emily and Jon's work shown by Nat is great news and I hope it continues forward.
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.
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/de9bfa2103ee81a547d4fc598...
[3] https://github.com/github/hub/commit/d5615fcb6f9c983fbf5d129...
[4] https://owenou.com/fast-github-command-line-client-written-i...
[5] https://github.com/github/hub/tree/0df403f14805d4962ee3adb22...
They use Node.js?
lots of languages have that lol
It's what your parent likes about Go. Inventing a claim of uniqueness and then condescendingly dismissing it isn't a good look.
GHC has first-class support for laziness. Rust has affine types.
I've been waiting for both a command-line and programmatic way to interface with issues and PRs since forever and had to make do with modifying some ancient Ruby cli (and I don't know Ruby), so at least now they're headed in the right direction. I am fairly certain that Issues-as-Code will transform the way projects are developed & managed so I'm excited to see this get more features.
Before the adoption of shared libraries in mainstream computing during the 80's, it was just how we used to work.
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.
Needing to navigate a menu to set title and description as it seems to show in the screenshots seems like completely unnessecary friction.
> 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.
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.
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).
It has worked for several years now, but I'm not sure if it's documented anywhere.
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>`
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.
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
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".
Uploading releases please!
It's been part of homebrew/core for something like two weeks: https://github.com/Homebrew/homebrew-core/blob/master/Formul...
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...
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.
> 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")
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.
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.
Didn't we judge Nokia-Siemens when they did similar, developing DPI infrastructure for Iran and Egypt?
Good on those people resigning over this, that shows some backbone.
> “We do not know the specific projects that the on-premises GitHub Enterprise Server license is being used with, but recognize it could be used in projects that support policies we both agree and disagree with.”
That sounds like when Nokia Siemens Networks provided communications intercept technology with foresight of how the Iranian authorities might use it to violate human rights.
That reasoning does NOT hold, if the "policies we disagree with" part literally equates to children kept in cages.
Then "I'm just making a service, not doing politics" is being wilfully blind.
People resigned over this. That also means, the people who are still there, did not.
Yet at work no one has this issue with our ghe
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.
Additionally, I think that Git's CLI is fine and there's no reason to put training wheels on it.
In between those stages there are moments where you can ask "is this where we want to go".
Maybe a better question to ask than "are they doing this for vendor lock-in", is "will this allow them to make a decision to easily increase vendor lock-in" (in which case business forces will make that decision). It doesn't really matter what the motivation is, after all, a corporation doesn't have memory for good intentions.
Hmm, wonder why they felt the need to move it to its own org? What's wrong with `github/cli`? That's arguably clearer than the very generic `cli/cli`.
Looks like it used to be at github/gh-cli before January 24 [0]; I wonder what kind of compensation they gave to the previous owner of `cli`? [1]
0: https://github.com/cli/cli/commit/a710893fc107c9a269d8654f08...
1: https://web.archive.org/web/20170331061435/https://github.co...
As in, can you use it for local gittering, or does it really require a connection to github all the time?
Because I don't feel good about this tool if it's basically another trick at lock-in. Git the versioning system is currently pretty open; You can use your own local repos, host on gitlab or github or your own server, and you really do roughly get the same experience from the command line.
Like, is this going to prompt me to host my local git repos on github? Not whether it can, of course it can, will it nag me?
People used to call these worries FUD but they also put ads in the start menu and turned telemetry up to 11, for an OS. I think current day it's a legitimate worry to consider. I haven't really had the misfortune of having to deal with such attitude towards users on the command line. But we'll see.
Or do they see "developers" as an audience to be treated differently than "end users".
(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.)
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.
% gh pr list
Notice: authentication required
Press Enter to open github.com in your browser...
/bin/xdg-open: line 881: www-browser: command not found
/bin/xdg-open: line 881: links2: command not found
^C
1) I would have expected it to be able to work with the installed ssh keys used with the associated repo, but no luck :-(
2) RPM is broken, as it does not include any dependencies, and
3) even after install links, it fails with:
[warn] Epoll ADD(1) on fd 0 failed. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none): Operation not permitted
ERROR: event_add failed: Operation not permitted at select.c:415, handle 0
4) I don't think they're gonna be handling 2FA :-/
I guess that's gonna be a pass for now...
The example commands shown support automatic creation of issues which is OK for CI/CD, but PRs are not something we use or care about. I understand it from marketing as a 'makes us different to raw git' sorta differentiating feature, but it's just not part of many company's workflow. I love and miss from previous Gitlab repos strong pre-commit hooks and being able to reject commits that breach policy or break tests. Without this CI/CD needlessly chokes on issues, state and manual process.
What do you use instead of PRs? (Honestly, not using PRs and paying for GHE sounds like a... less-than-ideal way to spend your money?)
The PR workflow + Checks are a good "equivalent" (IMO, nicer) experience to pre-commit hooks.
Yes. Because I already have git, which by definition already does 99% of what I need as a user. Issues + remote repo admin + CI/CD are the exceptions.
What do you use instead of PRs?
Direct commit with no branching. IMHO PRs are an arguable misfeature of hosted RCS/VCS to keep people on those platforms. We have a high proportion of non software development projects/users.
Committing directly might work for a small team, but I can't imagine that scales.
I suppose we want fundamentally different things here, and sadly for you, I don't think you're a large enough portion of the audience that GitHub will ever create the tool you need.
Their APIs are open, though -- you can probably make one yourself.
You are the minority.
Any reason I'd bother to switch to this?
Basically, it's for the terminal geeks that don't want to bother with using the web interface of GH for daily tasks.
https://github.com/github/homebrew-gh/blob/19a5398d3c022e80f...
This is the new CLI i want most
I would assume the parent poster wants something richer than a single substitution though?
`gh clone nodebb/nodebb -https`