gitignore-synthesizer
Version:
Generate smart .gitignore files based on your project's actual contents
42 lines (26 loc) โข 1.79 kB
Markdown
# gitignore-synthesizer
**gitignore-synthesizer** is a command-line tool that helps developers automatically generate a `.gitignore` file based on the tools, languages, and frameworks detected in their project.
Instead of manually searching for `.gitignore` templates, this tool intelligently scans your project, fetches the correct templates from GitHubโs official [gitignore repository](https://github.com/github/gitignore), and safely updates or creates a `.gitignore` file โ all in one command.
## ๐ง Why Use This?
When starting a new project, many developers forget to create a proper `.gitignore` file, which can lead to committing sensitive files or large folders like `node_modules/`. This package makes it effortless by:
- Detecting the type of project you're working on (Node.js, React, Python, etc.)
- Fetching the correct `.gitignore` file templates
- Combining multiple templates if needed (e.g., React + Node)
- Keeping your existing `.gitignore` safe with a backup
- Letting you preview before writing
## ๐ Features
- ๐ต๏ธ **Automatic Detection**: Identifies frameworks, tools, and common project patterns.
- ๐ฆ **Template Fetching**: Downloads official `.gitignore` templates from GitHub.
- ๐งฉ **Merge with Existing**: Updates `.gitignore` without losing custom entries.
- ๐พ **Backup Safety**: Creates a `.bak` backup of your current `.gitignore`.
- ๐ฅ๏ธ **Interactive CLI**: Option to review or select templates manually.
- ๐ ๏ธ **Customizable**: Future versions will support custom rules and configs.
## ๐ฆ Installation
You can install `gitignore-synthesizer` globally using npm:
```bash
npm install -g gitignore-synthesizer
## Usage:
Run gignore in the command line interface