npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@uniku/cli

v0.0.12

Published

CLI tool for generating and validating unique identifiers

Readme

@uniku/cli

npm version License: MIT

Command-line tool for generating, validating, and inspecting unique identifiers.

Supports UUID v4/v7, ULID, CUID2, Nanoid, and KSUID.

Installation

# pnpm (recommended)
pnpm add -g @uniku/cli

# npm
npm install -g @uniku/cli

# bun
bun add -g @uniku/cli

Usage

Generate IDs

# UUID v4 (default)
uniku uuid
# => 550e8400-e29b-41d4-a716-446655440000

# UUID v7 (time-ordered)
uniku uuid --version 7
# => 018e5e5c-7c8a-7000-8000-000000000000

# Generate multiple IDs
uniku uuid --count 5

# ULID
uniku ulid
# => 01HW9T2W9W9YJ3JZ1H4P4M2T8Q

# Monotonically increasing ULIDs
uniku ulid --monotonic --count 3

# Nanoid (custom size and alphabet)
uniku nanoid --size 12 --alphabet hex

# CUID2 (custom length)
uniku cuid --length 16

# KSUID
uniku ksuid

# Output as JSON
uniku uuid --count 3 --json

All generate commands also work under uniku generate <type> (e.g., uniku generate uuid).

Validate IDs

# Validate a single ID (type auto-detected)
uniku validate 018e5e5c-7c8a-7000-8000-000000000000

# Validate with explicit type
uniku validate --type ulid 01HW9T2W9W9YJ3JZ1H4P4M2T8Q

# Batch validate from stdin
echo -e "018e5e5c-7c8a-7000-8000-000000000000\ninvalid-id" | uniku validate --stdin

# Quiet mode (exit code only: 0 = valid, 2 = invalid)
uniku validate --quiet 018e5e5c-7c8a-7000-8000-000000000000

# JSON output
uniku validate --json 018e5e5c-7c8a-7000-8000-000000000000

Inspect IDs

# Decode metadata from an ID (type auto-detected)
uniku inspect 018e5e5c-7c8a-7000-8000-000000000000

# Inspect with explicit type
uniku inspect --type ulid 01HW9T2W9W9YJ3JZ1H4P4M2T8Q

# JSON output
uniku inspect --json 018e5e5c-7c8a-7000-8000-000000000000

For time-ordered IDs (UUID v7, ULID, KSUID), inspect extracts the embedded timestamp. For random-only IDs (UUID v4, CUID2, Nanoid), it reports that no decodable metadata is available.

Commands Reference

| Command | Description | |---------|-------------| | uniku uuid | Generate UUIDs (v4 or v7) | | uniku ulid | Generate ULIDs | | uniku nanoid | Generate Nanoids | | uniku cuid | Generate CUIDs (v2) | | uniku ksuid | Generate KSUIDs | | uniku validate <id> | Check if an ID is valid | | uniku inspect <id> | Decode and inspect an ID |

Common Options

| Option | Alias | Description | |--------|-------|-------------| | --count | -n | Number of IDs to generate (default: 1) | | --json | | Output as JSON | | --help | | Show help | | --version | -V | Show version |

Generator-Specific Options

| Command | Option | Alias | Description | |---------|--------|-------|-------------| | uuid | --version | -v | UUID version: 4 or 7 (default: 4) | | uuid | --lowercase | -l | Output in lowercase | | ulid | --monotonic | | Generate monotonically increasing ULIDs | | ulid | --timestamp | | Unix timestamp in ms or "now" | | ulid | --lowercase | -l | Output in lowercase | | nanoid | --size | -s | Length of ID, 1-256 (default: 21) | | nanoid | --alphabet | -a | Custom alphabet or preset: hex, numeric, alpha | | cuid | --length | -l | Length of ID, 2-32 (default: 24) | | ksuid | --timestamp | | Unix timestamp in seconds or "now" |

Validate Options

| Option | Description | |--------|-------------| | --type | Expected ID type: uuid, ulid, nanoid, cuid, ksuid (auto-detected if omitted) | | --stdin | Read IDs from stdin (one per line) | | --quiet | No output, exit code only (0 = valid, 2 = invalid) | | --json | Output as JSON |

Inspect Options

| Option | Description | |--------|-------------| | --type | ID type: uuid, ulid, nanoid, cuid, ksuid (auto-detected if omitted) | | --json | Output as JSON |

Tech Stack

License

MIT — see LICENSE