gign


Namegign JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryA magical CLI tool that automatically generates and manages .gitignore files
upload_time2025-07-09 14:32:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords git gitignore cli developer-tools automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # โœจ gign

A magical CLI tool that automatically generates and manages `.gitignore` files for your projects. Simply run it in any directory and watch as it intelligently detects your project's technologies and creates the perfect `.gitignore` file.

**Author:** Sherin Joseph Roy  
**Email:** sherin.joseph2217@gmail.com  
**Repository:** https://github.com/Sherin-SEF-AI/gitignore-gen  
**PyPI:** https://pypi.org/project/gign/

## ๐Ÿš€ Features

- **๐Ÿ” Smart Detection**: Automatically detects 50+ technologies including Python, Node.js, Java, Go, Rust, Swift, Unity, VS Code, JetBrains IDEs, and many more
- **๐ŸŒ API Integration**: Fetches templates from gitignore.io with intelligent caching
- **๐Ÿ”„ Smart Merging**: Combines multiple templates and removes duplicates
- **๐Ÿ›ก๏ธ Security Patterns**: Optional security-focused patterns for API keys, certificates, and secrets
- **๐Ÿ“ Monorepo Support**: Generate per-directory `.gitignore` files for complex projects
- **๐Ÿ’พ Backup & Safety**: Automatic backups and dry-run mode for safe experimentation
- **๐ŸŽจ Beautiful UI**: Rich terminal output with progress bars, colors, and emojis
- **โšก Performance**: Async operations for fast scanning and template fetching
- **๐Ÿ”ง Advanced Analysis**: Comprehensive project analysis with dependency scanning, security checks, and performance insights
- **๐Ÿ“Š Interactive Recommendations**: Get actionable suggestions based on your project structure
- **๐Ÿ”„ Real-time Monitoring**: Watch mode for automatic updates when files change
- **๐Ÿ“ฆ Custom Templates**: Create, manage, and share your own templates
- **๐Ÿ› ๏ธ Auto-fix**: Automatically remove tracked files that should be ignored

## ๐Ÿ“ฆ Installation

### From PyPI (Recommended)

```bash
pip install gign
```

### From Source

```bash
git clone https://github.com/Sherin-SEF-AI/gitignore-gen.git
cd gitignore-gen
pip install -e .
```

### Development Installation

```bash
git clone https://github.com/Sherin-SEF-AI/gitignore-gen.git
cd gitignore-gen
pip install -e ".[dev]"
```

## ๐ŸŽฏ Quick Start

### Basic Usage

Simply run `gign` in your project directory:

```bash
cd your-project
gign
```

The tool will:
1. ๐Ÿ” Scan your project for technologies
2. ๐Ÿš€ Fetch appropriate templates
3. ๐Ÿ”„ Merge and optimize the content
4. ๐Ÿ’พ Save a perfect `.gitignore` file

### Interactive Mode

For more control, use interactive mode:

```bash
gign --interactive
```

This will let you:
- Choose which templates to include
- Add custom templates
- Preview changes before applying

## ๐Ÿ“š Complete Command Reference

### Main Commands

#### `gign` - Main Generation
Generate a `.gitignore` file for the current directory.

```bash
# Basic generation
gign

# With options
gign --security --backup --dry-run

# Interactive mode
gign --interactive

# Minimal mode for cleaner output
gign --minimal

# Strict mode for precise patterns
gign --strict
```

**Options:**
- `--verbose, -v`: Enable verbose output
- `--quiet, -q`: Suppress all output except errors
- `--dry-run`: Preview changes without applying them
- `--interactive, -i`: Enable interactive mode
- `--backup`: Create backup of existing .gitignore
- `--security`: Add common security patterns
- `--monorepo`: Generate per-directory .gitignore files
- `--auto-fix`: Automatically remove files that should be ignored from git
- `--watch`: Watch for file changes and auto-update .gitignore
- `--export PATH`: Export current .gitignore configuration
- `--import PATH`: Import .gitignore configuration
- `--custom-templates PATH`: Path to custom templates directory
- `--force`: Force overwrite existing .gitignore
- `--minimal`: Generate minimal .gitignore with only essential patterns
- `--strict`: Use strict pattern matching for better accuracy

#### `gign scan` - Technology Detection
Scan directory and detect technologies in use.

```bash
# Scan current directory
gign scan

# Scan specific path
gign scan --path /path/to/project
```

#### `gign version` - Version Information
Show version information.

```bash
gign version
```

### Template Management

#### `gign list-templates` - List Templates
List available templates (built-in and custom).

```bash
# List all templates
gign list-templates

# Search for specific templates
gign list-templates --template python

# Show only custom templates
gign list-templates --custom-only
```

#### `gign templates` - Show Template Content
Show content of a specific template.

```bash
# Show Python template
gign templates --template python

# Save template to file
gign templates --template node --output node.gitignore
```

#### `gign create-template` - Create Custom Template
Create a custom template.

```bash
# Create from content
gign create-template --template myproject --content "*.log\n*.tmp"

# Create from file
gign create-template --template myproject --file template.txt
```

#### `gign update-template` - Update Template
Update an existing custom template.

```bash
# Update with new content
gign update-template --template myproject --content "*.log\n*.tmp\n*.cache"

# Update from file
gign update-template --template myproject --file new-template.txt
```

