UniqueNameGenerator 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package UniqueNameGenerator --version 1.0.0
                    
NuGet\Install-Package UniqueNameGenerator -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UniqueNameGenerator" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UniqueNameGenerator" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="UniqueNameGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UniqueNameGenerator --version 1.0.0
                    
#r "nuget: UniqueNameGenerator, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UniqueNameGenerator@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UniqueNameGenerator&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=UniqueNameGenerator&version=1.0.0
                    
Install as a Cake Tool

<h1 align="center">UniqueNameGenerator</h1> <div align="center"> <img src="PackageIcon.png" alt="UniqueNameGenerator"/> </div> <h4 align="center"><br>Unique name generator is a package for generating random and unique names.<br></h4> <div align="center">

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image GitHub Repo stars GitHub contributors GitHub last commit GitHub commit activity open issues Static Badge PRs Welcome alternate text is missing from this package README image

<a href="#about">About</a> • <a href="#usage">Usage</a> • <a href="#download">Download</a> • <a href="#building">Building</a> • <a href="#contributing">Contributing</a> • <a href="#versioning">Versioning</a> • <a href="#credits">Credits</a> • <a href="#license">License</a> </div>

About

Unique name generator is a package for generating random and unique names.

It comes with a list of dictionaries out of the box, but you can also provide your custom ones.

It was heavily inspired by the equivalent npm package by Andrea Sonny

Usage

// Basic usage with built-in lists
new UniqueName(
    Colors.WordList, // A list of more than 50 different colors
    Adjectives.WordList, // A list of more than 1,200 different adjectives
    Animals.WordList, // A list of more than 350 different animals
    Names.WordList // A list of more than 4,900 different names
).Generate(); // e.g. "turquoise_critical_hornet_micky"
// Deterministic output using numeric seed
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Seed(120498).Generate(); // "turquoise_critical_hornet"
// Deterministic output using string seed
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Seed("seed as a string"); // "tan_sour_ermine"
// Custom separator
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Separator("|SPACE|").Generate(); // e.g. "blue|SPACE|kind|SPACE|tiger"
// Blank separator
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Separator(""); // e.g. "bluekindtiger"
// Formatting styles
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Format(Style.LowerCase).Generate(); // "turquoise_critical_hornet"

new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Format(Style.UpperCase).Generate(); // "TURQUOISE_CRITICAL_HORNET"

new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
).Format(Style.TitleCase).Generate(); // "Turquoise_Critical_Hornet"
// Custom formatter
var customFormat = new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList
)
.Format(word => Regex.Replace(word, "e", "!")) .Generate(); // "turquois!_critical_horn!t"
// Numeric word list
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList,
    Numeric.WordList
).Generate(); // "brown_classic_kiwi_771"
// Numeric with custom range and formatting
new UniqueName(
    Colors.WordList,
    Adjectives.WordList,
    Animals.WordList,
    Numeric.WordList.Min(1).Max(9).Format(n => n.ToString("D2")
).Generate(); // "brown_classic_kiwi_07"

Download

This library is available as a NuGet package on https://nuget.org. To install it, use the following command-line:

dotnet add package UniqueNameGenerator

Building

To build this repository locally, you need the following:

  • The .NET SDKs for 9.0.
  • Visual Studio, JetBrains Rider or Visual Studio Code with the C# DevKit

You can also build, run the unit tests and package the code using the following command-line:

build.cmd or build.sh

Also try using --list-targets to see all the available options.

Contributing

Your contributions are always welcome! Please have a look at the contribution guidelines first.

Previous contributors include:

<a href="https://github.com/michael-wolfenden/UniqueNameGenerator/graphs/contributors"> <img src="https://contrib.rocks/image?repo=michael-wolfenden/UniqueNameGenerator" alt="contrib.rocks image" /> </a>

(Made with contrib.rocks)

Versioning

This library uses Semantic Versioning to give meaning to the version numbers. For the versions available, see the tags on this repository.

Credits

This library wouldn't have been possible without a number of tools and packages - see the THIRD-PARTY-LICENSES.txt file for details.

<a href="https://www.flaticon.com/free-icon/text-generator_10328754" title="icons">Icons created by Freepik - Flaticon</a>

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 105 9/21/2025
1.0.0 112 9/21/2025