chicle is a platform-agnostic command-line tool for managing multiple Git identities. It simplifies the process of switching between different Git user configurations and SSH keys, making it easier to work with multiple Git accounts across various hosting services like GitHub, GitLab, and Bitbucket.
- Create SSH keys for different Git identities
- Add existing SSH keys to new identities
- Switch between Git user configurations easily
- Works with any Git hosting service
- Manages both global and local Git configurations and SSH keys
- Ensures unique aliases across global and local identities
- Supports both global and repository-specific identity management
- Version checking functionality
- Verbose mode for detailed output
- Configure default behaviors
- Edit existing identities
- Move/copy existing identities
You can install chicle using Homebrew:
brew install permadart/chicle/chicle
If you prefer to install from source or Homebrew is not available:
- Ensure you have Go installed on your system.
- Clone the repository:
git clone https://github.com/permadart/chicle.git
- Navigate to the project directory:
cd chicle
- Build the project:
go build -o chicle
- (Optional) Move the binary to a location in your PATH:
sudo mv chicle /usr/local/bin/
chicle supports both global and local Git identity management:
- Global identities are used across all Git repositories on your system.
- Local identities are specific to a single Git repository.
When using local operations, ensure you're in a Git repository. For global operations, use the --global
flag or the appropriate subcommand.
To enable detailed output for any command, use the --verbose
or -V
flag:
chicle --verbose [command]
chicle create --alias user1 --email [email protected] --name "John Doe" --global
Alias: chicle add
chicle create --alias user1 --email [email protected] --name "John Doe"
chicle create --alias user2 --email [email protected] --name "Jane Doe" --key ~/.ssh/id_rsa_user2 --global
chicle create --alias user2 --email [email protected] --name "Jane Doe" --key ~/.ssh/id_rsa_user2
chicle switch user1 --global
Aliases: chicle use
, chicle switch-global
chicle switch user1
Alias: chicle switch-local
chicle delete user1 --global
Alias: chicle remove
chicle delete user1
chicle list
Alias: chicle ls
chicle --version
or
chicle -v
- When creating or switching to a local identity, you must be inside a Git repository. If you're not in a Git repository, chicle will return an error and prompt you to use the
--global
flag. - Aliases must be unique across both global and local identities. chicle will prevent you from creating an identity with an alias that already exists in either scope.
- The
list
command shows both global and local identities separately for better clarity. - When switching identities, chicle clears existing SSH keys from the agent before adding the new one to ensure a clean switch.
chicle provides informative error messages to guide you:
- If you're not in a Git repository for local operations, you'll be prompted to use the
--global
flag or navigate to a Git repository. - If an alias already exists, you'll be informed and asked to choose a different alias.
- If an identity is not found during switch or delete operations, you'll be prompted to use the
list
command to see available identities.
For more detailed output, use the --verbose
flag with any command.
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.