cuid2gen-0.1.3 is not a library.
cuid2gen
A fast and secure command-line tool for generating CUID2 identifiers - Collision-resistant Unique IDs.
Features
- Generate one or multiple CUID2 identifiers
- Multiple output formats (newline-separated, comma-separated, JSON array)
- Fast and memory efficient
- Zero configuration required
- Cross-platform support
Installation
Using Cargo
Using Homebrew‰
Using Nix
Usage
Generate a single CUID2:
Generate multiple CUIDs:
Generate as JSON array:
Generate comma-separated values:
Options
USAGE:
cuid2gen [OPTIONS]
OPTIONS:
-c, --count <COUNT> Number of IDs to generate [default: 1]
-l, --length <LENGTH> Length of each ID (not supported in current version)
-f, --format <FORMAT> Output format: line (default), csv, json
-q, --quiet Only output errors
-h, --help Print help
-V, --version Print version
Why CUID2?
CUID2s are designed to be:
- Secure: resistant to prediction and scanning attacks
- Collision-resistant: extremely low probability of duplicates
- Horizontally scalable: safe for distributed systems
- URL-safe and ASCII-safe
- Sorted by time of creation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Development Setup
# Clone the repository
# Build
# Run tests
# Run formatter
# Run linter
License
This project is licensed under the MIT License - see the LICENSE file for details.