Skip to content

gi

Usage
gi [-h] [-b] [-p] [-s] [-l] [targets...]

Generates .gitignore content by querying the gitignore.io API. Appends results to the repository’s .gitignore with MD5-based deduplication — patterns already present are not re-appended — or prints to stdout with -s. Supports generic boilerplate and interactive prompt modes.

Arguments:

-h, --help Show help message
-d, --description Show the function description
-l, --list List all supported targets from the API
-b, --boilerplate Append boilerplate from $GITIGNORE_BOILERPLATE
-p, --prompt Prompt for patterns to append
-s, --stdout Print API output to stdout instead of .gitignore
targets Comma- or space-separated list of language/tool names

Returns:

0 Patterns appended or printed
1 Not in a git repository or API fetch failed
Examples
gi python,venv
gi -b -p
gi -s node > .gitignore