DEV Community

Cover image for Top 10 Tips for using GitHub from the Command Line

Top 10 Tips for using GitHub from the Command Line

Kedasha on October 13, 2023

The GitHub CLI (gh cli) is a command line tool that allows you to interact with GitHub without ever leaving your terminal. It's an open source tool...
Collapse
 
techwatching profile image
Alexandre Nédélec

I have recently used GitHub CLI for some scripting and while I found it very useful, a few things bothered me. Not all commands can be used with the "--json" and "-q" parameters, which is not very convenient for scripting. Commands that create things (repo, workflow runs) don't return the id of the thing they create. I wish GitHub CLI would be more similar to Azure CLI on these matters.

Collapse
 
ladykerr profile image
Kedasha GitHub

these are such great points! I'll be sure to bring this back to the CLI team!

Collapse
 
techwatching profile image
Alexandre Nédélec

@ladykerr I wrote an article about using GitHub CLI (and Azure CLI) to create what I call an "Azure-ready GitHub repository" i.e. scripting the creation and configuration of a repository with a GitHub Actions workflow that can authenticate to Azure 👉 techwatching.dev/posts/scripting-a... . In the conclusion , I gave the same feedback about GitHub CLI, great but some things to improve.