Skip to main content

ignr.py

ignr.py (or simply ignr) is a Python-based command line utility to fetch .gitignore templates from gitignore.io. gitignore.io has official command line tools, but they rely on bash or zsh, and may not be compatible with all systems out there.

The .gitignore file in this repository was generated using ignr, if you want to look at a sample!

There's also a Go-based alternative, gogi, but not everyone uses Go.

ignr was created for Python users who prefer to install via PyPI and/or pip.

Note: Version 2.0 completely drops Python 2 support in favor of Python 3, released late-2019.

Usage

Install using

pip install ignr

List

ignr -l

Lists all available .gitignore templates on gitignore.io.

Search

ignr -s mac

Searches for supplied query in list of available templates from gitignore.io, similar to using grep.

Preview

ignr -p scala macOS

Prints a preview of the template without generating a .gitignore file. List multiple space-separated languages, frameworks, operating systems to get combined output.

Create

ignr -n node sass windows

Generates a new .gitignore file in the current directory. List multiple space-separated languages, frameworks, operating systems to get combined output.

If a .gitignore already exists in the directory, ignr will give you an option to back it up.

Troubleshooting

Since gitignore.io uses HTTPS, running this utility in certain macOS environments may result in an SSL "handshake failure" error, which is discussed in detail in this requests issue.

Unfortunately, there is no trivial fix.

In my experience, switching from the included Python in El Capitan to a standalone Python installed via brew solved the issue. All my existing packages seemed to remain intact.

Contribute

Feel free to make improvements. PRs are greatly appreciated.

I can be reached @Antrikshy or via reddit.

Metadata

Release files for gnor 0.0.2

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

Source distribution (sdist)

Source distribution for gnor 0.0.2
File Size Uploaded Provenance
gnor-0.0.2.tar.gz 39.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gnor 0.0.2
File Interpreter ABI Platform
gnor-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / gnor-0.0.2.tar.gz

Download URL gnor-0.0.2.tar.gz
Size 39.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3904615a14c1898f8fac0587bc54ddc40e103be1479afde99f66108833c3126f
BLAKE2b-256 checksum
How to use checksums
d9dc9120e9d98f8f668672ef0542d7a91f57e9291acc5540043b10e8559deed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Release files / gnor-0.0.2-py3-none-any.whl

Download URL gnor-0.0.2-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfeab80643213d607883c242bcfd70a64dc3601f8cf4cc05cdbd495051619ccb
BLAKE2b-256 checksum
How to use checksums
5bb760b13932f2e4bf491c5fd7b61824c9161998e41094a41cd175b8ecf3f2f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.2

Security for gnor 0.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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