Skip to main content

Alfred Workflow to generate random md5, sha256, sha512 hash and calculate file hashes.

Project description

https://github.com/MacHu-GWU/afwf_md5-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/afwf_md5-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/afwf-md5.svg https://img.shields.io/pypi/l/afwf-md5.svg https://img.shields.io/pypi/pyversions/afwf-md5.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

afwf_md5 — MD5 / SHA-256 / SHA-512 Alfred Workflow

An Alfred Workflow that computes MD5, SHA-256, and SHA-512 checksums of local files directly from Alfred. No terminal needed — type a path, get a hash, copy it with ⌘C.

When the query is empty, the workflow generates 10 random hashes so you can use it as a secure random string generator.

Install

  1. Make sure you have Alfred 5+ installed with the Power Pack.

  2. Go to Releases and download the latest .alfredworkflow file.

  3. Double-click the file to install.

Usage

Compute MD5

Type md5 followed by an absolute file path:

md5 /path/to/file.zip
  • File found — returns the MD5 hex digest. Press ⌘C to copy.

  • Empty query — generates 10 random MD5 hashes (useful as secure random strings).

  • Directory — shows an error item (directories are not supported).

  • Path not found — shows an error item.

Compute SHA-256

Type sha256 followed by a path:

sha256 /path/to/file.zip

Compute SHA-512

Type sha512 followed by a path:

sha512 /path/to/file.zip

CLI Reference

The workflow is backed by a Python CLI (afwf-md5) with one subcommand per algorithm. Alfred’s Script Filter calls these directly.

Subcommand

Alfred keyword

Output

afwf-md5 md5 --query '{query}'

md5

MD5 hex digest (32 chars)

afwf-md5 sha256 --query '{query}'

sha256

SHA-256 hex digest (64 chars)

afwf-md5 sha512 --query '{query}'

sha512

SHA-512 hex digest (128 chars)

Dev Script field (local .venv):

.venv/bin/afwf-md5 md5 --query '{query}'

Production Script field (via uvx, no virtualenv needed):

~/.local/bin/uvx --from afwf_md5==0.1.1 afwf-md5 md5 --query '{query}'

Error Log

Runtime errors are written to:

~/.alfred-afwf/afwf_md5/error.log

If a Script Filter returns an error item, pressing Enter opens the log file directly.

Development

# Install dependencies
mise run inst

# Run tests with coverage
mise run cov

The core logic lives in two files:

  • afwf_md5/hashes.py — pure function main(query, hash_algo)ScriptFilter, no Alfred dependency, fully unit-testable.

  • afwf_md5/cli.pyCommand class wired to fire.Fire; each method calls hashes.main() and sends feedback to Alfred.

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

afwf_md5-0.1.2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

afwf_md5-0.1.2-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file afwf_md5-0.1.2.tar.gz.

File metadata

  • Download URL: afwf_md5-0.1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for afwf_md5-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2db828d6b97d0693b4d20bed1a7102266f548ce298aa8281942aebeb56d15454
MD5 ab5a7cedae1d594834e8d26fc7fa89a9
BLAKE2b-256 51f075c55f52fd32ad1242611faf54c4296f5ebc572949dbad19a2ce93699152

See more details on using hashes here.

File details

Details for the file afwf_md5-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: afwf_md5-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for afwf_md5-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11437df2f7e7263d8e8acd9c0641f866c027d16f9d18d27a7109cebca143ec85
MD5 3b19c654e2a87825df89eeed504492e0
BLAKE2b-256 90e54d3a7cdfb23fbd9d59d56b0491cb388c41c6d25e79fc1d00d499b54a9df0

See more details on using hashes here.

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