Imagine working for GitHub and writing a command-line interface for the platform, then GitHub makes an 'official' one

It's avoiding the 'constraints of 10 years of design decisions' apparently

GitHub has released version 1.0 of its CLI, allowing interaction and control of repositories from the command line.

The hosted repository is based on git, which is itself a command-line tool. There is also another project, called hub, which provides a CLI for GitHub. Confusing?

Git alone is not enough for the full GitHub experience, since git is just the repository. Using GitHub Issues, for example, is not a feature of git. Hub wraps git so it supports all git commands, but extends these commands and adds new GitHub-specific commands to manage things such as Issues.

If we have hub, why GitHub CLI? An official document explained: "We wrestled with the decision of whether to continue building onto hub and adopt it as an official GitHub project. In weighing different possibilities, we decided to start fresh without the constraints of 10 years of design decisions that hub has baked in and without the assumption that hub can be safely aliased to git.

"We also wanted to be more opinionated and focused on GitHub workflows, and doing this with hub had the risk of alienating many hub users who love the existing tool and expected it to work in the way they were used to."

GitHub CLI is official, we are told, whereas hub is "a project whose maintainer happens to be a GitHub employee". The new tool is not an exact replacement so hub will continue.

Using GitHub CLI to list project issues

Using GitHub CLI to list project issues

GitHub CLI has expanded since the beta in February. One big change is that it now supports GitHub Enterprise Server, the self-hosted version of GitHub. There are also new features, such as the ability to clone, create, and fork repositories, use SSH instead of HTTPS, configure a default editor, and fully manage issues and pull requests, complete with reviewing differences and performing merges. You can also set aliases to make shortcuts for one or more commands.

We installed GitHub CLI on Windows using a downloaded installer – which, as noted in one of the issues, incorrectly installs to Program Files (x86) even though it is a 64-bit application. It is available for macOS, Linux, and Windows. macOS users are directed to Homebrew and MacPorts, Linux users have to add a repository and use apt, while for Windows the official documentation directs developers to the scoop or Chocolatey package managers. Curiously, the docs do not currently suggest Microsoft's official Windows Package Manager (Winget) even though GitHub CLI 1.0 is already available there. This might be because Winget is still in preview, or evidence that GitHub still runs with a degree of independence from Microsoft, its owners.

The tool itself worked nicely for us, despite a fair number of reported bugs. The advantage for developers is not only the ability to write scripts using GitHub, but also reducing the need to visit the GitHub website – avoiding, for example, unwelcome design decisions. ®


We have no actual insight into how hub's dev or devs actually feel about this...

Similar topics

Other stories you might like

  • World’s smallest remote-controlled robots are smaller than a flea
    So small, you can't feel it crawl

    Video Robot boffins have revealed they've created a half-millimeter wide remote-controlled walking robot that resembles a crab, and hope it will one day perform tasks in tiny crevices.

    In a paper published in the journal Science Robotics , the boffins said they had in mind applications like minimally invasive surgery or manipulation of cells or tissue in biological research.

    With a round tick-like body and 10 protruding legs, the smaller-than-a-flea robot crab can bend, twist, crawl, walk, turn and even jump. The machines can move at an average speed of half their body length per second - a huge challenge at such a small scale, said the boffins.

    Continue reading
  • IBM-powered Mayflower robo-ship once again tries to cross Atlantic
    Whaddayaknow? It's made it more than halfway to America

    The autonomous Mayflower ship is making another attempt at a transatlantic journey from the UK to the US, after engineers hauled the vessel to port and fixed a technical glitch. 

    Built by ProMare, a non-profit organization focused on marine research, and IBM, the Mayflower set sail on April 28, beginning its over 3,000-mile voyage across the Atlantic Ocean. But after less than two weeks, the crewless ship broke down and was brought back to port in Horta in the Azores, 850 miles off the coast of Portugal, for engineers to inspect.

    With no humans onboard, the Mayflower Autonomous Ship (MAS) can only rely on its numerous cameras, sensors, equipment controllers, and various bits of hardware running machine-learning algorithms to survive. The computer-vision software helps it navigate through choppy waters and avoid objects that may be in its path.

    Continue reading
  • Revealed: The semi-secret list of techs Beijing really really wishes it didn't have to import
    I think we can all agree that China is not alone in wishing it had an alternative to Microsoft Windows

    China has identified "chokepoints" that leave it dependent on foreign countries for key technologies, and the US-based Center for Security and Emerging Technology (CSET) claims to have translated and published key document that name the technologies about which Beijing is most worried.

    CSET considered 35 articles published in Science and Technology Daily from April until July 2018. Each story detailed a different “chokepoint” or tech import dependency that China faces. The pieces are complete with insights from Chinese academics, industry insiders and other experts.

    CSET said the items, which offer a rare admission of economic and technological vulnerability , have hitherto “largely unnoticed in the non-Chinese speaking world.”

    Continue reading

Biting the hand that feeds IT © 1998–2022