my-github-manager
v1.0.4
Published
GitHub Repository Management
Readme
GitHub CLI Tool
This is a command-line interface (CLI) tool written in Bash that simplifies interactions with the GitHub API. It allows users to perform various repository management tasks and retrieve information directly from the terminal, such as listing collaborators, workflows, issues, and getting user profile data.
Features
- Authentication: Securely authenticates with the GitHub API using a personal access token (PAT).
- Repository Management: List collaborators with read access, packages, workflows, projects, discussions, issues, and pull requests for any given repository.
- User-Centric Functions: Get detailed user profile data, list public repositories for a specific user, and even follow other users directly from the command line.
- Error Handling: Provides clear feedback for authentication failures and API errors.
Prerequisites
curl: Used to make HTTP requests to the GitHub API.jq: A lightweight and flexible command-line JSON processor. It's essential for parsing the API responses.
You can install these on most systems using a package manager:
Debian/Ubuntu:
sudo apt-get install curl jqmacOS (Homebrew):
brew install curl jqInstallation
Clone the repository:
git clone <repository_url>
cd <repository_name>Make the script executable:
chmod +x my-github-manager.shUsage
To start the interactive menu, simply run the script from your terminal:
./my-github-manager.shThe script will first prompt you to enter your GitHub username and a Personal Access Token (PAT). Make sure your PAT has the necessary scopes for the actions you wish to perform. The script will guide you on the required scopes.
Once authenticated, a menu will be displayed with various options.
Creating a Personal Access Token (PAT)
- Go to Settings on GitHub.
- Navigate to Developer settings > Personal access tokens > Tokens (classic).
- Click Generate new token.
- Give your token a descriptive name and select the scopes required by the script (e.g.,
repo,read:user,user:email). - Click Generate token and copy it. You will not be able to see it again.
