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
.gitignore
templates to your project - List available
.gitignore
templates - Search for specific
.gitignore
templates - 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-cli
To 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 build
The 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")--override
or-o
: Optional flag to override the existing.gitignore
file
List all available .gitignore
templates:
ignore list
Search 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] --help
graph 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.