Skip to content

command-line utility for generating collision resistant ids

License

Notifications You must be signed in to change notification settings

visus-io/cuidgen

Repository files navigation

cuidgen

GitHub Workflow Status Sonar Quality Gate

Nuget Downloads GitHub

A command-line utility based on cuid.net for generating collision-resistant ids. You can read more about CUIDs from the official project website.


Installation

dotnet tool install --global cuidgen.tool

If you prefer, cuidgen is also available as a portable binary for Windows, Mac and Linux for download from the Releases page.

Example Usage

cuidgen is designed to be as simple as possible and is perfect for usage in scripting.

# generate a CUIDv2 value with a length of 10
$ cuidgen -l:10
fd59iobs0p

📝 cuidgen by default will generate CUIDv2 values

Command Arguments

Argument Description Default Value Accepted Values
-l:<length> Desired length of the CUID value (only applies to CUIDv2) 24 4-32
-g:<version> Generation of the CUID to generate 2 1 or 2