cuidgen
v1.1.0
Published
A command-line interface to generate collision-resistant ids (CUIDs) optimized for horizontal scaling and performance.
Downloads
1
Maintainers
Readme
CUIDGEN
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 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. 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 file for more details.
License
Copyright (c) 2018 David Waterston. All rights reserved. Distributed under an MIT license. See the LICENSE file for more details.