Welcome to gi¶
A fast, intelligent CLI tool that fetches and combines official .gitignore templates from github/gitignore into a single, deduplicated .gitignore file.
✨ Features¶
- 🚀 Fast: Caches templates locally for offline use
- 🧠 Smart: Deduplicates rules across templates while preserving comments
- 🔍 Searchable: List and search through 200+ available templates
- 🎯 Flexible: Support for aliases, case-insensitive names, and custom output paths
- 💪 Robust: Graceful fallback to cached content when offline
- 🖥️ Cross-platform: Works on macOS, Linux, and Windows
🚀 Quick Start¶
Installation¶
Recommended (using pipx):
Alternative (using pip):
From source:
Basic Usage¶
# Combine multiple templates
gi main python rust node
# List available templates
gi list
# Search for templates
gi search studio
# Show template content
gi show Global/JetBrains
📖 Documentation¶
This documentation covers everything you need to know about gi:
- Getting Started - Installation and setup
- User Guide - Complete command reference
- Tutorials - Step-by-step guides
- Developer Guide - Contributing and development
🎯 Use Cases¶
For Developers¶
- Quickly set up
.gitignorefiles for new projects - Combine multiple language-specific templates
- Maintain consistent ignore patterns across projects
For Teams¶
- Standardize
.gitignorefiles across team projects - Automate
.gitignoregeneration in CI/CD pipelines - Share common ignore patterns between projects
For Open Source¶
- Generate comprehensive
.gitignorefiles for multi-language projects - Maintain up-to-date ignore patterns from official templates
- Reduce maintenance overhead of custom
.gitignorefiles
🔧 Advanced Features¶
Template Aliases¶
# Use convenient aliases
gi main cpp csharp vscode # C++, C#, VS Code
gi main python django # Python with Django
gi main node react # Node.js with React
Custom Output¶
# Specify output file
gi main python rust -o my-project/.gitignore
# Append to existing file
gi main python -a existing/.gitignore
Offline Usage¶
# Works offline with cached templates
gi main python rust # Uses cached templates if network unavailable
📊 Supported Templates¶
gi supports 200+ official templates including:
- Languages: Python, JavaScript, TypeScript, Go, Rust, Java, C++, C#, PHP, Ruby, Swift, Kotlin
- Frameworks: React, Vue, Angular, Django, Flask, Express, Spring, Laravel
- Tools: VS Code, JetBrains, Vim, Emacs, Docker, Kubernetes
- Platforms: macOS, Windows, Linux, Android, iOS
- And many more...
🤝 Contributing¶
We welcome contributions! See our Contributing Guide for details.
📄 License¶
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments¶
- github/gitignore for the comprehensive template collection
- The Python community for excellent tooling and libraries
- All contributors who help make
gibetter
Ready to get started? Check out our Installation Guide!