#### `gign delete-template` - Delete Template
Delete a custom template.

```bash
# Delete with confirmation
gign delete-template --template myproject

# Force delete without confirmation
gign delete-template --template myproject --force
```

#### `gign search-templates` - Search Templates
Search for templates by name or content.

```bash
# Search by name
gign search-templates --query python

# Search only custom templates
gign search-templates --query myproject --custom-only
```

### Project Analysis

#### `gign analyze` - Project Analysis
Analyze project structure and generate detailed report.

```bash
# Analyze current directory
gign analyze

# Analyze specific path
gign analyze --path /path/to/project

# Save report to file
gign analyze --output analysis_report.json
```

#### `gign scan-dependencies` - Dependency Scanning
Scan project dependencies and generate detailed report.

```bash
# Scan current directory
gign scan-dependencies

# Save as JSON
gign scan-dependencies --output deps.json

# Save as YAML
gign scan-dependencies --output deps.yaml --format yaml

# Save as CSV
gign scan-dependencies --output deps.csv --format csv
```

#### `gign performance-insights` - Performance Analysis
Generate performance insights and optimization recommendations.

```bash
# Analyze current directory
gign performance-insights

# Custom threshold (default: 10MB)
gign performance-insights --threshold 50

# Save report
gign performance-insights --output perf_report.json
```

#### `gign security-scan` - Security Analysis
Perform comprehensive security scan and generate report.

```bash
# Full security scan
gign security-scan

# Specific severity level
gign security-scan --severity high

# Save report
gign security-scan --output security_report.json
```

### Advanced Features

#### `gign monorepo-setup` - Monorepo Configuration
Set up comprehensive .gitignore structure for monorepos.

```bash
# Basic setup
gign monorepo-setup

# With shared patterns
gign monorepo-setup --shared

# Generate per-service files
gign monorepo-setup --per-service

# Specific strategy
gign monorepo-setup --strategy nested
```

**Strategies:**
- `flat`: Simple flat structure
- `nested`: Nested directory structure
- `hybrid`: Mixed approach (default)

#### `gign optimize` - .gitignore Optimization
Optimize existing .gitignore file for better performance.

```bash
# Preview optimizations
gign optimize --dry-run

# Apply optimizations
gign optimize

# Aggressive optimization
gign optimize --aggressive
```

#### `gign auto-fix` - Auto-fix Tracked Files
Automatically remove files that should be ignored from git.

```bash
# Preview what would be fixed
gign auto-fix --dry-run

# Apply fixes
gign auto-fix
```

#### `gign clean` - Clean Ignored Files
Clean up files that should be ignored from git.

```bash
# Preview cleanup
gign clean --dry-run

# Apply cleanup
gign clean
```

#### `gign watch` - File Watching
Watch for file changes and auto-update .gitignore.

```bash
# Watch current directory
gign watch

# Custom interval (default: 5 seconds)
gign watch --interval 10

# Watch specific path
gign watch --path /path/to/project
```

### Configuration Management

#### `gign export-config` - Export Configuration
Export .gitignore and detected technologies to a config file.

```bash
# Export to default location
gign export-config

# Export to specific file
gign export-config --output my-config.json
```

#### `gign import-config` - Import Configuration
Import a .gitignore-gen config and regenerate .gitignore.

```bash
# Import from file
gign import-config --config my-config.json

# Import to specific location
gign import-config --config my-config.json --output .gitignore
```

## ๐ŸŽจ Supported Technologies

### Programming Languages
- **Python** (Django, Flask, FastAPI, Jupyter)
- **Node.js** (React, Vue, Angular, Express)
- **Java** (Spring, Maven, Gradle, Android)
- **Go** (Go modules, Go workspaces)
- **Rust** (Cargo, Rust projects)
- **Swift** (iOS, macOS development)
- **C#** (.NET, Unity, Xamarin)
- **PHP** (Laravel, WordPress, Composer)
- **Ruby** (Rails, Bundler, RVM)
- **Dart** (Flutter, Dart projects)
- **Kotlin** (Android, JVM)
- **Scala** (SBT, Scala projects)

### Frameworks & Libraries
- **Frontend**: React, Vue, Angular, Svelte, Next.js, Nuxt.js
- **Backend**: Django, Flask, FastAPI, Express, Spring, Laravel
- **Mobile**: Flutter, React Native, Ionic
- **Desktop**: Electron, Tauri, PyQt, Tkinter

### Build Tools & Package Managers
- **JavaScript**: npm, yarn, pnpm, webpack, vite, rollup
- **Python**: pip, poetry, pipenv, conda
- **Java**: Maven, Gradle, Ant
- **Go**: go mod, go work
- **Rust**: Cargo, Cargo workspaces

### IDEs & Editors
- **VS Code** (.vscode, settings, extensions)
- **JetBrains** (IntelliJ IDEA, PyCharm, WebStorm, Android Studio)
- **Eclipse** (.metadata, .project, .classpath)
- **Vim/Neovim** (.vim, .nvim, swap files)
- **Emacs** (.emacs, .emacs.d)

### Operating Systems
- **macOS** (.DS_Store, Spotlight, Time Machine)
- **Windows** (Thumbs.db, desktop.ini, Recycle Bin)
- **Linux** (core dumps, temporary files)

