Human Readable ID
Human Readable ID (hrid) generates short, human-readable, collision-aware, friendly IDs that are ideal for experiments, jobs, and filenames.
Why human-readable-id?
Traditional IDs (UUIDs, hashes) are:
- hard to read
- hard to remember
- hard to communicate
- unpleasant in logs, filenames, and UIs
human-readable-id produces identifiers like:
gentle_river_42
silent_orbit_a9f3c2d1
They are:
- readable
- easy to communicate
- deterministic when seeded
- configurable for collision safety
Features
- Predicate–object word structure for human readable IDs
- Friendly words only
- Deterministic generation from a seed
- Configurable number of words and suffix length
- Optional hash-based suffixes
- Collision-space analysis (
--collision) - Word trimming for predictable ID length
- Implementations in Bash and Python
- No sudo required, HPC-readable
Installation
Python
You can install human-readable-id via pip (also includes CLI commands):
pip install human-readable-id
Bash (CLI)
The pure Bash version installs the hrid command and wordlists locally (no sudo) and does not require Python:
curl -fsSL "https://raw.githubusercontent.com/Karol-G/human-readable-id/main/bash/install.sh" | bash
This installs:
- Binary:
~/.local/bin/hrid - Wordlists:
~/.local/share/human-readable-id/(copied from the Python package’s canonical lists)
Make sure ~/.local/bin is on your $PATH:
export PATH="$HOME/.local/bin:$PATH"
Usage
CLI (Both Python and Bash)
Generate a human readable ID:
hrid # elastic_jargon_503, medieval_chess_277, nine_crayfish_660
Deterministic ID from a seed:
hrid my_seed # calm_menu_496
Use more words and a hash suffix:
hrid -w 3 -n 8 --hash # various_elegant_museum_2a750add
With a seed, the hash suffix is deterministic; without a seed it is random.
Trim words to enforce predictable length:
hrid -t 4 # clim_figu_144
Analyze collision space instead of generating an ID:
hrid --collision # scalloped_wombat_617
# predicates: 1450
# objects: 3062
# words: 2 (predicates=1, objects=1)
# suffix: digits length 3 (space=10^3)
# combinations_M: 4439900000
# n_for_Ecollision_1: 94233
hrid -n 8 --hash --collision # distinct_sphere_3f9b7140
# predicates: 1450
# objects: 3062
# words: 2 (predicates=1, objects=1)
# suffix: hex hash length 8 (space=16^8)
# combinations_M: ≈ 1,91e16 (< 2^63-1)
# n_for_Ecollision_1: 195290683
Python API
Basic usage:
from human_readable_id import generate_hrid
generate_hrid() # alert_tarn_100
Deterministic generation:
generate_hrid(seed="my_seed") # calm_menu_496
Custom configuration:
generate_hrid(
seed="experiment-001",
words=3,
numbers=8,
use_hash_suffix=True,
trim=4,
) # nerv_oval_batt_c8597bc1
Collision awareness
human-readable-id explicitly exposes the size of its ID space.
Using --collision (or the Python equivalent) reports:
- total number of possible IDs (exact)
- smallest number of generated IDs needed for an expected collision of 1 (exact)
The Python implementation computes these values with integer arithmetic (no rounding); the Bash CLI falls back to approximate formatting for extremely large spaces.
This helps choose safe parameters instead of guessing.
Wordlists
IDs are built from curated wordlists:
- predicates (verbs / adjectives)
- objects (nouns)
Canonical wordlists live in python/src/human_readable_id/words/ and ship with the Python package. The Bash installer copies those same files into ~/.local/share/human-readable-id/ for the CLI. Update the canonical files and rerun the installer (or copy them manually) if you want custom lists.
Contributing
Contributions are welcome! Please open a pull request with clear changes and add tests when appropriate.
Issues
Found a bug or have a request? Open an issue at https://github.com/Karol-G/human-readable-id/issues.
License
Distributed under the MIT license. See LICENSE for details.
Metadata
Release files for human-readable-id 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| human_readable_id-0.0.3.tar.gz | 301.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| human_readable_id-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 325.0 kB
Release files / human_readable_id-0.0.3.tar.gz
| Download URL | human_readable_id-0.0.3.tar.gz |
|---|---|
| Size | 301.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd15167d854fe753b017ecab01ad7ea1ea077655c73c72f0c4eda1a4f738bf02
|
|
BLAKE2b-256 checksum How to use checksums |
d6966dc2be9a19fe1d373be991307d5fa66a79733f5d69b02c8604facef3da84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 8, 2026.
Transparency logRelease files / human_readable_id-0.0.3-py3-none-any.whl
| Download URL | human_readable_id-0.0.3-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbbcd16f318e197e5e7947e01da208cba51f579f915fa81f9e15ce82e63ff73a
|
|
BLAKE2b-256 checksum How to use checksums |
f224d8f13f6749c1b4af3129481c1c2885396fe91084bf265b57b8806b0379d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 8, 2026.
Transparency log