This command line tool automates the process of initializing a local Git repository, creating a remote GitHub repository via the GitHub API, optionally adding a .gitignore file, staging changes, committing, and performing the initial push to the remote repository.
Project description
GitHub Repo Automation Tool
This command line tool automates the process of initializing a local Git repository, creating a remote GitHub repository via the GitHub API, optionally adding a .gitignore file, staging changes, committing, and performing the initial push to the remote repository.
Features
- Initialize a local Git repository.
- Create a remote repository on GitHub.
- Optionally add a
.gitignorefile. - Stage changes.
- Commit changes.
- Push the initial commit to the remote repository.
Requirements
- Python 3.x
- Git
- GitHub account and authorization token
Installation
Usage
python create-remote-repo -rn <repo-name> -gu <github-username> -t <github-token> -d <working-directory> [-i <include-gitignore>] [-p <private>]
Example
python create-remote-repo -rn my-new-repo -gu myusername -t mytoken -d /path/to/working/directory -i y -p y
This command will:
- Initialize a Git repository in the specified local working directory.
- Create a remote repository named my-new-repo under the GitHub account myusername.
- Add a .gitignore file to the repository.
- Stage all changes.
- Commit the changes.
- Push the initial commit to the private remote repository.
CLI Arguments
| Argument | Description | Required | Default Value |
|---|---|---|---|
-rn, --repo-name |
The name of the remote repository you want to create. | Yes | None |
-gu, --github-username |
The username of your GitHub account. | No | global_github_username |
-t, --github-token |
Your GitHub authorization token. | No | global_github_token |
-d, --working-directory |
The absolute path to the local working directory where the repository should be initialized. | Yes | None |
-i, --include-gitignore |
Enter y if you want to add a .gitignore file to your repository, otherwise enter n. |
No | n |
-p, --private |
Enter y if you want to make the remote repository private, otherwise enter n. |
No | n |
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
Created and maintained by Kim Chung.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file create-remote-repo-1.0.0.tar.gz.
File metadata
- Download URL: create-remote-repo-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6e192030e1cf324a142f2896f1377faae96993376f0998142b6e823d55c3839
|
|
| MD5 |
e6e506ea8ee294b8e3004dd6281b6913
|
|
| BLAKE2b-256 |
e42a32a9a01dc69b896d7af9de7afe2e9ddc446b0ed28295cce83ab9399edf37
|
File details
Details for the file create_remote_repo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: create_remote_repo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f94b75db58e19acafaa088fc949476704485ad2c3b1f73a5ad80e3f3c9c8eccf
|
|
| MD5 |
86124b1b77756b58220cd28bdde7b3b3
|
|
| BLAKE2b-256 |
dfde64cc4f74a8ad477d556ba1195664aa46b4294344d652764e367aa91539b0
|