From f3190c70e2e6bcd6d9b773926d35bf39eab35279 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 20:11:46 +0000 Subject: [PATCH] Initial upload: project structure and documentation --- README.md | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 212 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 994e5ba..4b90164 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,213 @@ -# auto-gitignore-cli +# Auto-Gitignore CLI -A Python CLI tool that automatically generates .gitignore files by detecting project type, language, and framework from project files. \ No newline at end of file +A Python CLI tool that automatically generates `.gitignore` files by detecting project type, language, and framework from project files. + +## Features + +- **Auto-detection**: Automatically detects languages (Python, Node.js, Go, Java, etc.) and frameworks (Django, React, FastAPI, Flask, etc.) +- **Comprehensive Patterns**: Includes patterns for 19+ programming languages and 22+ frameworks +- **IDE Support**: Generates patterns for VSCode, JetBrains, PyCharm, and other IDEs +- **OS Patterns**: Includes macOS, Windows, and Linux specific ignores +- **Custom Patterns**: Support for adding custom patterns via CLI +- **Pattern Merging**: Handles monorepos and mixed projects with deduplication + +## Installation + +### From Source + +```bash +pip install -e . +``` + +### Using pip + +```bash +pip install auto-gitignore-cli +``` + +## Quick Start + +Generate a `.gitignore` for your current directory: + +```bash +auto-gitignore +``` + +Generate for a specific directory: + +```bash +auto-gitignore --path /path/to/project +``` + +Dry-run to preview without writing: + +```bash +auto-gitignore --dry-run +``` + +## Usage + +```bash +auto-gitignore [OPTIONS] +``` + +## Options + +| Option | Description | +|--------|-------------| +| `--path, -p` | Path to project directory (default: current directory) | +| `--language, -l` | Force specific language(s) | +| `--framework, -f` | Add framework-specific patterns | +| `--ide` | Add IDE-specific patterns | +| `--os` | Add OS-specific patterns | +| `--custom, -c` | Add custom pattern(s) | +| `--output, -o` | Custom output file path | +| `--merge/--no-merge` | Merge patterns from multiple sources (default: True) | +| `--dry-run` | Show generated content without writing | +| `--force` | Overwrite existing `.gitignore` | +| `--verbose, -v` | Show detected stack and details | +| `--help` | Show help message | + +## Examples + +### Detect and generate for Python project + +```bash +auto-gitignore --language python +``` + +### Add Django and React patterns + +```bash +auto-gitignore --framework django --framework react +``` + +### Include IDE and OS patterns + +```bash +auto-gitignore --ide vscode --ide jetbrains --os macos --os windows +``` + +### Add custom patterns + +```bash +auto-gitignore --custom "custom_dir/" --custom "*.custom" +``` + +### Save to custom location + +```bash +auto-gitignore --output ~/.gitignore-global +``` + +### Verbose mode with full detection info + +```bash +auto-gitignore --verbose +``` + +## Supported Languages + +- Python +- Node.js +- Go +- Java +- Rust +- C# +- C/C++ +- Ruby +- PHP +- Dart +- Swift +- Kotlin +- Scala +- Perl +- R +- Elixir +- Clojure +- Lua +- Haskell + +## Supported Frameworks + +### Python +- Django +- Flask +- FastAPI + +### JavaScript/TypeScript +- React +- Vue +- Angular +- Express +- Next.js +- Nuxt +- Svelte +- Gatsby +- Astro +- SvelteKit +- Remix +- Vite +- NestJS + +### Go +- Gin + +### Java +- Spring + +### Ruby +- Rails + +### PHP +- Laravel + +### .NET +- .NET/C# + +## IDE Support + +- VSCode +- JetBrains (IntelliJ, PyCharm, WebStorm, etc.) +- Eclipse +- NetBeans +- Sublime Text +- Vim +- Emacs +- Atom +- Spacemacs + +## Configuration + +No configuration file required. All options can be passed via CLI flags. + +## Development + +```bash +# Install development dependencies +pip install -e ".[dev]" + +# Run tests +pytest tests/ -v + +# Run with coverage +pytest tests/ --cov=src --cov-report=term-missing + +# Type checking +mypy src/ + +# Linting +ruff check . +``` + +## Contributing + +1. Fork the repository +2. Create a feature branch +3. Make your changes +4. Run tests: `pytest tests/ -v` +5. Submit a pull request + +## License + +MIT