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.
local USERNAME="" | |
local PASSWORD="" |
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 | |