1 unstable release
0.1.0 | Dec 15, 2023 |
---|
#891 in Configuration
15KB
234 lines
GitHub Account Manager
Overview
The GitHub Account Manager is a command-line tool designed to simplify the management of GitHub accounts for Git configurations. This tool helps you switch between different GitHub accounts seamlessly, set and display Git configurations, and manage a list of GitHub accounts.
Problem Statement
Working with multiple GitHub accounts on a single machine can be challenging due to potential conflicts in Git configurations. This tool addresses this issue by allowing users to switch between GitHub accounts easily, set configurations for specific accounts, and manage a list of accounts associated with their Git environment.
Installation and Usage
Follow these steps to install and use the functionality of the GitHub Account Manager:
Prerequisites
-
Rust Installed: Ensure that you have Rust installed on your machine. If not, you can install Rust.
-
Git Installed: Make sure Git is installed on your system, as this tool relies on Git for configuration operations.
Installation
- Clone the Repository: Clone the repository containing your Rust GitHub Account Manager.
git clone <repository_url>
cd <repository_directory>
- Build the Project: Build the Rust project using Cargo.
cargo build --release
- Set the manager path variable.
echo 'export PATH=$PATH:$(pwd)/target/release' >> ~/.bashrc
- Run the Manager: Execute the compiled binary to run the GitHub Account Manager.
manager <subcommand> [options]
Commands and Usage
- Add a new GitHub account:
manager set <username> <email>
- Display all accounts:
manager list
- Switch to a different GitHub account:
manager switch <username>
- Reset Git configuration for an account or all accounts:
manager reset [<username>]
- Set Git configuration for a specific account:
manager config --username <username>
- Show current Git configuration:
manager show
License
This project is licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Dependencies
~6–15MB
~168K SLoC