-
Notifications
You must be signed in to change notification settings - Fork 3
CLI
Generate remixable, segment-based IDs straight from your terminal. Whether you're tagging builds, creating user handles, or just vibing with entropy, UCID gives you full control over the character set, format, and flair.
To get started instantly, run UCID via npx:
npx unique-custom-idIf you've already installed the package locally, you can wire it into your project scripts:
"scripts": {
"ucid": "ucid"
}Then generate IDs with:
npm run ucidUCID exposes a rich set of flags to customize your ID generation flow. Here's a breakdown of what each option does:
| Flag | Description | Default |
|---|---|---|
--uppercase |
Include uppercase letters (AβZ) in the ID |
false |
--lowercase |
Include lowercase letters (aβz) in the ID |
false |
--numbers |
Include numeric characters (0β9) |
true |
--no-numbers |
Disable numeric characters | - |
--symbols |
Include symbols (e.g. !@#$%) |
false |
--octets |
Number of ID segments to generate | 4 |
--octetLength |
Length of each segment | 8 |
--instances |
Number of IDs to generate in one run | 1 |
--octetSeparator |
Character used to separate segments (e.g. -, _, :) |
'-' |
--octetFormat |
Custom format string for octet lengths | '' |
--format |
Use a predefined format that sets multiple options at once | null |
--includeOnly |
Use only the characters you specify (overrides other charset flags) | null |
--timestamp |
Include a timestamp (prefix or suffix) |
null |
--timestampFormat |
Define the format of the timestamp (e.g. YYYYMMDD-HHmmss) |
null |
--prefix |
Add a custom string before the generated ID | '' |
--suffix |
Add a custom string after the generated ID | '' |
--template |
Use a custom template with %id placeholders |
null |
--verbose |
Return the full options object including the generated ID | false |
--help |
Display help message with usage examples | - |
Generate a timestamped ID:
npx unique-custom-id --no-numbers --timestamp=suffix --timestampFormat=unixGenerate UUID:
npx unique-custom-id --format=uuidπ unique-custom-id β most customizable ID generator you'll ever meet
π See our contributing guide for guidelines on how to contribute
π¬ Join the conversation on discussions
πͺͺ Licensed under MIT β free to fork, remix, and build upon
π Maintained by @calebephrem β contributions welcome!
β¨ Fork it. Tweak it. Make it yours.
- π Home
- π οΈ Usage
- π οΈ How To Use UCID
- π¦ Installation
- β Importing
- π Generate Simple ID
- π§© Configuration Options
- π§° Predefined Formats
- ποΈ Predefined Formats
- π§ Format Aliases
- π Format List
- π§ͺ Usage Examples
- β Remember
- 𧬠CLI
- π UCID CLI
- π Quick Start
- π CLI Options
- π§ͺ Examples
- πͺ£ Entropy Space