Skip to main content

A tool for managing multiple GitHub accounts on a single device

Project description

GitHub Account Manager (ghswitch)

A command-line tool for managing multiple GitHub accounts on a single device. Works on both macOS and Windows.

Features

  • Add multiple GitHub accounts with their configurations (username, email, SSH key, token)
  • Switch between accounts globally or per repository
  • Automatically handle SSH key switching and Git configuration updates
  • List all configured accounts
  • Set a primary account for new repositories
  • Remove accounts when no longer needed

Installation

pip install ghswitch

Or install from source:

git clone https://github.com/yourusername/ghswitch.git
cd ghswitch
pip install -e .

Usage

Adding a new account

ghswitch add --name work --username workuser --email work@example.com --ssh-key ~/.ssh/id_rsa_work

Listing all accounts

ghswitch list

Setting the primary account

ghswitch set-primary work

Switching accounts for a specific repository

cd /path/to/your/repo
ghswitch use personal

Switching the global account

ghswitch use work --global

Removing an account

ghswitch remove personal

Configuration

The configuration is stored in ~/.ghswitch/config.yaml (macOS/Linux) or %USERPROFILE%\.ghswitch\config.yaml (Windows).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghswitch-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghswitch-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file ghswitch-0.1.1.tar.gz.

File metadata

  • Download URL: ghswitch-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ghswitch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 28a9cdd4022e66e2af682fc435b9f4868ebec543571bbddc195b9c7451788eb7
MD5 871f3bc5921f228f6e2a84b413ce1557
BLAKE2b-256 7c4582f6f505da8e343c17da73bd873cd44d17828437b6a26525ea1c69e1dbd8

See more details on using hashes here.

File details

Details for the file ghswitch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ghswitch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ghswitch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de30f544a179a63ad679ac1c45f4873c7f931e4f4ffbf2d38226509c543fe294
MD5 23912bd7779793673f69dd3d74ae7b76
BLAKE2b-256 ac24c9dbbd239fd2f4953c198105867ee51c33087a41499de4e6fbc520bb1241

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page