Deterministic, content-addressed .gitignore generator. Same input always yields the same output, byte-for-byte.
Project description
occam-gitignore
Deterministic, content-addressed .gitignore generator. Given the same project
tree, always produces the same output — byte-for-byte — with a provenance_hash
header so any third party can verify the result was generated by an honest
implementation of the algorithm.
pipx install occam-gitignore
occam-gitignore generate /path/to/repo > .gitignore
Why deterministic?
A .gitignore is part of your repo's reproducible build surface. If two
checkouts of the same commit produce different ignore files, your CI is lying.
occam-gitignore fingerprints the project tree, runs a pure function over a
content-addressed templates table + a versioned mined-rules table, and emits an
ignore file annotated with hashes of every input. No I/O ordering, no clock,
no hostname.
Guarantees
- Determinism: identical inputs ⇒ identical bytes (UTF-8, LF, single trailing newline). Property-tested with Hypothesis (P1–P7) and validated by a 32-case conformance suite that any external implementation can run.
- Content addressing: templates and rules table carry
sha256:<12-hex>versions; mismatched declarations are rejected at load time. - Provenance: every emitted
.gitignoreincludes a header with the fullprovenance_hash(Merkle of core + templates + rules_table + content) so drift is onegrepaway. - Supply chain: every release ships with an SPDX SBOM and a SLSA Level 3 build provenance attestation.
Links
- Source: https://github.com/fabriziosalmi/gitignore
- Conformance spec: see
conformance/SPEC.md - Algorithm reference: pure Python in
occam-gitignore-core
MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file occam_gitignore-0.1.0.tar.gz.
File metadata
- Download URL: occam_gitignore-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e2944deaa6cebba93de689f27fd19d907aac8695bb460849307cbf110de896
|
|
| MD5 |
a21b44f9ff0d93274484485dde4e2a17
|
|
| BLAKE2b-256 |
2e275b0c1c08f2aaf6c3f874e4465ab3430d4298c99c3829dae451e01c193415
|
Provenance
The following attestation bundles were made for occam_gitignore-0.1.0.tar.gz:
Publisher:
release.yml on fabriziosalmi/gitignore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
occam_gitignore-0.1.0.tar.gz -
Subject digest:
52e2944deaa6cebba93de689f27fd19d907aac8695bb460849307cbf110de896 - Sigstore transparency entry: 1393189980
- Sigstore integration time:
-
Permalink:
fabriziosalmi/gitignore@962ef849f592648f159feae302e0b8af88c178f7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/fabriziosalmi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@962ef849f592648f159feae302e0b8af88c178f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file occam_gitignore-0.1.0-py3-none-any.whl.
File metadata
- Download URL: occam_gitignore-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
755bfc41a5d49567715b5f723cdcf9d09fb37e5042f680c723185b25ca44bba6
|
|
| MD5 |
c0a0fc05d96886477930a5f18424a5d9
|
|
| BLAKE2b-256 |
b94f94fe150f6aec4e363ebef22de95baed155bd74f80a2bfa125b8b2ddd28ce
|
Provenance
The following attestation bundles were made for occam_gitignore-0.1.0-py3-none-any.whl:
Publisher:
release.yml on fabriziosalmi/gitignore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
occam_gitignore-0.1.0-py3-none-any.whl -
Subject digest:
755bfc41a5d49567715b5f723cdcf9d09fb37e5042f680c723185b25ca44bba6 - Sigstore transparency entry: 1393185220
- Sigstore integration time:
-
Permalink:
fabriziosalmi/gitignore@962ef849f592648f159feae302e0b8af88c178f7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/fabriziosalmi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@962ef849f592648f159feae302e0b8af88c178f7 -
Trigger Event:
push
-
Statement type: