Skip to main content

gignore

A simple and lightweight CLI for generating .gitignore files from gitignore.io templates.

Instead of manually searching for .gitignore templates, just tell gignore which technologies or tools your project uses.

Installation

Install globally with pipx:

pipx install gignore-cli

You can also install it with pip:

pip install gignore-cli

Usage

Generate a .gitignore for a Python project:

gignore python

You can combine multiple templates by separating them with commas:

gignore python,node

For example, for a project using Python, Node.js and VS Code:

gignore python,node,vscode

The generated .gitignore is created in the current working directory.

Adding templates

If a .gitignore already exists, gignore will ask whether you want to add the generated rules to the existing file.

For example:

gignore python,node

You can confirm the operation interactively, and the new rules will be added to the existing .gitignore.

Overwriting an existing file

To overwrite an existing .gitignore without confirmation, use -o or --override:

gignore python --override

or:

gignore python -o

List available templates

Display all available templates:

gignore --list

or:

gignore -l

Find templates

Search for templates by name:

gignore --find python

or:

gignore -f python

You can use this to discover the correct template name before generating your .gitignore.

Help

Display the available options and examples:

gignore --help

or:

gignore -h

Examples

Python project

mkdir my-project
cd my-project

gignore python

Full-stack project

gignore python,node,vscode

Multiple environments

gignore python,windows,macos,linux

Find a template

gignore -f django

List all templates

gignore -l

Overwrite an existing .gitignore

gignore python,node -o

How it works

gignore sends the requested templates to gitignore.io and uses the returned content to create or update the .gitignore file.

For example:

gignore python,node

requests the python and node templates and combines their rules into the generated .gitignore.

If a .gitignore already exists, the generated rules can be added to the existing file. Use --override when you want to replace the existing file instead.

Features

  • Simple command-line interface
  • Supports multiple templates
  • Search for available templates
  • List all available templates
  • Add generated rules to an existing .gitignore
  • Optional overwrite with --override
  • Generates .gitignore in the current directory
  • Built-in --help
  • Clear terminal output using Rich
  • Uses gitignore.io templates
  • Lightweight and easy to use

Development

Clone the repository:

git clone https://github.com/ze-fernando/gignore.git
cd gignore

Install the development dependencies:

pdm install

Run the CLI locally:

pdm run python -m gignore.main python,node

Build the package:

pdm build

The generated packages will be available in the dist/ directory.

License

This project is licensed under the MIT License.

Metadata

Release files for gignore-cli 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gignore-cli 1.1.4
File Size Uploaded Provenance Actions
gignore_cli-1.1.4.tar.gz 4.0 kB With provenance Details for gignore_cli-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gignore-cli 1.1.4
File Interpreter ABI Platform Actions
gignore_cli-1.1.4-py3-none-any.whl Python 3 none any Details for gignore_cli-1.1.4-py3-none-any.whl

Total release size: 9.4 kB

Release files / gignore_cli-1.1.4.tar.gz

Download URL gignore_cli-1.1.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ebeba87af592f8f595163cc35ff6954de1667fba3b018faafc71d5de4381e2da
BLAKE2b-256 checksum
How to use checksums
e5cfcbe9cc9e06f35b62dc62121cedd5bfa03466e6b70a463453a600cc9a9fb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / gignore_cli-1.1.4-py3-none-any.whl

Download URL gignore_cli-1.1.4-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ede6812dfc384de1709242ba023072fa6220578c0a0a297eae0b4268286f85f
BLAKE2b-256 checksum
How to use checksums
2080294447668db85ee415e7b97ab41452d1942460051593301b4d6583e3568d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Security for gignore-cli 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gignore_cli-1.1.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page