# Install lucky-commit with Homebrew, MacPorts, Nix, pacman

Customize your git commit hashes! Version 2.2.5 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:lucky-commit
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install lucky-commit
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lucky-commit
```

  Evidence: MacPorts ports tree: devel/lucky-commit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#lucky-commit
```

  Evidence: nixpkgs package indexes: pkgs/by-name/lu/lucky-commit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S lucky-commit
```

  Evidence: Arch Linux sync databases: lucky-commit from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:lucky-commit
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/lucky-commit>
- **Version:** 2.2.5
- **Source summary:** Customize your git commit hashes!
- **Homepage:** <https://github.com/not-an-aardvark/lucky-commit>
- **Repository:** <https://github.com/not-an-aardvark/lucky-commit>
- **Upstream docs:** <https://github.com/not-an-aardvark/lucky-commit#readme>
- **License:** MIT
- **Source archive:** <https://github.com/not-an-aardvark/lucky-commit/archive/refs/tags/v2.2.5.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- lucky_commit (cli)
- lucky_commit (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.2.5
- Local data: ok
- Upstream repository: https://github.com/not-an-aardvark/lucky-commit
- Upstream latest detected: v2.2.5 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

lucky-commit is a small Rust command-line tool for rewriting the current Git commit so that its object hash begins with a chosen prefix, defaulting to a run of zeroes.

### Project history

The project was made public on GitHub in February 2016. Its README explains the core trick: amend the commit message by appending harmless whitespace, retrying messages until Git computes a hash with the requested prefix. The current implementation is Rust-based and can use OpenCL for GPU-accelerated searching, while older branches preserve earlier Node.js, C, and pure-Rust implementations.

### Adoption history

The tool spread as a programmer curiosity rather than infrastructure. Official installation notes mention Cargo, Arch Linux, Funtoo, and Homebrew packaging, and the repository has roughly two thousand GitHub stars, which is notable for a deliberately niche Git-hash novelty.

### How it is used

Users run `lucky_commit` after creating a commit; the command amends the commit until the short hash matches a prefix such as `0000000` or a user-supplied pattern with wildcard placeholders. The README also documents benchmarking and behavior for GPG-signed commits and Git SHA-256 repositories.

### Why package nerds care

For package and Git nerds, lucky-commit is a compact demonstration that commit IDs are content-addressed objects but still manipulable by changing semantically inert data. Its Homebrew formula gives macOS users an easy way to install a tool that is mostly useful for demos, badges, jokes, and understanding Git object hashing.

### Timeline

- 2016: Public GitHub repository created.
- 2016 onward: Cargo installation documented as the primary upstream installation path.
- Later releases: Rust/OpenCL implementation became the maintained branch, with older Node.js, C, and pure-Rust branches kept as historical alternatives.
- Current packaging: Official README documents availability through Arch Linux, Funtoo, and Homebrew.

### Related projects

- The README points to `every-git-commit-shorthash` as a related project.
- The project depends conceptually on Git object hashing and, for acceleration, OpenCL-capable hardware.

### Sources

- <https://api.github.com/repos/not-an-aardvark/lucky-commit>
- <https://formulae.brew.sh/formula/lucky-commit>
- <https://github.com/not-an-aardvark/lucky-commit>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lucky-commit
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - lucky-commit: normalized package name match | nixpkgs package indexes: pkgs/by-name/lu/lucky-commit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - lucky-commit - 2.2.5-1: normalized package name match | Arch Linux sync databases: lucky-commit from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Customize your git commit hashes | https://github.com/not-an-aardvark/lucky-commit
- MacPorts - lucky-commit: normalized package name match | MacPorts ports tree: devel/lucky-commit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [commitizen](https://www.automicvault.com/pkg/brew/commitizen/) - Shares av.db curated category or tags: cli, commits, developer-tools, git, version-control.
- [git-quick-stats](https://www.automicvault.com/pkg/brew/git-quick-stats/) - Shares av.db curated category or tags: cli, commits, developer-tools, git, version-control.
- [gitnr](https://www.automicvault.com/pkg/brew/gitnr/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [gource](https://www.automicvault.com/pkg/brew/gource/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [grokmirror](https://www.automicvault.com/pkg/brew/grokmirror/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [karn](https://www.automicvault.com/pkg/brew/karn/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [ugit](https://www.automicvault.com/pkg/brew/ugit/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools, git, version-control.
- [aicommit](https://www.automicvault.com/pkg/brew/aicommit/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [aicommits](https://www.automicvault.com/pkg/brew/aicommits/) - Local package facts share a topical domain. Shared terms: cli, commit, control, developer, developer-tools.
- [dura](https://www.automicvault.com/pkg/brew/dura/) - Local package facts share a topical domain. Shared terms: cli, commits, control, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/lucky-commit.yml](https://github.com/automic-vault/db/blob/main/combined/lucky-commit.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