### Cloud & DevOps
- **Docker** (Dockerfile, docker-compose, .dockerignore)
- **Kubernetes** (k8s manifests, helm charts)
- **Terraform** (.tfstate, .tfvars, modules)
- **Ansible** (playbooks, inventory, roles)
- **Jenkins** (workspace, builds, logs)

### Version Control
- **Git** (.git, .gitignore, .gitattributes)
- **GitHub** (GitHub Actions, .github)
- **GitLab** (GitLab CI, .gitlab-ci.yml)

### Testing & Quality
- **Jest** (coverage, snapshots)
- **Cypress** (videos, screenshots)
- **Playwright** (test-results, playwright-report)
- **Pytest** (.pytest_cache, coverage)
- **Coverage** (htmlcov, .coverage)

## ๐Ÿ”ง Configuration

Create a configuration file at `~/.gign.toml`:

```toml
[api]
base_url = "https://www.tgitignore.io/api"
timeout = 30

[cache]
enabled = true
ttl = 86400  # 24 hours

[security]
auto_add = false
patterns = [
    "*.key",
    "*.pem",
    "*.env"
]

[detection]
scan_depth = 3
ignore_dirs = [".git", "node_modules", "venv"]
```

## ๐Ÿงช Examples

### Python Project

```bash
$ gign
๐Ÿ” Scanning project...
๐Ÿš€ Generating .gitignore...
๐Ÿ’พ Saving .gitignore...

โœ… .gitignore generated successfully!

Detected technologies:
โ€ข python
โ€ข vscode
```

### React + Node.js Project

```bash
$ gign --interactive
๐Ÿ” Scanning project...
๐ŸŽฏ Template Selection:
Include python template? [y/N]: n
Include node template? [y/N]: y
Include react template? [y/N]: y
Include vscode template? [y/N]: y

๐Ÿ“‹ Generated .gitignore Preview:
# Generated by gign
# Technologies detected: node, react, vscode

node_modules/
.env
dist/
build/
.vscode/
*.log
...

Apply this .gitignore? [y/N]: y
โœ… .gitignore generated successfully!
```

### Monorepo with Security

```bash
$ gign --monorepo --security --backup
๐Ÿ” Scanning project...
๐Ÿš€ Generating .gitignore...
๐Ÿ’พ Saving .gitignore...

โœ… .gitignore generated successfully!
๐Ÿ“ Created per-directory .gitignore files
๐Ÿ”’ Added security patterns
๐Ÿ’พ Backup created: .gitignore.backup
```

### Advanced Analysis

```bash
$ gign analyze --output report.json
๐Ÿ” Analyzing project: /path/to/project

๐Ÿ“Š Project Analysis Results

๐Ÿ”ง Detected Technologies:
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Technology โ”ƒ Confidence โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ python     โ”‚ 100.0%     โ”‚
โ”‚ node       โ”‚ 30.0%      โ”‚
โ”‚ docker     โ”‚ 10.0%      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Dependencies:
  โ€ข python: pyproject.toml

๐Ÿ—๏ธ Project Structure:
  โ€ข Type: desktop
  โ€ข Depth: 8 levels

๐Ÿ“ˆ File Statistics:
  โ€ข Total files: 1250
  โ€ข Total directories: 45

๐Ÿ”’ Security Analysis:
  โ€ข โš ๏ธ Sensitive files found: 3
  โ€ข Recommendations:
    - Ensure .env files are in .gitignore

โšก Performance Analysis:
  โ€ข โš ๏ธ Deep directory nesting detected
  โ€ข Recommendations:
    - Consider flattening directory structure

๐Ÿ’ก Recommendations:
  1. Consider adding __pycache__/ and *.pyc to .gitignore
  2. Ensure node_modules/ is in .gitignore
  3. Ensure .env files are in .gitignore

โœ… Report saved to: report.json
```

### Custom Template Management

```bash
# Create a custom template
$ gign create-template --template myproject --content "*.log\n*.tmp\n.env.local"

# List templates (custom template will show with โœ“)
$ gign list-templates
๐Ÿ“š Available Templates:
Custom (1): myproject
Built-in (32): python, node, java, go, rust, php, ruby, csharp, swift, kotlin, scala, dart, flutter, react, vue, angular, svelte, docker, kubernetes, terraform, ansible, jenkins, github, gitlab, vscode, intellij, eclipse, vim, emacs, macos, windows, linux
  โœ“ myproject
  โ— python
  โ— node
  ...

# Search for templates
$ gign search-templates --query myproject
๐Ÿ” Search Results for "myproject":
  โœ“ myproject (custom template)
```

### Performance Optimization

```bash
$ gign optimize --dry-run
โšก Optimizing .gitignore in: /path/to/project
Original .gitignore: 150 lines

๐Ÿ” Optimization Analysis:
  โ€ข Duplicate patterns: 5
    Line 145: .coverage
    Line 146: htmlcov/
    Line 147: .pytest_cache/
  โ€ข Redundant patterns: 2
    Line 140: .cache/
  โ€ข Inefficient patterns: 1
    Line 25: *.egg-info/

Potential optimization: Remove 8 lines
Dry run mode - no changes applied
```

### Security Scanning

