vm2.UlidTool
1.0.9
See the version list below for details.
dotnet tool install --global vm2.UlidTool --version 1.0.9
dotnet new tool-manifest
dotnet tool install --local vm2.UlidTool --version 1.0.9
#tool dotnet:?package=vm2.UlidTool&version=1.0.9
nuke :add-package vm2.UlidTool --version 1.0.9
UlidTool - ULID Generator Command Line Tool
- Installation
- Quick Start
- What is a ULID?
- Command Line Options
- Output Formats
- Examples
- Related Packages
- License
A CLI tool for generating ULIDs (Universally Unique Lexicographically Sortable Identifiers). The tool is based on the
vm2.Ulid library and provides various output formats and
options for generating ULIDs from the command line.
Installation
dotnet tool install -g vm2.UlidTool
Quick Start
# Generate a single ULID
ulid
# Generate multiple (5) ULIDs
ulid -n 5
# Generate 3 ULIDs in GUID-like format
ulid -n 3 -f guid
# Generate a single ULID with detailed information
ulid -f detailed
What is a ULID?
ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier that combines:
- 48-bit timestamp (millisecond precision)
- 80-bit randomness
Benefits over traditional GUIDs/UUIDs:
- ✅ Lexicographically sortable by creation time
- ✅ Compact - 26 characters vs 36 for GUIDs
- ✅ URL-safe - Uses Crockford's Base32 encoding
- ✅ Monotonic - Within the same millisecond, values increment
- ✅ Compatible - Can be converted to/from GUID
Command Line Options
ulid [options]
Options:
-n, --number <number> Number of ULIDs to generate (1-10000) [default: 1]
-f, --format <format> Output format [default: ulid]
-h, --help Show help information
--version Show version information
Output Formats
ULID (default)
26-character Crockford's Base32 string, lexicographically sortable:
ulid # 01K5ETWXTDG0ZK9PP9WMC6V4HYGUID-like
36-character hexadecimal GUID-like format:
ulid -f guid # 01934b8e-c6d9-7f40-9a99-f1c66d8c568eDetailed
Multi-line display showing the two main string formats and the two components - timestamp and random bytes:
ulid -f detailed # ULID: 01K5ETWXTDG0ZK9PP9WMC6V4HY # GUID: 01934b8e-c6d9-7f40-9a99-f1c66d8c568e # Timestamp: 01K5ETWXTD 2024-01-15T10:30:45.123+00:00 (1705315845123) # Random Bytes: G0ZK9PP9WMC6V4HY [ 0x7F, 0x40, 0x9A, 0x99, 0xF1, 0xC6, 0x6D, 0x8C, 0x56, 0x8E ]
Format Abbreviation
The --format option accepts any unique prefix (case-insensitive):
u,ul,uli,ulid→ ULID formatg,gu,gui,guid→ GUID formatd,de,det, ...detailed→ Detailed format
Examples
Generate test data
# Generate 100 ULIDs for database seeding ulid -n 100 > test-ids.txtCreate GUID-compatible IDs
# Generate ULIDs in GUID format for legacy systems ulid -n 10 -f gInspect ULID structure
# Examine the components of a ULID ulid -f d
Related Packages
- vm2.Ulid - ULID library for .NET applications
- ULID Specification - Official ULID spec
License
MIT - See LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-preview.1 | 36 | 2/23/2026 |
| 1.0.10-preview.1 | 31 | 2/23/2026 |
| 1.0.9 | 83 | 2/16/2026 |
| 1.0.8 | 83 | 2/16/2026 |
| 1.0.8-preview.7 | 39 | 2/16/2026 |
1.1.1