Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.39 KB

README.md

File metadata and controls

73 lines (47 loc) · 1.39 KB

Automated Repository Creation

An automation for GitHub repository creation, both in GitHub and locally in your chosen path.

Installation

You need to install the PyGithub package.

pip3 install PyGithub

or:

pip install PyGithub

... and fzy and git.

Usage

  1. After cloning the project:
  • create GitHub toke and edit config.py:

    github_token = "ghp_.........................."
  • and add your credentials.

  1. Then, just run python3 github-repo.py

Usage

github-repo.py [org name [repo name]]

  • default repo_name is actual directory name
  • ... as 'org name' mean interactive choice
./github-repo.py 'org name'
./github-repo.py ...
./github-repo.py 'org name' repo_name
./github-repo.py ... repo_name

Tip

Create an alias for it in your .zshrc or .bashrc. For example, in my case I created this:

alias gh-repo="python3 ~/lib/github-repo-autocreate/github-repo.py"

or

cd ~/.local/bin
ln -s ~/lib/github-repo-autocreate/github-repo.py gh-repo

So now whenever I type gh-repo in my terminal I'm able to create the repo in just a few seconds.

Thanks

This small project was possible with the help of the great package PyGithub.