```bash
$ gign security-scan --severity high
๐Ÿ”’ Performing security scan in: /path/to/project
Severity level: high

๐Ÿ”’ Security Analysis Results:
  โ€ข โš ๏ธ Sensitive files found: 5
    - /path/to/project/.env
    - /path/to/project/config/private.key
    - /path/to/project/secrets/database.yml
    - /path/to/project/certificates/server.crt
    - /path/to/project/.aws/credentials

๐Ÿ’ก Security Recommendations:
  1. Ensure .env files are in .gitignore
  2. Add *.key and *.pem to .gitignore
  3. Consider using environment variables for secrets
  4. Review certificate files for sensitive data

โœ… Security report saved to: security_report.json
```

## ๐Ÿ” How It Works

1. **Directory Scanning**: Recursively scans your project directory
2. **Pattern Matching**: Uses intelligent patterns to detect technologies
3. **Template Fetching**: Retrieves templates from gitignore.io API
4. **Smart Merging**: Combines templates and removes duplicates
5. **Content Generation**: Creates optimized `.gitignore` content
6. **File Writing**: Saves the result with optional backup

## ๐Ÿ› Troubleshooting

### No Technologies Detected

If no technologies are detected, try:

```bash
# Use interactive mode to manually select templates
gign --interactive

# Or specify a template directly
gign templates --template python
```

### API Connection Issues

The tool includes fallback templates for common technologies. If the API is unavailable, it will use bundled templates.

### Permission Errors

Ensure you have read permissions for the directory you're scanning:

```bash
# Check permissions
ls -la

# Run with appropriate permissions
sudo gign  # if needed
```

### Template Fetch Errors

If templates fail to fetch, the tool will use built-in fallbacks:

```bash
# Check network connectivity
ping www.tgitignore.io

# Use offline mode (built-in templates)
gign --offline
```

## ๐Ÿค Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

### Development Setup

```bash
git clone https://github.com/Sherin-SEF-AI/gitignore-gen.git
cd gitignore-gen
pip install -e ".[dev]"
pre-commit install
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=gitignore_gen

# Run specific test file
pytest tests/test_detector.py
```

### Code Quality

