Ignore CLI is a simple command-line tool for managing .gitignore files in your Git repositories. It allows you to easily add, list, and search for .gitignore templates, streamlining your workflow and helping you maintain clean repositories.
- Add
.gitignoretemplates to your project - List available
.gitignoretemplates - Search for specific
.gitignoretemplates - Efficient caching of templates for improved performance
- User-friendly command-line interface built with Cobra
brew tap tasnimzotder/ignore-cli https://github.com/tasnimzotder/ignore-cli
brew install ignore-cliTo install the ignore binary, you can download it from the releases page.
To build the binary from source, ensure you have Go installed and run the following commands:
git clone https://github.com/tasnimzotder/ignore-cli.git
cd ignore-cli
make buildThe binary will be available in the build/ directory.
After installation, you can use the ignore command to manage your .gitignore files. Here's an overview of the available commands:
ignore [command] [flags]Add a .gitignore template to your project:
ignore add <template-name> [--override]<template-name>: The name of the template to add (e.g., "Go", "Node", "Python")--overrideor-o: Optional flag to override the existing.gitignorefile
List all available .gitignore templates:
ignore listSearch for specific .gitignore templates:
ignore search <query><query>: The search term to find matching templates
For more detailed information about each command and its options, use the --help flag:
ignore --help
ignore [command] --helpgraph TD
A[Start] --> B{Command?}
B -->|Add| C[Add Command]
B -->|List| D[List Command]
B -->|Search| E[Search Command]
C --> F{Template in Cache?}
F -->|Yes| G[Retrieve from Cache]
F -->|No| H[Fetch from GitHub API]
G --> I[Update .gitignore file]
H --> J[Update Cache]
J --> I
D --> K[Retrieve Templates from Cache]
K --> L{Cache Expired?}
L -->|Yes| M[Update Cache from GitHub API]
L -->|No| N[Display Template List]
M --> N
E --> O[Search Query]
O --> P[Search in Cached Templates]
P --> Q[Display Search Results]
I --> R[End]
N --> R
Q --> R
This project is licensed under the MIT License. See the LICENSE file for details.