gibo
Generate .gitignore files for projects
TLDR
List available boilerplates
Write a boilerplate to stdout
Write a boilerplate to .gitignore
Search for boilerplates containing a given string
Update available local boilerplates
SYNOPSIS
gibo [-l | -s KEYWORD | -u | -v | -h] [TEMPLATE_NAME...]
PARAMETERS
-l, --list
Lists all available
.gitignore templates that
gibo can generate. This option is exclusive with
TEMPLATE_NAME arguments.
-s, --search KEYWORD
Searches for
.gitignore templates whose names contain the specified
KEYWORD. This helps in discovering relevant templates.
Exclusive with
TEMPLATE_NAME arguments.
-u, --update
Updates the local cache of
.gitignore templates by fetching the latest versions from the
github/gitignore repository. Requires an active internet connection.
Exclusive with
TEMPLATE_NAME arguments.
-v, --version
Prints the version number of
gibo. Exclusive with
TEMPLATE_NAME arguments.
-h, --help
Displays the help message and available options for
gibo. Exclusive with
TEMPLATE_NAME arguments.
TEMPLATE_NAME...
One or more names of
.gitignore templates to fetch and combine. When provided,
gibo prints the combined content of these templates to standard output.
For example, gibo Python Node macOS.
DESCRIPTION
gibo is a powerful command-line utility designed to streamline the creation of
.gitignore files for Git repositories. It efficiently fetches and combines
.gitignore boilerplates from the official
github/gitignore repository, eliminating the need for manual copy-pasting or
maintaining local template collections. Users can specify one or more keywords
(e.g., "Python", "Node", "macOS") corresponding to desired templates.
gibo then prints the combined content of these templates to standard output,
which can be easily redirected to create or append to a
.gitignore file in the current project. Its features include listing all
available templates, searching for specific ones, updating the local template cache,
and providing a quick, consistent way to manage ignored files across diverse development
environments. It serves as a practical tool for developers to quickly set up
appropriate ignore rules without deep knowledge of specific project ignore patterns.
CAVEATS
gibo requires an active internet connection to update its template cache.
It does not directly modify or create files; its output must be
redirected (e.g., using > to create/overwrite or >> to append) to a
.gitignore file. The quality and availability of templates are
dependent on the upstream
github/gitignore project. There is no built-in functionality to remove
entries or templates from an existing
.gitignore file, requiring manual editing for such operations.
INSTALLATION
gibo is typically installed using Go's package manager, assuming Go is already installed:
go install github.com/tobiichi/gibo@latest
Alternatively, it might be available via system-specific package managers,
for example, on macOS with Homebrew:
brew install gibo
COMMON USAGE PATTERNS
To create a new
.gitignore file for a Python and Vim project:
gibo Python Vim > .gitignore
To append Node.js ignore rules to an existing
.gitignore file:
gibo Node >> .gitignore
To list all available templates:
gibo --list
To search for templates related to C++:
gibo --search C++
HISTORY
gibo was developed by Tobiichi as a solution to the common problem of
managing and generating comprehensive
.gitignore files for various programming languages and environments.
Prior to tools like gibo, developers often had to manually copy
.gitignore content from online sources or maintain their own local
collections, leading to inconsistencies and outdated rules.
gibo streamlined this process by leveraging the authoritative
github/gitignore repository, providing a simple command-line interface
to fetch and combine templates effortlessly. Its development reflects a broader trend
towards automating repetitive development tasks and promoting best practices
in version control by providing a centralized and up-to-date source for ignore rules.