bin+lib nanoid_cli

Nanoid CLI

1 stable release

1.0.0 Sep 11, 2023

Unlicense

13KB
177 lines

Nanoid CLI

coverage Crates.io Docs.rs

This is a command line for the Rust crate nanoid, a tiny, secure, URL-friendly, unique string ID generator. Nanoid has been ported to over 20 languages. This project provides command line interface to the library so you can manually generate strings. It provides the following options:

  • Set the length of the ID
  • Generate multiple ID's at once, one per line
  • Use a variety of pre-defined alphabets:
    • Decimal using the digits 0 to 9
    • Hexadecimal using the digis 0 to 9 and A to F
    • Alpha Numeric using the characters 0 to 9 and A to Z
    • Full Alpha Numeric using the characters 0 to 9, A to Z and a to z.
    • Secure URL the default, URL safe alphabet

Install it with cargo install nanoid_cli. Use nanoid --help to see the full list of options.

The tool uses the clap crate for command line processing.

Pull requests welcomed for additional features, such a customizable alphabets.

Dependencies

~1.5–2.1MB
~39K SLoC