UNPKG

gitignore-synthesizer

Version:

Generate smart .gitignore files based on your project's actual contents

42 lines (26 loc) โ€ข 1.79 kB
# 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