```bash
# Format code
black gitignore_gen tests

# Sort imports
isort gitignore_gen tests

# Lint code
flake8 gitignore_gen tests

# Type checking
mypy gitignore_gen
```

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- [gitignore.io](https://www.tgitignore.io/) for providing the template API
- [Click](https://click.palletsprojects.com/) for the CLI framework
- [Rich](https://rich.readthedocs.io/) for beautiful terminal output
- [Watchdog](https://python-watchdog.readthedocs.io/) for file system monitoring

## ๐Ÿ“ž Support

- **Issues**: [GitHub Issues](https://github.com/Sherin-SEF-AI/gitignore-gen/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Sherin-SEF-AI/gitignore-gen/discussions)
- **Email**: sherin.joseph2217@gmail.com

## ๐Ÿ”„ Changelog

See [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes.

---

**By Sherin Joseph Roy** 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gign",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "sherin joseph roy <sherin.joseph2217@gmail.com>",
    "keywords": "git, gitignore, cli, developer-tools, automation",
    "author": null,
    "author_email": "sherin joseph roy <sherin.joseph2217@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/32/60/f6406259f0a6e18b10f67190aff4bbdd04ab86965130f082fcf658c6d15f/gign-1.0.2.tar.gz",
    "platform": null,
    "description": "# \u2728 gign\n\nA magical CLI tool that automatically generates and manages `.gitignore` files for your projects. Simply run it in any directory and watch as it intelligently detects your project's technologies and creates the perfect `.gitignore` file.\n\n**Author:** Sherin Joseph Roy  \n**Email:** sherin.joseph2217@gmail.com  \n**Repository:** https://github.com/Sherin-SEF-AI/gitignore-gen  \n**PyPI:** https://pypi.org/project/gign/\n\n## \ud83d\ude80 Features\n\n- **\ud83d\udd0d Smart Detection**: Automatically detects 50+ technologies including Python, Node.js, Java, Go, Rust, Swift, Unity, VS Code, JetBrains IDEs, and many more\n- **\ud83c\udf10 API Integration**: Fetches templates from gitignore.io with intelligent caching\n- **\ud83d\udd04 Smart Merging**: Combines multiple templates and removes duplicates\n- **\ud83d\udee1\ufe0f Security Patterns**: Optional security-focused patterns for API keys, certificates, and secrets\n- **\ud83d\udcc1 Monorepo Support**: Generate per-directory `.gitignore` files for complex projects\n- **\ud83d\udcbe Backup & Safety**: Automatic backups and dry-run mode for safe experimentation\n- **\ud83c\udfa8 Beautiful UI**: Rich terminal output with progress bars, colors, and emojis\n- **\u26a1 Performance**: Async operations for fast scanning and template fetching\n- **\ud83d\udd27 Advanced Analysis**: Comprehensive project analysis with dependency scanning, security checks, and performance insights\n- **\ud83d\udcca Interactive Recommendations**: Get actionable suggestions based on your project structure\n- **\ud83d\udd04 Real-time Monitoring**: Watch mode for automatic updates when files change\n- **\ud83d\udce6 Custom Templates**: Create, manage, and share your own templates\n- **\ud83d\udee0\ufe0f Auto-fix**: Automatically remove tracked files that should be ignored\n\n## \ud83d\udce6 Installation\n\n### From PyPI (Recommended)\n\n```bash\npip install gign\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/Sherin-SEF-AI/gitignore-gen.git\ncd gitignore-gen\npip install -e .\n```\n\n### Development Installation\n\n```bash\ngit clone https://github.com/Sherin-SEF-AI/gitignore-gen.git\ncd gitignore-gen\npip install -e \".[dev]\"\n```\n\n## \ud83c\udfaf Quick Start\n\n### Basic Usage\n\nSimply run `gign` in your project directory:\n\n```bash\ncd your-project\ngign\n```\n\nThe tool will:\n1. \ud83d\udd0d Scan your project for technologies\n2. \ud83d\ude80 Fetch appropriate templates\n3. \ud83d\udd04 Merge and optimize the content\n4. \ud83d\udcbe Save a perfect `.gitignore` file\n\n### Interactive Mode\n\nFor more control, use interactive mode:\n\n```bash\ngign --interactive\n```\n\nThis will let you:\n- Choose which templates to include\n- Add custom templates\n- Preview changes before applying\n\n## \ud83d\udcda Complete Command Reference\n\n### Main Commands\n\n#### `gign` - Main Generation\nGenerate a `.gitignore` file for the current directory.\n\n```bash\n# Basic generation\ngign\n\n# With options\ngign --security --backup --dry-run\n\n# Interactive mode\ngign --interactive\n\n# Minimal mode for cleaner output\ngign --minimal\n\n# Strict mode for precise patterns\ngign --strict\n```\n\n**Options:**\n- `--verbose, -v`: Enable verbose output\n- `--quiet, -q`: Suppress all output except errors\n- `--dry-run`: Preview changes without applying them\n- `--interactive, -i`: Enable interactive mode\n- `--backup`: Create backup of existing .gitignore\n- `--security`: Add common security patterns\n- `--monorepo`: Generate per-directory .gitignore files\n- `--auto-fix`: Automatically remove files that should be ignored from git\n- `--watch`: Watch for file changes and auto-update .gitignore\n- `--export PATH`: Export current .gitignore configuration\n- `--import PATH`: Import .gitignore configuration\n- `--custom-templates PATH`: Path to custom templates directory\n- `--force`: Force overwrite existing .gitignore\n- `--minimal`: Generate minimal .gitignore with only essential patterns\n- `--strict`: Use strict pattern matching for better accuracy\n\n#### `gign scan` - Technology Detection\nScan directory and detect technologies in use.\n\n```bash\n# Scan current directory\ngign scan\n\n# Scan specific path\ngign scan --path /path/to/project\n```\n\n#### `gign version` - Version Information\nShow version information.\n\n```bash\ngign version\n```\n\n### Template Management\n\n#### `gign list-templates` - List Templates\nList available templates (built-in and custom).\n\n```bash\n# List all templates\ngign list-templates\n\n# Search for specific templates\ngign list-templates --template python\n\n# Show only custom templates\ngign list-templates --custom-only\n```\n\n#### `gign templates` - Show Template Content\nShow content of a specific template.\n\n```bash\n# Show Python template\ngign templates --template python\n\n# Save template to file\ngign templates --template node --output node.gitignore\n```\n\n#### `gign create-template` - Create Custom Template\nCreate a custom template.\n\n```bash\n# Create from content\ngign create-template --template myproject --content \"*.log\\n*.tmp\"\n\n# Create from file\ngign create-template --template myproject --file template.txt\n```\n\n#### `gign update-template` - Update Template\nUpdate an existing custom template.\n\n```bash\n# Update with new content\ngign update-template --template myproject --content \"*.log\\n*.tmp\\n*.cache\"\n\n# Update from file\ngign update-template --template myproject --file new-template.txt\n```\n\n#### `gign delete-template` - Delete Template\nDelete a custom template.\n\n```bash\n# Delete with confirmation\ngign delete-template --template myproject\n\n# Force delete without confirmation\ngign delete-template --template myproject --force\n```\n\n#### `gign search-templates` - Search Templates\nSearch for templates by name or content.\n\n```bash\n# Search by name\ngign search-templates --query python\n\n# Search only custom templates\ngign search-templates --query myproject --custom-only\n```\n\n### Project Analysis\n\n#### `gign analyze` - Project Analysis\nAnalyze project structure and generate detailed report.\n\n```bash\n# Analyze current directory\ngign analyze\n\n# Analyze specific path\ngign analyze --path /path/to/project\n\n# Save report to file\ngign analyze --output analysis_report.json\n```\n\n#### `gign scan-dependencies` - Dependency Scanning\nScan project dependencies and generate detailed report.\n\n```bash\n# Scan current directory\ngign scan-dependencies\n\n# Save as JSON\ngign scan-dependencies --output deps.json\n\n# Save as YAML\ngign scan-dependencies --output deps.yaml --format yaml\n\n# Save as CSV\ngign scan-dependencies --output deps.csv --format csv\n```\n\n#### `gign performance-insights` - Performance Analysis\nGenerate performance insights and optimization recommendations.\n\n```bash\n# Analyze current directory\ngign performance-insights\n\n# Custom threshold (default: 10MB)\ngign performance-insights --threshold 50\n\n# Save report\ngign performance-insights --output perf_report.json\n```\n\n#### `gign security-scan` - Security Analysis\nPerform comprehensive security scan and generate report.\n\n```bash\n# Full security scan\ngign security-scan\n\n# Specific severity level\ngign security-scan --severity high\n\n# Save report\ngign security-scan --output security_report.json\n```\n\n### Advanced Features\n\n#### `gign monorepo-setup` - Monorepo Configuration\nSet up comprehensive .gitignore structure for monorepos.\n\n```bash\n# Basic setup\ngign monorepo-setup\n\n# With shared patterns\ngign monorepo-setup --shared\n\n# Generate per-service files\ngign monorepo-setup --per-service\n\n# Specific strategy\ngign monorepo-setup --strategy nested\n```\n\n**Strategies:**\n- `flat`: Simple flat structure\n- `nested`: Nested directory structure\n- `hybrid`: Mixed approach (default)\n\n#### `gign optimize` - .gitignore Optimization\nOptimize existing .gitignore file for better performance.\n\n```bash\n# Preview optimizations\ngign optimize --dry-run\n\n# Apply optimizations\ngign optimize\n\n# Aggressive optimization\ngign optimize --aggressive\n```\n\n#### `gign auto-fix` - Auto-fix Tracked Files\nAutomatically remove files that should be ignored from git.\n\n```bash\n# Preview what would be fixed\ngign auto-fix --dry-run\n\n# Apply fixes\ngign auto-fix\n```\n\n#### `gign clean` - Clean Ignored Files\nClean up files that should be ignored from git.\n\n```bash\n# Preview cleanup\ngign clean --dry-run\n\n# Apply cleanup\ngign clean\n```\n\n#### `gign watch` - File Watching\nWatch for file changes and auto-update .gitignore.\n\n```bash\n# Watch current directory\ngign watch\n\n# Custom interval (default: 5 seconds)\ngign watch --interval 10\n\n# Watch specific path\ngign watch --path /path/to/project\n```\n\n### Configuration Management\n\n#### `gign export-config` - Export Configuration\nExport .gitignore and detected technologies to a config file.\n\n```bash\n# Export to default location\ngign export-config\n\n# Export to specific file\ngign export-config --output my-config.json\n```\n\n#### `gign import-config` - Import Configuration\nImport a .gitignore-gen config and regenerate .gitignore.\n\n```bash\n# Import from file\ngign import-config --config my-config.json\n\n# Import to specific location\ngign import-config --config my-config.json --output .gitignore\n```\n\n## \ud83c\udfa8 Supported Technologies\n\n### Programming Languages\n- **Python** (Django, Flask, FastAPI, Jupyter)\n- **Node.js** (React, Vue, Angular, Express)\n- **Java** (Spring, Maven, Gradle, Android)\n- **Go** (Go modules, Go workspaces)\n- **Rust** (Cargo, Rust projects)\n- **Swift** (iOS, macOS development)\n- **C#** (.NET, Unity, Xamarin)\n- **PHP** (Laravel, WordPress, Composer)\n- **Ruby** (Rails, Bundler, RVM)\n- **Dart** (Flutter, Dart projects)\n- **Kotlin** (Android, JVM)\n- **Scala** (SBT, Scala projects)\n\n### Frameworks & Libraries\n- **Frontend**: React, Vue, Angular, Svelte, Next.js, Nuxt.js\n- **Backend**: Django, Flask, FastAPI, Express, Spring, Laravel\n- **Mobile**: Flutter, React Native, Ionic\n- **Desktop**: Electron, Tauri, PyQt, Tkinter\n\n### Build Tools & Package Managers\n- **JavaScript**: npm, yarn, pnpm, webpack, vite, rollup\n- **Python**: pip, poetry, pipenv, conda\n- **Java**: Maven, Gradle, Ant\n- **Go**: go mod, go work\n- **Rust**: Cargo, Cargo workspaces\n\n### IDEs & Editors\n- **VS Code** (.vscode, settings, extensions)\n- **JetBrains** (IntelliJ IDEA, PyCharm, WebStorm, Android Studio)\n- **Eclipse** (.metadata, .project, .classpath)\n- **Vim/Neovim** (.vim, .nvim, swap files)\n- **Emacs** (.emacs, .emacs.d)\n\n### Operating Systems\n- **macOS** (.DS_Store, Spotlight, Time Machine)\n- **Windows** (Thumbs.db, desktop.ini, Recycle Bin)\n- **Linux** (core dumps, temporary files)\n\n### Cloud & DevOps\n- **Docker** (Dockerfile, docker-compose, .dockerignore)\n- **Kubernetes** (k8s manifests, helm charts)\n- **Terraform** (.tfstate, .tfvars, modules)\n- **Ansible** (playbooks, inventory, roles)\n- **Jenkins** (workspace, builds, logs)\n\n### Version Control\n- **Git** (.git, .gitignore, .gitattributes)\n- **GitHub** (GitHub Actions, .github)\n- **GitLab** (GitLab CI, .gitlab-ci.yml)\n\n### Testing & Quality\n- **Jest** (coverage, snapshots)\n- **Cypress** (videos, screenshots)\n- **Playwright** (test-results, playwright-report)\n- **Pytest** (.pytest_cache, coverage)\n- **Coverage** (htmlcov, .coverage)\n\n## \ud83d\udd27 Configuration\n\nCreate a configuration file at `~/.gign.toml`:\n\n```toml\n[api]\nbase_url = \"https://www.tgitignore.io/api\"\ntimeout = 30\n\n[cache]\nenabled = true\nttl = 86400  # 24 hours\n\n[security]\nauto_add = false\npatterns = [\n    \"*.key\",\n    \"*.pem\",\n    \"*.env\"\n]\n\n[detection]\nscan_depth = 3\nignore_dirs = [\".git\", \"node_modules\", \"venv\"]\n```\n\n## \ud83e\uddea Examples\n\n### Python Project\n\n```bash\n$ gign\n\ud83d\udd0d Scanning project...\n\ud83d\ude80 Generating .gitignore...\n\ud83d\udcbe Saving .gitignore...\n\n\u2705 .gitignore generated successfully!\n\nDetected technologies:\n\u2022 python\n\u2022 vscode\n```\n\n### React + Node.js Project\n\n```bash\n$ gign --interactive\n\ud83d\udd0d Scanning project...\n\ud83c\udfaf Template Selection:\nInclude python template? [y/N]: n\nInclude node template? [y/N]: y\nInclude react template? [y/N]: y\nInclude vscode template? [y/N]: y\n\n\ud83d\udccb Generated .gitignore Preview:\n# Generated by gign\n# Technologies detected: node, react, vscode\n\nnode_modules/\n.env\ndist/\nbuild/\n.vscode/\n*.log\n...\n\nApply this .gitignore? [y/N]: y\n\u2705 .gitignore generated successfully!\n```\n\n### Monorepo with Security\n\n```bash\n$ gign --monorepo --security --backup\n\ud83d\udd0d Scanning project...\n\ud83d\ude80 Generating .gitignore...\n\ud83d\udcbe Saving .gitignore...\n\n\u2705 .gitignore generated successfully!\n\ud83d\udcc1 Created per-directory .gitignore files\n\ud83d\udd12 Added security patterns\n\ud83d\udcbe Backup created: .gitignore.backup\n```\n\n### Advanced Analysis\n\n```bash\n$ gign analyze --output report.json\n\ud83d\udd0d Analyzing project: /path/to/project\n\n\ud83d\udcca Project Analysis Results\n\n\ud83d\udd27 Detected Technologies:\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 Technology \u2503 Confidence \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 python     \u2502 100.0%     \u2502\n\u2502 node       \u2502 30.0%      \u2502\n\u2502 docker     \u2502 10.0%      \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n\ud83d\udce6 Dependencies:\n  \u2022 python: pyproject.toml\n\n\ud83c\udfd7\ufe0f Project Structure:\n  \u2022 Type: desktop\n  \u2022 Depth: 8 levels\n\n\ud83d\udcc8 File Statistics:\n  \u2022 Total files: 1250\n  \u2022 Total directories: 45\n\n\ud83d\udd12 Security Analysis:\n  \u2022 \u26a0\ufe0f Sensitive files found: 3\n  \u2022 Recommendations:\n    - Ensure .env files are in .gitignore\n\n\u26a1 Performance Analysis:\n  \u2022 \u26a0\ufe0f Deep directory nesting detected\n  \u2022 Recommendations:\n    - Consider flattening directory structure\n\n\ud83d\udca1 Recommendations:\n  1. Consider adding __pycache__/ and *.pyc to .gitignore\n  2. Ensure node_modules/ is in .gitignore\n  3. Ensure .env files are in .gitignore\n\n\u2705 Report saved to: report.json\n```\n\n### Custom Template Management\n\n```bash\n# Create a custom template\n$ gign create-template --template myproject --content \"*.log\\n*.tmp\\n.env.local\"\n\n# List templates (custom template will show with \u2713)\n$ gign list-templates\n\ud83d\udcda Available Templates:\nCustom (1): myproject\nBuilt-in (32): python, node, java, go, rust, php, ruby, csharp, swift, kotlin, scala, dart, flutter, react, vue, angular, svelte, docker, kubernetes, terraform, ansible, jenkins, github, gitlab, vscode, intellij, eclipse, vim, emacs, macos, windows, linux\n  \u2713 myproject\n  \u25cf python\n  \u25cf node\n  ...\n\n# Search for templates\n$ gign search-templates --query myproject\n\ud83d\udd0d Search Results for \"myproject\":\n  \u2713 myproject (custom template)\n```\n\n### Performance Optimization\n\n```bash\n$ gign optimize --dry-run\n\u26a1 Optimizing .gitignore in: /path/to/project\nOriginal .gitignore: 150 lines\n\n\ud83d\udd0d Optimization Analysis:\n  \u2022 Duplicate patterns: 5\n    Line 145: .coverage\n    Line 146: htmlcov/\n    Line 147: .pytest_cache/\n  \u2022 Redundant patterns: 2\n    Line 140: .cache/\n  \u2022 Inefficient patterns: 1\n    Line 25: *.egg-info/\n\nPotential optimization: Remove 8 lines\nDry run mode - no changes applied\n```\n\n### Security Scanning\n\n```bash\n$ gign security-scan --severity high\n\ud83d\udd12 Performing security scan in: /path/to/project\nSeverity level: high\n\n\ud83d\udd12 Security Analysis Results:\n  \u2022 \u26a0\ufe0f Sensitive files found: 5\n    - /path/to/project/.env\n    - /path/to/project/config/private.key\n    - /path/to/project/secrets/database.yml\n    - /path/to/project/certificates/server.crt\n    - /path/to/project/.aws/credentials\n\n\ud83d\udca1 Security Recommendations:\n  1. Ensure .env files are in .gitignore\n  2. Add *.key and *.pem to .gitignore\n  3. Consider using environment variables for secrets\n  4. Review certificate files for sensitive data\n\n\u2705 Security report saved to: security_report.json\n```\n\n## \ud83d\udd0d How It Works\n\n1. **Directory Scanning**: Recursively scans your project directory\n2. **Pattern Matching**: Uses intelligent patterns to detect technologies\n3. **Template Fetching**: Retrieves templates from gitignore.io API\n4. **Smart Merging**: Combines templates and removes duplicates\n5. **Content Generation**: Creates optimized `.gitignore` content\n6. **File Writing**: Saves the result with optional backup\n\n## \ud83d\udc1b Troubleshooting\n\n### No Technologies Detected\n\nIf no technologies are detected, try:\n\n```bash\n# Use interactive mode to manually select templates\ngign --interactive\n\n# Or specify a template directly\ngign templates --template python\n```\n\n### API Connection Issues\n\nThe tool includes fallback templates for common technologies. If the API is unavailable, it will use bundled templates.\n\n### Permission Errors\n\nEnsure you have read permissions for the directory you're scanning:\n\n```bash\n# Check permissions\nls -la\n\n# Run with appropriate permissions\nsudo gign  # if needed\n```\n\n### Template Fetch Errors\n\nIf templates fail to fetch, the tool will use built-in fallbacks:\n\n```bash\n# Check network connectivity\nping www.tgitignore.io\n\n# Use offline mode (built-in templates)\ngign --offline\n```\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Setup\n\n```bash\ngit clone https://github.com/Sherin-SEF-AI/gitignore-gen.git\ncd gitignore-gen\npip install -e \".[dev]\"\npre-commit install\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=gitignore_gen\n\n# Run specific test file\npytest tests/test_detector.py\n```\n\n### Code Quality\n\n```bash\n# Format code\nblack gitignore_gen tests\n\n# Sort imports\nisort gitignore_gen tests\n\n# Lint code\nflake8 gitignore_gen tests\n\n# Type checking\nmypy gitignore_gen\n```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- [gitignore.io](https://www.tgitignore.io/) for providing the template API\n- [Click](https://click.palletsprojects.com/) for the CLI framework\n- [Rich](https://rich.readthedocs.io/) for beautiful terminal output\n- [Watchdog](https://python-watchdog.readthedocs.io/) for file system monitoring\n\n## \ud83d\udcde Support\n\n- **Issues**: [GitHub Issues](https://github.com/Sherin-SEF-AI/gitignore-gen/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Sherin-SEF-AI/gitignore-gen/discussions)\n- **Email**: sherin.joseph2217@gmail.com\n\n## \ud83d\udd04 Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes.\n\n---\n\n**By Sherin Joseph Roy** \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A magical CLI tool that automatically generates and manages .gitignore files",
    "version": "1.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/Sherin-SEF-AI/gitignore-gen/issues",
        "Changelog": "https://github.com/Sherin-SEF-AI/gitignore-gen/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/Sherin-SEF-AI/gitignore-gen#readme",
        "Homepage": "https://github.com/Sherin-SEF-AI/gitignore-gen",
        "Repository": "https://github.com/Sherin-SEF-AI/gitignore-gen"
    },
    "split_keywords": [
        "git",
        " gitignore",
        " cli",
        " developer-tools",
        " automation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "29693c8c31179b0a15528b175b1fb4fbab3a99bc435d212c020823808cbcb8ca",
                "md5": "f22bb8cadcd39eefe08dfe75065298a3",
                "sha256": "d3f37aa0418e1129db4cb64cc213d5477cd11e62b71fb8901554d31a81a48d98"
            },
            "downloads": -1,
            "filename": "gign-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f22bb8cadcd39eefe08dfe75065298a3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 32748,
            "upload_time": "2025-07-09T14:32:21",
            "upload_time_iso_8601": "2025-07-09T14:32:21.567570Z",
            "url": "https://files.pythonhosted.org/packages/29/69/3c8c31179b0a15528b175b1fb4fbab3a99bc435d212c020823808cbcb8ca/gign-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3260f6406259f0a6e18b10f67190aff4bbdd04ab86965130f082fcf658c6d15f",
                "md5": "cb43cf46a3c8b2d5b8b915ce4dc23701",
                "sha256": "370b6b28859467628a714320564ed28fd5b96574657d3b59d0a39be2bf724ae2"
            },
            "downloads": -1,
            "filename": "gign-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "cb43cf46a3c8b2d5b8b915ce4dc23701",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33330,
            "upload_time": "2025-07-09T14:32:22",
            "upload_time_iso_8601": "2025-07-09T14:32:22.899208Z",
            "url": "https://files.pythonhosted.org/packages/32/60/f6406259f0a6e18b10f67190aff4bbdd04ab86965130f082fcf658c6d15f/gign-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 14:32:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Sherin-SEF-AI",
    "github_project": "gitignore-gen",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gign"
}
        
Elapsed time: 1.03351s