@kszongic/hex-encode-cli
v1.0.0
Published
Encode and decode hex strings from the command line
Maintainers
Readme
hex-encode-cli
Encode text to hexadecimal and decode hex back to text. Zero dependencies.
Install
npm install -g @kszongic/hex-encode-cliUsage
# Encode text to hex
hex-encode "hello world"
# 68656c6c6f20776f726c64
# Decode hex to text
hex-encode -d 68656c6c6f20776f726c64
# hello world
# Uppercase output
hex-encode -u "hello"
# 48454C4C4F
# Custom separator
hex-encode -s : "hello"
# 68:65:6c:6c:6f
# Pipe from stdin
echo "hello" | hex-encode
# Decode with separators (auto-stripped)
hex-encode -d "68:65:6c:6c:6f"
# helloOptions
| Flag | Description |
|------|-------------|
| -d, --decode | Decode hex string to text |
| -u, --upper | Uppercase hex output |
| -s, --sep CHAR | Separator between hex bytes |
| -h, --help | Show help |
| -v, --version | Show version |
License
MIT © kszongic
