⚠️ This repository is undergoing large changes. README.md files may not be accurate.
A collection of scripts and userscripts for automating GitHub maintenance and repository management.
Each tool exists to make repetitive Git tasks a little less tedious.
These scripts are used to automate tasks on the GitHub website. They can be used with zero experience.
To use them, you will need a userscript manager, such as Violentmonkey (Firefox) or Tampermonkey (Chromium).
Chromium Users: You will need to make sure Tampermonkey can actually run userscripts:
- Go to
chrome://extensions/(or equivalent)- Click Details under Tampermonkey
- Enable “Allow access to file URLs”, “Allow User Scripts” and “Developer Mode”, then hit “Update”
Automates GitHub’s multi-step “Delete this repository” process. The script clicks through intermediate buttons and auto-types the repository name. You still manually click the first and last delete buttons, and you will need to stay in the window during the process, otherwise GitHub whines that you’re a bot.
Install the Semi-Auto Version (here)
Only types in the text box.
Install the Full-Auto Version (here)
Handles everything between the first and last click.
Reloads the repository page automatically when the project is in a “pending deployment” state. Useful for GitHub Pages development.
You can install it (here)
These scripts automate Git tasks on your machine. Each file is a shell script. The extension (.sh) has been stripped for cleanliness.
~/GitHub/$author/$repo~/GitHub/NikoboiNFTB/GitHub-ToolsYou should have a basic understanding of SSH, Git, and simple Linux commands, like wget, chmod, ./ etc.
Run scripts with ./script, bash script or double clicking them. If it fails, make sure it’s executable by using chmod +x script or Properties in your favorite file manager.
TL;DR: Don’t worry about the install commands using my domain. Skip?
In install commands my own domain, nikoboi.dev, will be used over the raw.githubusercontent.com domain. This is for link shortening and clarity, as the github link is ridiculously long and has confusing paths, as you can see just below.
You’re right to be vary about this, but you can easily confirm the files are identical by running (for example):
diff \
<(wget -qO- https://nikoboi.dev/sh/git/repo/pull) \
<(wget -qO- https://raw.githubusercontent.com/NikoboiNFTB/GitHub-Tools/refs/heads/main/shell/git/repo/push)
This example will highlight the differences between the pull and push files. A blank or no result means they’re identical.
I have, of course, automated this process for every file in both. You can try it out by running:
bash <(wget -qO- https://nikoboi.dev/sh/utils/compare)
You can audit any script before running it by running:
cat <(wget -qO- https://nikoboi.dev/sh/utils/compare)
catis used to print file contents.
This is not only useful for this repo, but all scripts on the internet. Here’s an example using the NextDNS install script:
cat <(wget -qO- https://nextdns.io/install)
The domain nikoboi.dev is active under my GitHub Pages repository, and its /sh/ folder can be audited at any time.
The scripts themselves call the raw.githubusercontent.com domain, because the scripts looking good isn’t as important.
all-pullall-push
~/git/$author.pullpush
~/git/$author/$repo.../pull if it’s placed in the projects folder.Install command:
bash <(wget -qO- https://nikoboi.dev/sh/git/setup-auto)
clone-repo: Clone a single specified repository.wget -q https://nikoboi.dev/sh/git/clone/clone-repo
chmod +x clone-repo
./clone-repo
Note: Cloning large repositories can take a long time.
clone-author: Clone all public repos from any GitHub user.wget -q https://nikoboi.dev/sh/git/clone/clone-author
chmod +x clone-author
./clone-author
Note: Cloning many repositories can take a long time.
workflow: Copy my personal workflow.mkdir -p ~/GitHub
cd ~/GitHub
bash <(wget -qO- https://nikoboi.dev/sh/git/clone/workflow)
These scripts are used to, you guessed it, disable and enable SSH on your machine, while keeping the same public key linked to your GitHub account.
Note: These scripts are for convenience, not high-security. If security is what you want, delete the key from your machine and your GitHub account. They can, however, be hidden for a little bit of extra feelgood. Just prefix the file name with a “.” The
setup-sshscript will ask you if you want to hide the files.
disable-ssh
id_ed25519 and id_ed25519.pub from ~/.ssh to ~/.ssh.bakssh-add -Denable-ssh
id_ed25519 and id_ed25519.pub back from ~/.ssh.bak to ~/.sshssh-add ~/.ssh/id_ed25519~/.ssh.bakThe scripts are noth path-bound like the others, so feel free to install them wherever you want.
Install command:
bash <(wget -qO- https://nikoboi.dev/sh/git/setup-ssh)
all-status
git add . and git status in every repositorystatus
git add . and git status in the current repository.Included in setup-auto
Feel free to fork this repository and submit issues or pull requests if you have any suggestions or improvements. If you encounter any bugs or have feature requests, please open an issue.
Created by Nikoboi
Script logic fined tuned using ChatGPT
This project is licenced under the GNU General Public License V3. See LICENSE for details.