Release v0.1.2 (What’s new?).
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¶
Make sure you have Alfred 5+ installed with the Power Pack.
Go to Releases and download the latest
.alfredworkflowfile.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 |
|---|---|---|
|
|
MD5 hex digest (32 chars) |
|
|
SHA-256 hex digest (64 chars) |
|
|
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 functionmain(query, hash_algo)→ScriptFilter, no Alfred dependency, fully unit-testable.afwf_md5/cli.py—Commandclass wired tofire.Fire; each method callshashes.main()and sends feedback to Alfred.