A simple tool to automate github uploads
Project description
๐ Motorgit
๐ Overview
Motorgit is a smart tool designed to automate GitHub repository creations and updates with a single command. It simplifies the workflow for developers by integrating common tasks into a streamlined command-line interface.
๐ Table of Contents
โจ Features
- ๐ Create New Repositories: Quickly create new GitHub repositories from the command line.
- ๐ Update Repositories: Easily update existing repositories with a single command.
- โก Efficient Workflow: Automates repetitive tasks, saving time and reducing errors.
- ๐ Tab Completion: Support for Bash, Zsh, and Fish shell completion.
- ๐ Secure Credentials: Store GitHub credentials securely using system keyring.
โ๏ธ Installation
๐ฆ Install from pip
To install Motorgit using pip, run:
pip install motorgit
๐ Configure GitHub Credentials
Motorgit provides multiple secure ways to configure your GitHub credentials:
1. Interactive Setup Wizard (Recommended)
Run the setup wizard to configure your credentials interactively:
motorgit setup
This will prompt for your GitHub username, email, and access token, and store them securely using your system's credential store.
2. Manual Login/Logout
You can also use the login/logout commands to manage your credentials:
# Store credentials securely
motorgit login
# Remove stored credentials
motorgit logout
Note: Use
motorgit setupfor first-time or full configuration (including credentials and other settings). Usemotorgit loginif you only want to update your GitHub credentials without changing other settings.
| Command | Prompts for Credentials | Stores Credentials | Configures Other Settings | Intended Use |
|---|---|---|---|---|
motorgit setup |
Yes | Yes | Yes | First-time or full setup |
motorgit login |
Yes | Yes | No | Update credentials only |
3. Configuration Management
View or update configuration settings:
# View all configuration
motorgit config
# View specific configuration
motorgit config github_username
# Update configuration
motorgit config github_username yourusername
4. Environment Variables (Legacy Method)
For backward compatibility or CI/CD environments, you can still use environment variables. Add the following lines to your .bashrc or .zshrc file:
export GITHUB_ACCESSTOKEN='your_personal_access_token'
export GITHUB_USERNAME='your_github_username'
export GITHUB_USEREMAIL='your_email@example.com'
After adding the lines, reload your shell configuration:
source ~/.bashrc # For bash users
source ~/.zshrc # For zsh users
๐ง Install Locally
To install Motorgit locally from the source code, follow these steps:
1. Clone the repository:
git clone https://github.com/AyushGupta0202/motorgit.git
cd motorgit
2. Install in editable mode:
pip install --editable .
๐ Usage
Usage ๐ Create a New Repository
To create a new repository, use the following command:
motorgit createNewRepo
This command has optional parameters for folder name and whether it should be made as a private repository or not. And then it will create a new repository on GitHub with the specified settings.
Example
motorgit createNewRepo [-n foldername] [-p privaterepo]
๐ Update Repository
To update an existing repository with a commit message, use:
motorgit updateRepo -m "Motorgit Commit"
This command will add changes to the repository and commit them with the provided message.
Example
motorgit updateRepo [-m commitmessage] [-b branchname]
๐ Shell Completion
Motorgit supports shell tab completion for Bash, Zsh, and Fish using Click's built-in shell completion system. To enable shell completion, follow the instructions for your shell:
Bash
Add this to your ~/.bashrc:
eval "$(_MOTORGIT_COMPLETE=bash_source motorgit)"
Or, to generate and source a static script:
_MOTORGIT_COMPLETE=bash_source motorgit > ~/.motorgit-complete.bash
. ~/.motorgit-complete.bash
Zsh
Add this to your ~/.zshrc:
eval "$(_MOTORGIT_COMPLETE=zsh_source motorgit)"
Or, to generate and source a static script:
_MOTORGIT_COMPLETE=zsh_source motorgit > ~/.motorgit-complete.zsh
. ~/.motorgit-complete.zsh
Fish
Add this to ~/.config/fish/completions/motorgit.fish:
_MOTORGIT_COMPLETE=fish_source motorgit > ~/.config/fish/completions/motorgit.fish
After modifying your shell configuration, start a new shell session or source the relevant file to activate completion.
For more details, see the Click Shell Completion documentation.
๐ค Contribution
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
1. ๐ด Fork the repository
2. ๐ฟ Create a new branch: git checkout -b my-new-feature
3. ๐พ Commit your changes: git commit -am 'Add some feature'
4. ๐ค Push to the branch: git push origin my-new-feature
5. ๐ Create a new Pull Request
or after cloning use motorgit commands itself!
๐ License
Motorgit is licensed under the MIT License. See the LICENSE file for more details.
๐ค Author
Ayush Gupta
For any inquiries, feel free to contact: ayushg430@gmail.com
Made with โค๏ธ using click
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 motorgit-1.0.1.tar.gz.
File metadata
- Download URL: motorgit-1.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a86476e566fa486d21275d77f7f2d2ff9c4f3a9f94287e46d496f0e0313a479
|
|
| MD5 |
6862bb547a7943de2cdb2fcc9a632e3d
|
|
| BLAKE2b-256 |
563f8d25dae97f40653c4c61c30b8d14d53575f17a9c82342e239a673f03ab54
|
File details
Details for the file motorgit-1.0.1-py3-none-any.whl.
File metadata
- Download URL: motorgit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c459f273d7e28ea6bc44e1baf83733fa02873ca1a1a3e609326abf64ee9c619c
|
|
| MD5 |
920b62e956889488fea46cac6ac411d9
|
|
| BLAKE2b-256 |
2d30413b27efb00b34dcaa67a717479577214a688f5dd03e2420d8bffc9ea610
|