Simple CLI to generate UUIDs v7 using Kotlin/Native.
- Go to one of the existing releases in uuid-cli/releases.
- Copy the asset link of the
.kexe
file. Take uuid-cli/releases/download/v0.0.1/uuid-cli_0.0.1.kexe copied from uuid-cli/releases/tag/v0.0.1 as example. - Run
brew create <copied link>
. - Edit the generated file. Take docs/uuid-cli.rb as an example.
- Run
brew install --build-from-source <path to the formula on your machine>
. - Run
uuid
and enjoy.
Feature | Command | Output |
---|---|---|
Generate random UUID v7 | uuid |
019123b6-1be1-7bc2-925a-badf472e51c1 |
Generate random UUID v7 based on a timestamp with OffsetDateTime format |
uuid 2024-08-05T18:03:42.945Z |
019123b6-1be1-7bc2-925a-badf472e51c1 |
Generate random UUID v7 based on a timestamp with Instant format |
uuid 1722881022945 |
019123b6-1be1-7bc2-925a-badf472e51c1 |
Decode the timestamp of a UUID v7 | uuid -d 019123b6-1be1-7bc2-925a-badf472e51c1 |
2024-08-05T18:03:42.945Z |
Get help | uuid -h , uuid --help |
Help information |
This implementation follows the RFC 9562.