CLI tool and Node.js module to automatically fetch .gitignore templates for any project type from GitHub's official gitignore repository. Current stable version is 0.7.0. Release cadence is irregular; last update was in 2019. Key differentiator: provides both a global CLI command and a programmatic API, with support for NPX for one-off invocations. Compared to alternatives (e.g., gitignore.io), it directly pulls from GitHub's authoritative collection with no external API dependency.
npm install gitignoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Programmatically fetch the Node.gitignore template and write it to a local file.
Switch to alternatives like 'node-fetch' or 'axios' as the package is not actively maintained.
Use npx gitignore <type> to avoid global install conflicts.
Ensure network connectivity or cache the types list locally.
Wrap callbacks with util.promisify for async/await usage.
Run 'npm install -g gitignore' for global CLI or use 'npx gitignore <type>'.
Use CommonJS require: const { getTypes } = require('gitignore');Use correct type argument: 'gitignore node' instead of 'gitignore --port'.