igittigitt
A spec-compliant .gitignore parser and path filter, 100% git-compatible, with an include/whitelist mode and a streaming, memory-bounded CLI
Decision gist · record as of 2026-08-14
Yes. Active, well-maintained library with no known vulnerabilities, low install friction, and permissive licensing. Solves a real problem (git-compatible ignore matching in pure Python) with a proven algorithm. Suitable for both library and CLI use. Install if you need to respect .gitignore rules in Python code or need a standalone CLI tool for filtering paths.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with no compiled dependencies.
- Active maintenance—last release 15 days ago, last commit 2026-08-01.
License · maintenance · safety
MIT (permissive) — MIT license (permissive). No restrictions on commercial or private use; attribution required but no copyleft obligations.
last release 2026-07-30 (15 days) · last repo commit 2026-08-01 · 29 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 134,024 downloads/mo, #11,489 on PyPI
Alternatives
Verify before relying
import igittigitt
parser = igittigitt.IgnoreParser()
parser.parse_rule_files(base_dir="/path/to/project")
parser.match("/path/to/project/file.pyc") # True if ignored
# or as a copytree filter:
import shutil
shutil.copytree("src", "dst", ignore=parser.shutil_ignore)- Performance characteristics on very large .gitignore files or deeply nested directory structures beyond the stated O(depth x rules) analysis.
- Whether the differential test suite against git check-ignore covers all edge cases in real-world projects.
What it is and what it does
igittigitt is a Python library and command-line tool that parses .gitignore files and determines whether paths match the ignore rules. It reproduces git's matching algorithm exactly, including negations, per-directory precedence, anchors, and glob patterns (**, *, ?, character classes). The library ships with type hints and no runtime dependency on the git binary itself.
You can use it three ways: as a library to query whether a path is ignored, as a filter callback for shutil.copytree to copy directory trees while respecting .gitignore rules, or as a CLI tool that mirrors git check-ignore or acts as a Unix filter (reading paths from stdin and printing survivors). It also offers an IncludeParser mode that inverts the logic to whitelist files instead. Memory usage scales with the number of rules, not the number of files, making it suitable for large directory trees.
Use it for
- Copy a project directory while excluding all ignored files (e.g., build artifacts, node_modules) using shutil.copytree.
- Check whether specific paths would be ignored by git without invoking the git binary.
- Filter a stream of file paths (from find or similar) to keep only non-ignored files in a pipeline.
- Build a whitelist of files to include in a distribution or archive, excluding everything else.
- Implement .gitignore-aware file operations in Python tools without shelling out to git.
- Validate or test .gitignore rules programmatically against a set of paths.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active, well-maintained library with no known vulnerabilities, low install friction, and permissive licensing. Solves a real problem (git-compatible ignore matching in pure Python) with a proven algorithm. Suitable for both library and CLI use. Install if you need to respect .gitignore rules in Python code or need a standalone CLI tool for filtering paths.
Install
igittigitt on PyPI
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance—last release 15 days ago, last commit 2026-08-01. Targets Python 3.10+ and tested across CPython 3.10–3.14.
Requires Python 3.10 or later.
License in practice
MIT license (permissive). No restrictions on commercial or private use; attribution required but no copyleft obligations.
Quickstart
import igittigitt
parser = igittigitt.IgnoreParser()
parser.parse_rule_files(base_dir="/path/to/project")
parser.match("/path/to/project/file.pyc") # True if ignored
# or as a copytree filter:
import shutil
shutil.copytree("src", "dst", ignore=parser.shutil_ignore)
Verify before relying
- Performance characteristics on very large .gitignore files or deeply nested directory structures beyond the stated O(depth x rules) analysis.
- Whether the differential test suite against git check-ignore covers all edge cases in real-world projects.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packageslib-cli-exit-toolslib-layered-configlib-log-richorjsonpydanticrich-clickwcmatch |
| Maintenance | Actively maintained 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 134,024 / month, #11,489 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed |
Evidence: igittigitt-2.2.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “git-compatible ignore matching”
- igittigittA spec-compliant .gitignore parser that matches git's algorithm…
- gitignorantParses .gitignore files and matches file paths against the parsed…
- gitignorefileParses `.gitignore` files according to Git's specification and checks…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also gitignorefile · mypy_baseline · gitignorant · py-walk · gitignore-parser · pathspec · gitmatch · ignore · ripgrep · rignore