Proquint generates and decodes human-recognisable identifiers: short five-letter words ("proquints") that represent arbitrary-size integers.
Details at the Proposal for Proquints.
Why use proquints?
- They are easier to read, say, and remember than long numeric or hex strings.
- They provide a compact, hyphen-separated representation for big integers.
For humans, the difference between gipur-saluf and lukab-kodun is generally easier to perceive than the difference between 36bbc1f2 and 7d806879.
Build from source:
go build ./cmd/proquintInstall the CLI (recommended):
go install github.com/iilei/proquint/cmd/proquint@latestHomebrew via tap:
brew install iilei/tap/proquintRun the test suite:
go test ./...Basic CLI usage:
- Encode a decimal or 0x-prefixed hex bigint to a proquint:
proquint encode <number>- Decode a proquint back to a decimal bigint:
proquint decode <proquint>--pad-groups=N(encode): left-pad the output withNgroups ofbabab(zero) so the result has at leastNgroups.
Examples (these match the test-suite expectations):
proquint encode 42->babopproquint encode --pad-groups=2 42->babab-babopproquint decode babop->42- Large values are supported; the tests verify 256-bit max values round-trip.
proquint accepts 0x-prefixed hexadecimal numbers. Here is an example of how to encode a File SHA256 checksum:
SHA=$(sha256sum LICENSE --tag | awk -F' ' '{print $NF}')
proquint encode 0x$SHA
# gipur-saluf-juvuf-gisid-mokar-mivub-lavil-hajah-rufup-pokah-miroh-bomik-doduj-silob-zopit-pohonThis illustrates a usage scenario for quick integrity checks. A small change such as echo '.' >> LICENSE is often easier to spot when comparing proquints than when comparing raw hexadecimal digests.
This functionality remains out-of-scope in favor of a more strict isolation of concerns.
Instead, IP-to-Decimal conversion needs to be done before invocing proquint encode. Implementation example:
IP="192.168.1.1"
proquint encode $(echo $IP | awk -F. '{print ($1 * 2^24) + ($2 * 2^16) + ($3 * 2^8) + $4}')
# safom-bahad- The CLI entrypoint is cmd/proquint/main.go.
- The encoding/decoding implementation lives in pkg/cli/proquint.go.
To run the binary built locally:
./proquint encode 12345Contributions welcome — open an issue or submit a PR. Please include tests for new behavior.
This project is licensed under the terms in the LICENSE file.