Note: This is my first Go project! I'm actively learning and improving it. Feedback and contributions are very welcome!
Inspired by the need to manage multiple Git configurations easily. Go Git Swap is a command-line tool that helps developers manage multiple Git configurations easily. Switch between different Git profiles seamlessly, perfect for developers who work with multiple Git accounts (personal, work, client projects, etc.).
- Modern TUI interface using Bubble Tea or similar
- Enhanced SSH signing key support
- Profile templates and quick switching
- Configuration backup
Current features:
- Manage multiple Git profiles
- Easy switching between profiles
- Basic SSH signing key support
- Automatic configuration of Git global settings
- Simple CLI interface
- Cross-platform support (macOS, Linux)
- Secure local configuration storage
go install github.com/frivas/go-git-swap@latestDownload the latest release for your platform from the releases page.
# Clone the repository
git clone https://github.com/frivas/go-git-swap.git
cd go-git-swap
# Build for your platform
make build
# Or build for all supported platforms
make build-all- Start the application:
go-git-swap-
Create a new profile:
- Select option 2
- Enter profile details (name, email, username, etc.)
- Optionally add an SSH signing key
-
Switch between profiles:
- Select option 1
- Choose the profile you want to activate
-
Delete a profile:
- Select option 3
- Choose the profile you want to remove
The application stores its configuration in ~/.go-git-swap.json. Each profile contains:
- Profile name (identifier)
- Git username
- Git email
- Full name
- SSH signing key path (optional)
- Go 1.20 or higher
- Make (for building)
# Build for current platform
make build
# Build for all platforms
make build-all
# Run tests
make test
# Clean build artifacts
make clean.
βββ cmd/
β βββ go-git-swap/ # Main application
βββ internal/
β βββ config/ # Configuration management
β βββ git/ # Git operations
β βββ model/ # Data models
β βββ validator/ # Input validation
βββ Makefile
βββ README.md
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please follow these guidelines:
- Use
gofmtto format your code - Add comments for exported functions
- Write tests for new functionality
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful, please consider giving it a βοΈ on GitHub or forking it to make it better! Thanks!
For bugs, feature requests, or questions, please open an issue.