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
                    
if you are setting up this repo
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
                    
nuke :add-package cuidgen.tool --version 5.0.0
                    

cuidgen

GitHub Workflow Status Sonar Quality Gate Sonar Coverage

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

.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 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.

Version Downloads Last Updated
5.0.0 179 12/26/2025
4.0.0 316 6/6/2024
3.0.1 619 11/17/2023