hacktivist123 / goignore

A lightweight CLI tool for generating .gitignore file in your project. Built with Go and ❤️
MIT License
29 stars 6 forks source link

Made in Nigeria

goignore

goignore is a lightweight Command Line Interface (CLI) tool for generating .gitignore files based on the programming language you're using. It helps you easily create .gitignore files for your projects by either specifying a programming language or automatically detecting it from the files in your project directory.

Screenshot 2023-08-04 at 2 31 40 AM

Installation

Using Package

To use goignore, you need to have Go (Golang) installed on your system. If you haven't installed Go, you can download and install it from the official website.

Once you have Go installed, you can install goignore using the following command:

go install github.com/hacktivist123/goignore/cmd/goignore

Go pkg:

go get -u github.com/hacktivist123/goignore/cmd/goignore

Without installing package

Clone repo to your local directory with the command

git clone https://github.com/hacktivist123/goignore.git

Get the executable goignore file by running the command

go build ./goignore/cmd/goignore

A goignore executable file should be generated for you, you can run all the commands outlined above but this time prepend it with ./. Example:

./goingore list

Docker

You can find the official Docker image here

Usage

Auto-Detecting Language

If you want goignore to automatically detect the programming language based on the files in your project directory, you can run the following command:

goignore new

Generating .gitignore File

To generate a .gitignore file for a specific programming language, you can use the following command:

goignore new --language=<language>

Replace with the desired programming language. For example, to generate a .gitignore file for Python:

goignore new --language=python

You can also use the -l shorthand for the --language flag.

Initializing a git repo and a gitignore

If you want a gitignore file and a new git repository at the same time, you can do this by running the following command

gitignore new --init

You can also use the -i shorthand for the --init flag.

Listing Supported Languages

To list all supported programming languages for generating .gitignore files, you can use the following command:

goignore list

This will display a list of supported programming languages.

Todo for Upcoming Release

Contributing

Contributions to goignore are welcome! If you encounter any issues, have suggestions, or want to contribute improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.