gitnr
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.
Installation
# via Homebrew
brew install gitnr
# via Cargo
cargo install gitnr
# via NetBSD
pkgin install gitnr

Alternatives & related tools
ftdv
Terminal-based diff viewer for Git with interactive file tree navigation and configurable external diff tool support.
lazyjj
Terminal UI for Jujutsu version control system, providing interactive log browsing, file management, and bookmark operations
serie
Terminal UI for git commit graphs using image protocols to render rich visualizations in supported terminals
gitu
Terminal user interface for Git inspired by Magit, providing visual staging, branching, and repository management
git absorb
Git subcommand that automatically creates fixup! commits from staged changes by finding the commit each hunk belongs to, with optional autosquash rebase.
add a badge to your README
Maintain gitnr? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/gitnr?utm_source=badge)<a href="https://www.trmn.sh/tools/gitnr?utm_source=badge"><img src="https://www.trmn.sh/badge/gitnr.svg" alt="Featured on trmn" height="20"></a>