Skip to content

A simple command-line tool for managing .gitignore files in your Git repositories

License

Notifications You must be signed in to change notification settings

tasnimzotder/ignore-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Release GitHub Actions Workflow Status GitHub Downloads (all assets, all releases)

Ignore CLI

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.

Features

  • 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

Installation

Using Brew (macOS)

brew tap tasnimzotder/ignore-cli https://github.com/tasnimzotder/ignore-cli
brew install ignore-cli

From Binary

To install the ignore binary, you can download it from the releases page.

From Source

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.

Usage

After installation, you can use the ignore command to manage your .gitignore files. Here's an overview of the available commands:

ignore [command] [flags]

Commands

Add

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

List all available .gitignore templates:

ignore list

Search

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

Workflow

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
Loading

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A simple command-line tool for managing .gitignore files in your Git repositories

Topics

Resources

License

Stars

Watchers

Forks