Skip to content

t0xk/jusernamegenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JUsernameGenerator

JUsernameGenerator is a flexible, object-oriented username generation library and CLI tool for Java.
It provides a modular architecture for generating usernames programmatically or via command-line, designed for extensibility and clean code.

Features

  • Object-oriented design with modular generator components
  • Extensible architecture with custom component support
  • Pattern-based username generation (e.g., {prefix:usr}_{word}_{num:3})
  • Builder API for programmatic composition
  • Command-line interface (CLI)
  • Future support for graphical user interface (GUI)

Project Structure

com.t0xk.jusernamegenerator
├── api/                 # Public builders and factories
├── config/              # Configuration and defaults
├── core/                # Core generation logic
│   ├── generator/
│   │   ├── component/                   # Interfaces and base contracts
│   │   └── component/implementations/   # Concrete component implementations
│   └── parser/                          # Syntax parsing logic
├── exception/           # Custom exceptions
├── ui/                  # User interfaces (CLI, GUI)
│   ├── cli/
│   └── gui/
└── Main.java            # Entry point

Installation

Requirements

  • Java 17+
  • Maven 3.8+ or IntelliJ IDEA with Maven support

Clone the repository

git clone https://github.com/t0xk/jusernamegenerator.git
cd jusernamegenerator

Build the project

mvn clean package

This produces an executable JAR file at:

target/JUsernameGenerator-1.0.0.jar

Usage

Command-Line Example

java -jar target/JUsernameGenerator-1.0.0.jar --pattern "{prefix:dev}_{word}_{num:3}" --count 10

Example output:

dev_silentwave_937
dev_bravefox_128
dev_cleverhawk_502

Common CLI arguments:

Argument Description Example
--pattern Defines the username pattern {prefix:usr}_{word}_{num:3}
--seed Sets a random seed for reproducible output --seed 42
--count Defines how many usernames should be generated --count 10

Programmatic Example

import com.t0xk.jusernamegenerator.api.builder.UsernameBuilder;
import com.t0xk.jusernamegenerator.config.GeneratorConfig;

public class Example {
    public static void main(String[] args) {
        GeneratorConfig config = new GeneratorConfig.Builder().build();

        String username = new UsernameBuilder(config)
                .prefix("usr")
                .literal("_")
                .word(5)
                .literal("_")
                .number(3)
                .build();

        System.out.println(username); // usr_alpha_372
    }
}

License

To be determined

About

Flexible, object-oriented username generation library and CLI tool for Java

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages