https://github.com/davidwaterston/cuidgen
A command-line interface to generate collision-resistant ids (CUIDs) optimized for horizontal scaling and performance.
https://github.com/davidwaterston/cuidgen
cli cuid guid id oclif unique unique-id uuid
Last synced: 5 months ago
JSON representation
A command-line interface to generate collision-resistant ids (CUIDs) optimized for horizontal scaling and performance.
- Host: GitHub
- URL: https://github.com/davidwaterston/cuidgen
- Owner: davidwaterston
- License: mit
- Created: 2018-11-12T21:09:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-21T08:01:35.000Z (about 1 year ago)
- Last Synced: 2025-09-26T23:57:11.394Z (9 months ago)
- Topics: cli, cuid, guid, id, oclif, unique, unique-id, uuid
- Language: JavaScript
- Size: 226 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CUIDGEN
[](http://semver.org/)
[](https://github.com/davidwaterston/cuidgen/blob/master/LICENSE)
[](https://npmjs.org/package/cuidgen)
[](https://oclif.io)
A command-line interface to generate collision-resistant ids (CUIDs) optimized for horizontal scaling and performance.
A CUID is a short, random string with some collision-busting measures.
These are safe to use as HTML element id's and for unique, server-side record lookups.
This CLI is built on the work of [Eric Elliott](https://github.com/ericelliott/cuid#readme) and makes use of the CUID package found at https://www.npmjs.com/package/cuid.
## Installation
Install CUIDGEN globally as you would any other NPM package.
```
npm install -g cuidgen
```
## Compatibility
CUIDGEN is built using [oclif](https://oclif.io/). As such, it requires Node 8+.
## Examples
```
$ cuidgen --help
$ cuidgen
cjocr937d00008drr0pfxxtxx
$ cuidgen 3
cjocr937d00008drr0pfxxtxx
cjocr937e00018drrttyzbjg4
cjocr937e00028drrsgq9146m
$ cuidgen 3 --delimiter=,
cjocr937d00008drr0pfxxtxx,
cjocr937e00018drrttyzbjg4,
cjocr937e00028drrsgq9146m
$ cuidgen 3 -d=, --qualifier='"'
"cjocr937d00008drr0pfxxtxx",
"cjocr937e00018drrttyzbjg4",
"cjocr937e00028drrsgq9146m"
$ cuidgen 2 --short
sw0xrlc
sy1xrqb
$ cuidgen 2000 > myfile.txt
```
## Release History
See the [change log](https://github.com/davidwaterston/cuidgen/blob/master/CHANGELOG.md) file for more details.
## License
Copyright (c) 2018 David Waterston. All rights reserved.
Distributed under an MIT license. See the [LICENSE](https://github.com/davidwaterston/cuidgen/blob/master/LICENSE) file for more details.