cuidgen.tool
5.0.0
dotnet tool install --global cuidgen.tool --version 5.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local cuidgen.tool --version 5.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=cuidgen.tool&version=5.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package cuidgen.tool --version 5.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
cuidgen
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
.NET Tool
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.
Usage
cuidgen is designed to be as simple as possible and is perfect for usage in scripting.
cuidgen by default generates CUIDv2 values with a length of 24 characters.
Examples
# Generate a default CUIDv2 (length 24)
$ cuidgen
ukzsdmvhjyhwb9mkguvwegbv
# Generate a CUIDv2 with a custom length
$ cuidgen -l 10
qrlkdu9vri
# Generate a CUIDv1
$ cuidgen -g 1
cmjmvcts200016437xe4i0jfu
# Generate multiple CUIDs at once
$ cuidgen -n 5
z1dimahkx6si6mzfumzz4lpr
vy0467zugnmo87kjdpao4r8d
qh410ftu8mb21iw8aqp5l600
czlgawafm116s2n4eyaqp8r3
g13maok93mbgdqruv7mr3djl
Command Arguments
| Argument | Description | Default | Valid Range |
|---|---|---|---|
-g, --generation |
Generation of CUID to generate (1 or 2) | 2 | 1-2 |
-l, --length |
Desired length of the CUID (only applies to CUIDv2) | 24 | 4-32 |
-n, --number |
Number of CUIDs to generate | 1 | 1-1000 |
-v, --version |
Display version information | - | - |
-h, --help |
Display help information | - | - |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.