YAGI

YET! ANOTHER .GITIGNORE
A powerful Visual Studio Code extension that simplifies creating and managing .gitignore files for your projects. YAGI fetches up-to-date templates for various languages, frameworks, tools, and environments using the Toptal gitignore API.
 

Features
🚀 Smart Template Suggestions
YAGI automatically detects your project type by analyzing common files (e.g., package.json, pom.xml, requirements.txt, go.mod) and suggests relevant templates. It also pre-selects OS-specific templates based on your platform.
👁️ Template Preview
Preview the generated .gitignore content before applying it to your project, ensuring you know exactly what will be ignored.
⚡ Quick Access
A convenient status bar item provides one-click access to generate .gitignore files without opening the command palette.
🔄 Flexible File Management
- Create a new .gitignorefile from scratch
- Override an existing .gitignorefile
- Append templates to an existing .gitignorefile
📦 Always Up-to-Date
Fetches templates directly from the Toptal API, ensuring you always get the most recent and comprehensive ignore patterns.
💾 Intelligent Caching
Built-in caching system reduces API calls and improves performance, with configurable TTL settings.
Usage
Quick Start
- Click the GitIgnore button in the status bar (bottom-right corner)
- Select templates from the list (smart suggestions will be pre-selected)
- Choose to create, override, or append to your .gitignorefile
Command Palette
- Open the command palette (Ctrl+Shift+Pon Windows/Linux,Cmd+Shift+Pon macOS)
- Run one of these commands:
- Generate .gitignore - Create or update your .gitignorefile
- Preview .gitignore from templates - Preview templates before applying
- YAGI: Clear Cache - Clear cached templates and content
 
Smart Suggestions
YAGI automatically suggests templates based on:
- Project files: Detects Node, Python, Java, Go, Rust, Ruby, PHP, Unity, C/C++, and more
- Operating system: Automatically includes macOS, Windows, or Linux templates
- User preferences: Pre-selects templates defined in your settings
Requirements
- Visual Studio Code 1.105.0 or later
- Active internet connection (to fetch templates from the API)
- An open workspace folder
Configuration
YAGI can be customized through VS Code settings:
| Setting | Type | Default | Description | 
| yagi.templateListTtl | number | 86400000 | Cache duration for template list (24 hours in ms) | 
| yagi.gitignoreCacheTtl | number | 3600000 | Cache duration for gitignore content (1 hour in ms) | 
| yagi.maxCacheSize | number | 100 | Maximum number of cached gitignore templates | 
| yagi.defaultTemplates | array | [] | Templates to pre-select (e.g., ["node", "vscode"]) | 
| yagi.customApiEndpoint | string | null | Custom API endpoint for gitignore templates | 
| yagi.customGitignorePath | string | ".gitignore" | Custom path for .gitignore file (relative to workspace root) | 
Example Configuration
{
    "yagi.templateListTtl": 86400000,
    "yagi.gitignoreCacheTtl": 3600000,
    "yagi.maxCacheSize": 100,
    "yagi.defaultTemplates": ["node", "vscode", "macos"],
    "yagi.customGitignorePath": ".gitignore"
}
Supported Project Types
YAGI automatically detects and suggests templates for:
- JavaScript/TypeScript: Node.js projects (detects package.json,yarn.lock,pnpm-lock.yaml)
- Python: Python projects (detects requirements.txt,pyproject.toml)
- Java: Maven and Gradle projects (detects pom.xml,build.gradle)
- Go: Go modules (detects go.mod)
- Rust: Cargo projects (detects Cargo.toml)
- Ruby: Bundler projects (detects Gemfile)
- PHP: Composer projects (detects composer.json)
- Unity: Unity game engine projects (detects Packages/manifest.json,Assets)
- C/C++: CMake projects (detects CMakeLists.txt)
- Operating Systems: macOS, Windows, Linux
Known Issues
- Requires an active internet connection to fetch templates
- Only works within VS Code workspace folders
- Template detection is based on common project files and may not cover all edge cases
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
License
For more information, see LICENSE.