← 返回
未分类 中文

Uuid Tool

Generate universally unique identifiers (UUIDs) in versions v1, v4, v5, v7, and nil format, with bulk generation and namespace-based deterministic IDs.
生成通用唯一标识符(UUID),支持 v1、v4、v5、v7 和 nil 格式,提供批量生成及基于命名空间的可确定性 ID。
dinghaibin dinghaibin 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 268
下载
💾 0
安装
1
版本
#latest

概述

UUID Tool — Universal Unique Identifier Generator

Generate, parse, and inspect UUIDs across multiple standards. Supports time-based (v1, v7), random (v4), and namespace-based (v5) UUIDs for distributed systems, database keys, and idempotency tokens.

Quick Start

# Generate a random UUID (v4)
uuid-tool --generate v4

# Generate a time-ordered UUID (v7, good for DB indexing)
uuid-tool --generate v7

# Generate 10 UUIDs at once
uuid-tool --generate v4 --count 10

Usage

uuid-tool [COMMAND] [OPTIONS]

Commands:
  --generate VERSION   Generate UUIDs (v1, v4, v5, v7)
  --parse UUID         Parse and inspect a UUID string
  --nil                Generate the nil UUID (00000000-...)
  --from-name TEXT     Deterministic UUID v5 from namespace + name

Options:
  --count N            Number of UUIDs to generate (default: 1)
  --namespace NS       Namespace for v5: "dns", "url", "oid", "x500", or custom
  --upper              Output uppercase hex
  --no-hyphens         Remove dashes from output
  --json               Output as JSON array

Examples

# Time-based UUID v1
uuid-tool --generate v1

# Time-ordered UUID v7 (good for DB primary keys)
uuid-tool --generate v7

# Deterministic UUID from a domain name
uuid-tool --from-name "example.com" --namespace dns

# Parse and inspect
uuid-tool --parse "550e8400-e29b-41d4-a716-446655440000"

# Batch generate 100 UUIDs in compact format
uuid-tool --generate v4 --count 100 --no-hyphens

Features

  • 4 UUID versions: v1 (time), v4 (random), v5 (SHA-1 namespace), v7 (time-ordered)
  • Bulk generation: Up to 1000 UUIDs in one call
  • Deterministic v5: Same namespace + name → same UUID every time
  • Parse & decode: Extract timestamp, version, variant from any UUID
  • Compact mode: Remove dashes for space-constrained usage
  • JSON output: Easy integration with scripts and APIs
  • Nil UUID: Generate or validate against the all-zero nil UUID

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-11 04:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Datetime Tool

dinghaibin
全面的日期时间操作工具包,支持多种格式、时区转换、日历计算、自然语言解析以及日期...
★ 0 📥 437

Unexpand Tool

dinghaibin
将文本文件中的空格转为制表符,保持统一缩进并减小文件大小。
★ 0 📥 408

Xxd Tool

dinghaibin
创建二进制文件的十六进制转储,将转储恢复为二进制,并进行位级分析与修补。适用于逆向工程、二进制分析等关键任务。
★ 0 📥 394