Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
local USERNAME=""
local PASSWORD=""

githubrepo

githubrepo is CLI tool for creating GitHub repos in one line.

You can install it using bpkg or as a function.

To configure, copy .github.example and configure it.

githubrepo (){
source ~/.github
curl -u "$USERNAME:$PASSWORD" https://api.github.com/user/repos -d "{\"name\":\"$1\"}" ; git remote add origin git@github.com:$USERNAME/$@.git
}
source github
githubrepo $1
{
"name": "githubrepo",
"version": "0.0.1",
"description": "Create github repo",
"scripts": [ "githubrepo.sh", "github.sh" ]
}
git remote | xargs -L1 git push --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.