Skip to main content

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 .gitignore includes a header with the full provenance_hash (Merkle of core + templates + rules_table + content) so drift is one grep away.
  • Supply chain: every release ships with an SPDX SBOM and a SLSA Level 3 build provenance attestation.

Links

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

occam_gitignore-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

occam_gitignore-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

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

Hashes for occam_gitignore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52e2944deaa6cebba93de689f27fd19d907aac8695bb460849307cbf110de896
MD5 a21b44f9ff0d93274484485dde4e2a17
BLAKE2b-256 2e275b0c1c08f2aaf6c3f874e4465ab3430d4298c99c3829dae451e01c193415

See more details on using hashes here.

Provenance

The following attestation bundles were made for occam_gitignore-0.1.0.tar.gz:

Publisher: release.yml on fabriziosalmi/gitignore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file occam_gitignore-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for occam_gitignore-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 755bfc41a5d49567715b5f723cdcf9d09fb37e5042f680c723185b25ca44bba6
MD5 c0a0fc05d96886477930a5f18424a5d9
BLAKE2b-256 b94f94fe150f6aec4e363ebef22de95baed155bd74f80a2bfa125b8b2ddd28ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for occam_gitignore-0.1.0-py3-none-any.whl:

Publisher: release.yml on fabriziosalmi/gitignore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page