Skip to content

AriajSarkar/gitignore-gen

gitignore-gen

CI Release License MSRV

Automatically generate .gitignore files based on project analysis.

Features

  • 🔍 Smart Detection - Automatically detects project technologies by scanning files
  • 🌐 GitHub Templates - Fetches official gitignore templates from GitHub
  • 🦀 Cross-Platform - Works on Linux, Windows, and macOS
  • Fast - Written in Rust for maximum performance

Supported Technologies

Technology Detection Method
Rust Cargo.toml
Go go.mod
Node.js package.json
Python requirements.txt, pyproject.toml
Java pom.xml, .java files
Maven pom.xml

Installation

One-Line Install (Recommended)

Windows (PowerShell):

iwr https://github.com/AriajSarkar/gitignore-gen/raw/master/scripts/install.ps1 -useb | iex

Linux / macOS:

curl -fsSL https://github.com/AriajSarkar/gitignore-gen/raw/master/scripts/install.sh | bash

Build from Source

If you have Rust installed:

cargo install --git https://github.com/AriajSarkar/gitignore-gen

Usage

# Generate .gitignore in current directory
gitignore-gen

How It Works

  1. Scan - Analyzes your project directory for technology markers
  2. Detect - Identifies languages and frameworks from file patterns
  3. Match - Finds templates from embedded github/gitignore collection
  4. Generate - Combines templates and writes .gitignore

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

Uninstallation

gitignore-gen uninstall

This will automatically remove the binary from your system.

License

Licensed under either of:

at your option.