ignore-hub
v0.2.3
Published
Interactive OpenTUI wizard to generate .gitignore from github/gitignore
Readme
ignore-hub
Interactive TUI CLI to generate .gitignore from
github/gitignore.
Screenshots
Template selection:

Preview + generate:

Install
From npm
bun add -g ignore-hub
# or
npm i -g ignore-hubThis package is distributed via npm and supports installation with npm/bun.
The CLI runtime is Bun-native at the moment (via OpenTUI).
If global bin is not on PATH, run directly with:
bunx ignore-hub
bunx ihStandalone binary (no Bun required for end users)
Build binaries with Bun once, then distribute the generated executable file(s):
# current platform target only
bun run build:binOutputs are written to dist/ (for example: dist/ignore-hub-bun-darwin-arm64).
To release binaries for multiple platforms, run bun run build:bin on a matching
OS/arch runner for each target (for example via CI matrix jobs).
End users can run the binary directly without installing Bun:
./ignore-hub-bun-darwin-arm64 --helpLocal install (development)
bun install
bun linkThen run anywhere:
ignore-hub
ihUsage
ih [options]ignore-hub and ih are equivalent.
Options:
--output <path>: write output file path (default:./.gitignore)--refresh: force refresh template index from GitHub--stdout: print result to stdout instead of writing file-h, --help: show help-v, --version: print installed version-t, --template <names>: select templates directly (comma-separated or repeated)-a, --auto: detect templates from project structure-s, --simple-sepration: output template section headers as## Templateand skip generated markers--no-interactive: skip interactive TUI and generate directly
Examples:
ih -t unity,nodeih --auto --no-interactiveih --auto -t java,unity -o .gitignoreih -a -t java,unity -o .gitignoreih -t node -s
TUI keys
↑/↓: moveSpace: toggle selectionEnter: next step / confirmBackspace: delete search text (when searching) or go previous stepCtrl+R: refresh template indexq: quittype letters/numbers: quick filter in current step
Auto-detect extensibility
--autousesDEFAULT_PROJECT_TEMPLATE_DETECTION_RULESfromsrc/cli/projectDetector.ts.- Each rule is a template id plus a set of marker combinations.
- A template is matched when any marker combination is fully satisfied.
- Marker types currently supported:
path(required file/directory path, optional expected type)extension(file extension with max recursion depth)
To add a new project-to-template mapping, add a new rule in this list.
Repo
Source code: github/gitignore only.
src/data/githubClient.ts: fetches template index and template contentsrc/data/cacheStore.ts: manages~/.cache/ignore-hub/index.jsonsrc/domain/classification.ts: classifies root templates intolanguage/frameworksrc/domain/mergeGitignore.ts: merges selections into an idempotent###sectionsrc/app/*: OpenTUI steps and wizard flow
