Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergiocostan26/uuid-cli
A tiny project intended to play with Kotlin Native and UUIDs version 7.
https://github.com/sergiocostan26/uuid-cli
brew cli homebrew kotlin kotlin-native uuid uuid7 uuidv7
Last synced: about 2 months ago
JSON representation
A tiny project intended to play with Kotlin Native and UUIDs version 7.
- Host: GitHub
- URL: https://github.com/sergiocostan26/uuid-cli
- Owner: sergiocostaN26
- License: apache-2.0
- Created: 2024-08-03T14:05:41.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T18:19:16.000Z (6 months ago)
- Last Synced: 2024-10-25T03:44:27.970Z (3 months ago)
- Topics: brew, cli, homebrew, kotlin, kotlin-native, uuid, uuid7, uuidv7
- Language: Kotlin
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UUID CLI
Simple CLI to generate UUIDs v7 using Kotlin/Native.
## Installation
1. Go to one of the existing releases in [uuid-cli/releases](https://github.com/sergiocostaN26/uuid-cli/releases/).
2. Copy the asset link of the `.kexe` file.
Take [uuid-cli/releases/download/v0.0.1/uuid-cli_0.0.1.kexe](https://github.com/sergiocostaN26/uuid-cli/releases/download/v0.0.1/uuid-cli_0.0.1.kexe)
copied from [uuid-cli/releases/tag/v0.0.1](https://github.com/sergiocostaN26/uuid-cli/releases/tag/v0.0.1) as example.
3. Run `brew create `.
4. Edit the generated file. Take [docs/uuid-cli.rb](docs/uuid-cli.rb) as an example.
5. Run `brew install --build-from-source `.
6. Run `uuid` and enjoy.## Usage
| 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 |---
### IETF RFC Standard
This implementation follows the [RFC 9562](https://datatracker.ietf.org/doc/rfc9562/).