Cross-platform CLI tool for creating .gitignore files from GitHub and TopTal template collections
gitnr is a CLI utility that generates .gitignore files by combining templates from the GitHub and TopTal gitignore collections. It supports multiple template sources including local files, remote URLs, and GitHub repositories, automatically filtering duplicate ignore patterns when merging templates.
The tool provides both command-line and interactive modes. Users can specify templates with prefixes like gh:Rust for GitHub templates or tt:webstorm+all for TopTal patches, or omit prefixes for automatic detection. The interactive search mode allows browsing and previewing available templates before selection.
gitnr caches templates for one hour to avoid API rate limits and supports cross-platform installation on Windows, macOS, Linux, and NetBSD. Output can be directed to stdout, saved directly as .gitignore in the current directory, or written to a specified file path. The tool handles TopTal's stack and patch system, where stacks combine multiple templates and patches modify existing GitHub templates.
# via Homebrew
brew install gitnr
# via Cargo
cargo install gitnr
# via NetBSD
pkgin install gitnr
