gi
Synopsis
Section titled “Synopsis”gi [-h] [-b] [-p] [-o] [-s] [-f] [-c TEMPLATE] [-l] [targets...]Description
Section titled “Description”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 -o/--stdout. Boilerplate mode uses $GITIGNORE_BOILERPLATE if set, a -c/--custom template if given, or falls back to the bundled standard template (data/gi/boilerplate.gitignore) when neither is configured. Supports generic boilerplate and interactive prompt modes.
Arguments
Section titled “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 (implied by -c) |
-p, --prompt |
Prompt for patterns to append |
-o, --stdout |
Print generated content to stdout instead of .gitignore |
-s, --silent |
Suppress progress output (errors and prompts still show) |
-f, --force |
Bypass prompts, proceeding with the default action |
-c, --custom PATH |
Use PATH as the boilerplate template instead of $GITIGNORE_BOILERPLATE |
targets |
Comma- or space-separated list of language/tool names |
Exit Status
Section titled “Exit Status”0 |
Patterns appended, or resolved with -o/--stdout or -l/--list |
1 |
Not in a git repository, API fetch failed, or curl is not installed |
2 |
Unknown option |
Returns
Section titled “Returns”With -o/--stdout, the fetched .gitignore pattern text, printed to stdout. With -l/--list, the supported target list, printed to stdout.
Example
Section titled “Example”gi python,venvgi -b -pgi -o node > .gitignoregi -f # skip prompt, proceed with no patternsgi -c ~/my-template.gitignoreDependencies: curl, md5sum, md5, gitignore-scrub
Classification: self-limiting(grep,cat), network, blocking-prompt