An open API service indexing awesome lists of open source software.

https://github.com/ruslanlap/powertoysrun-randomgen

🎲 RandomGen for PowerToys Run Generate random data instantly with a single keystroke
https://github.com/ruslanlap/powertoysrun-randomgen

csharp datagenerator designtools dotnet fakedata faker plugin powertoys powertoys-run powertoys-run-plugin windows windows-10 windows-11

Last synced: 3 months ago
JSON representation

🎲 RandomGen for PowerToys Run Generate random data instantly with a single keystroke

Awesome Lists containing this project

README

          


RandomGen Logo

🎲 RandomGen for PowerToys Run 🎲


Generate random data instantly with a single keystroke. Cool features like smart PIN generation, secure password creation, and more.




Latest Release


Build Status


Total Downloads


License


Supported Data Types
Windows 10+
.NET 9.0
x64 | ARM64
Automated Builds
Maintenance
C# .NET 9

GitHub stars


GitHub issues

Last Commit
Commit Activity

Tweet

Awesome

Mentioned in Awesome PowerToys Run Plugins



Download x64 Version


Download ARM64 Version


All Releases


## 📊 Download Statistics


Total Downloads
Latest Release Downloads

## 🎥 Demo




Overview of RandomGen commands


Main Demo showing various RandomGen commands





Command: rd password 16


Generate a secure 16-character password


Password Generation Demo


Commands: rd pin 6 and rd color


Generate a 6-digit PIN and random hex color


PIN and Color Generation Demo






Commands: rd address and rd date


Generate a random address and date


Address and Date Generation Demo


Command: rd guid


Generate a random GUID/UUID


GUID Generation Demo






Command: rd name


Generate a random person name


Name Generation Demo


Command: rd number 1-1000


Generate a random number between 1 and 1000


Number Generation Demo


## 📋 Table of Contents

- [✨ Features](#-features)
- [🚀 Quick Start](#-quick-start)
- [🔍 Usage](#-usage)
- [⚙️ Installation](#️-installation)
- [🧩 Requirements](#-requirements)
- [🛠️ Building from Source](#️-building-from-source)
- [🤝 Contributing](#-contributing)
- [📄 License](#-license)
- [🙏 Acknowledgements](#-acknowledgements)
- [💬 Feedback and Support](#-feedback-and-support)
- [❓ FAQ](#-faq)
- [🔒 Security Note](#-security-note)

## ✨ Features

RandomGen is a powerful PowerToys Run plugin that generates various types of random data with a single keystroke. Perfect for developers, testers, and anyone who needs quick access to random data.

### Key Features

- 🔐 **Cryptographically Secure Passwords** - Generate strong passwords with mixed case, numbers, and symbols
- 📍 **Secure PIN Codes** - Create numeric PINs with smart pattern detection to avoid weak PINs like 1234 or 0000
- 👤 **Personal Data** - Generate realistic names, emails, phone numbers, and addresses
- 🏢 **Business Data** - Company names and other business-related information
- 📅 **Date Generation** - Random dates within customizable ranges
- 🔢 **Number Generation** - Random numbers with custom min-max ranges
- 🆔 **Unique Identifiers** - GUIDs/UUIDs for development and testing
- 🎨 **Color Codes** - Random HEX colors for design and testing
- 🌐 **Web Data** - URLs and domains for testing
- 💳 **Payment Testing** - Credit card numbers (fake, for testing only)
- 📝 **Lorem Ipsum** - Placeholder text with customizable word count

### Technical Highlights

- **Plugin ID:** `EFADBA167C1B41D8A7426A7DF808D28E`
- **Action Keyword:** `rd`
- **Thread-Safe Design** - Optimized for performance with thread-local Faker instances
- **Smart Caching** - Improved performance with intelligent result caching
- **Cryptographically Secure** - Uses `System.Security.Cryptography.RandomNumberGenerator` for secure random generation
- **Intelligent Suggestions** - Smart autocomplete for commands
- **Context Menu Support** - Right-click options for copying and regenerating values

## 🚀 Quick Start

1. **Download** the latest release for your architecture ([x64](https://github.com/ruslanlap/PowerToysRun-RandomGen/releases/download/v1.0.2/RandomGen-1.0.2-x64.zip) or [ARM64](https://github.com/ruslanlap/PowerToysRun-RandomGen/releases/download/v1.0.2/RandomGen-1.0.2-arm64.zip))
2. **Extract** the ZIP file to your PowerToys Run plugins directory:
```
%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Plugins\RandomGen\
```
3. **Restart PowerToys**
4. Press `Alt+Space` to open PowerToys Run
5. Type `rd` followed by what you want to generate (e.g., `rd password`)
6. Best practice: Press the Space button to regenerate a new value.

## 📋 Changelog

### v1.0.2 - Enhanced Password Generator Options
![Password Generator Options](assets/demo-password-options.png)
![Password Generator Options2](assets/demo-password-options2.png)
1. **Enhanced Option Syntax Support**
- Now supports multiple ways to specify options:
- Exclusion: `-upper`, `-special`, `-numeric`, `-lower`
- Inclusion: `+upper`, `+special`, `+numeric`, `+lower`
- Natural language: `noupper`, `no-special`, `nonumbers`

2. **Better Error Handling**
- Ensures at least one character type is always enabled
- Handles edge cases where all types are disabled
- Validates password length accommodates required character types

3. **Improved Display**
- Better subtitle showing what's excluded: (16 chars, no upper,special)
- Clearer option descriptions in tooltips

4. **Usage Examples**
- `rd password 16 -special` → 16-char password without symbols
- `rd password 22 -numeric` → 22-char password without numbers
- `rd pwd 12 -upper -special` → 12-char password with only lowercase + numbers
- `rd password 20 noupper` → 20-char password without uppercase letters

## 🔍 Usage

### Basic Commands

Use the activation keyword `rd` followed by the data type you want to generate:

| Command | Example | Description |
|---------|---------|-------------|
| `rd password [length]` | `rd password 16` | Generate a secure password (default: 12 chars) |
| `rd pwd [length]` | `rd pwd 16` | Alias for password command |
| `rd pin [length]` | `rd pin 6` | Generate a numeric PIN (default: 4 digits) |
| `rd email` | `rd email` | Generate a random email address |
| `rd name` | `rd name` | Generate a random full name |
| `rd address` | `rd address` | Generate a random address |
| `rd phone` | `rd phone` | Generate a random phone number |
| `rd company` | `rd company` | Generate a random company name |
| `rd lorem [count]` | `rd lorem 25` | Generate lorem ipsum text (default: 10 words) |
| `rd number [min-max]` | `rd number 1-1000` | Generate a random number (default: 1-100) |
| `rd num [min-max]` | `rd num 1-1000` | Alias for number command |
| `rd date` | `rd date` | Generate a random date |
| `rd guid` | `rd guid` | Generate a random GUID/UUID |
| `rd uuid` | `rd uuid` | Alias for guid command |
| `rd color` | `rd color` | Generate a random hex color |
| `rd url` | `rd url` | Generate a random URL |
| `rd creditcard` | `rd creditcard` | Generate a random credit card number (test use only) |
| `rd credit` | `rd credit` | Alias for creditcard command |

### Supported Locales
Bogus supports many locales. Use `rd locale ` to change the language for generated data. Supported locale codes include:
`af_ZA`, `ar`, `az`, `cz`, `de`, `de_AT`, `de_CH`, `el`, `en`, `en_AU`, `en_AU_ocker`, `en_BORK`, `en_CA`, `en_GB`, `en_IE`, `en_IND`, `en_NG`, `en_US`, `en_ZA`, `es`, `es_MX`, `fa`, `fi`, `fr`, `fr_CA`, `fr_CH`, `ge`, `hr`, `id_ID`, `it`, `ja`, `ko`, `lv`, `nb_NO`, `ne`, `nl`, `nl_BE`, `pl`, `pt_BR`, `pt_PT`, `ro`, `ru`, `sk`, `sv`, `tr`, `uk`, `vi`, `zh_CN`, `zh_TW`, `zu_ZA`.

| `rd locale [code]` | `rd locale fr` | Change data generation locale |

### Examples

```bash
# Generate a 16-character password
rd password 16

# Generate a 6-digit PIN
rd pin 6

# Generate a random email address
rd email

# Generate a random number between 1 and 1000
rd number 1-1000

# Generate 25 words of lorem ipsum text
rd lorem 25

# Change locale to French
rd locale fr (or other `af_ZA`, `ar`, `az`, `cz`, `de`, `de_AT`, `de_CH`, `el`, `en`, `en_AU`, `en_AU_ocker`, `en_BORK`, `en_CA`, `en_GB`, `en_IE`, `en_IND`, `en_NG`, `en_US`, `en_ZA`, `es`, `es_MX`, `fa`, `fi`, `fr`, `fr_CA`, `fr_CH`, `ge`, `hr`, `id_ID`, `it`, `ja`, `ko`, `lv`, `nb_NO`, `ne`, `nl`, `nl_BE`, `pl`, `pt_BR`, `pt_PT`, `ro`, `ru`, `sk`, `sv`, `tr`, `uk`, `vi`, `zh_CN`, `zh_TW`, `zu_ZA` )
```


Locale Selection - Setting locale


Locale Selection - UK locale


Locale Selection - FR locale

## ☕ Support
Enjoying RandomGen? ☕ Buy me a coffee to support development:

[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-☕️-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&labelColor=000000&logoColor=white&labelWidth=100&logoWidth=100)](https://ruslanlap.github.io/ruslanlap_buymeacoffe/)

### Advanced Features

- **Context Menu** - Right-click on any result to:
- Copy to clipboard (Ctrl+C)
- Generate a new value (F5)

- **Smart Autocomplete** - Type part of a command to see suggestions

- **Intelligent Caching** - Recently generated values are cached for improved performance

## ⚙️ Installation

### Prerequisites
- [PowerToys](https://github.com/microsoft/PowerToys) (v0.75 or later)
- Windows 10/11 (x64 or ARM64)
- .NET 9.0 Runtime (included with PowerToys)
- Approximately 2MB of disk space

### Installation Steps

#### Method 1: Using the Release Package
1. Download the latest release for your architecture ([x64](https://github.com/ruslanlap/PowerToysRun-RandomGen/releases/download/v1.0.2/RandomGen-1.0.2-x64.zip) or [ARM64](https://github.com/ruslanlap/PowerToysRun-RandomGen/releases/download/v1.0.2/RandomGen-1.0.2-arm64.zip))
2. Extract the ZIP file to your PowerToys Run plugins directory:
```
%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Plugins\RandomGen\
```
3. Restart PowerToys
4. Enable the plugin in PowerToys Settings → PowerToys Run → Plugin Manager

#### Method 2: Manual Installation from Build
1. Build the project (see [Building from Source](#️-building-from-source))
2. Copy all files from the `RandomGen\Publish\` folder to your PowerToys Run plugins directory:
```
%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Plugins\RandomGen\
```
3. Restart PowerToys
4. Enable the plugin in PowerToys Settings → PowerToys Run → Plugin Manager

### Verifying Installation
After installation, press `Alt+Space` to open PowerToys Run, then type `rd` to see if the plugin is working correctly.

## 🧩 Requirements

- Windows 10/11 (x64 or ARM64)
- PowerToys v0.75 or later
- .NET 9.0 Runtime (included with PowerToys)
- Approximately 2MB of disk space

## 🛠️ Building from Source

### PTRUN Compliance

This plugin is fully compliant with PowerToys Run validation requirements:

- ✅ **PTRUN1301**: Package naming follows the `--.zip` convention
- ✅ **PTRUN1303**: SHA256 checksums are generated for all packages
- ✅ **PTRUN1401**: Plugin version in metadata matches filename version
- ✅ **PTRUN1402**: No unnecessary PowerToys dependencies included

The GitHub Actions workflow automatically ensures compliance with these requirements.

### Prerequisites
- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
- [PowerToys](https://github.com/microsoft/PowerToys) (for testing)
- [Visual Studio 2022](https://visualstudio.microsoft.com/) or [Visual Studio Code](https://code.visualstudio.com/)
- [Git](https://git-scm.com/)

### Build Steps

```bash
# Clone the repository
git clone https://github.com/ruslanlap/RandomGen.git
cd RandomGen

# Restore dependencies
dotnet restore

# Build the solution
dotnet build -c Release

# Create a publishable version (optional)
dotnet publish -c Release -o ./Publish
```

The built plugin will be in `RandomGen\bin\Release\net9.0-windows10.0.22621.0` or in the `Publish` directory if you ran the publish command.

### Project Structure

- `RandomGen/Community.PowerToys.Run.Plugin.RandomGen/` - Main plugin code
- `Main.cs` - Core plugin implementation
- `Images/` - Plugin icons
- `plugin.json` - Plugin metadata
- `RandomGen/Community.PowerToys.Run.Plugin.RandomGen.UnitTests/` - Unit tests

### Dependencies

- [Bogus](https://github.com/bchavez/Bogus) v35.6.3 - For generating realistic fake data
- [Community.PowerToys.Run.Plugin.Dependencies](https://www.nuget.org/packages/Community.PowerToys.Run.Plugin.Dependencies/) v0.91.0 - PowerToys Run plugin dependencies

## 🤝 Contributing

Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

### Ideas for Contribution

- **New Data Types** - Add more types of random data generation
- **Localization** - Add support for more languages and region-specific data formats
- **Settings UI** - Create a settings page for customizing default values
- **Performance Optimizations** - Improve caching and thread safety
- **Enhanced Validation** - Add more validation for generated data
- **Unit Tests** - Expand test coverage
- **Documentation** - Improve inline code documentation and user guides

### Development Guidelines

- Follow the existing code style and patterns
- Ensure all new features have appropriate unit tests
- Use thread-safe practices for all data generation
- Document any new commands or features
- Test on both x64 and ARM64 architectures if possible

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 💬 Feedback and Support

If you encounter any issues or have suggestions for improvement, please [open an issue](https://github.com/ruslanlap/PowerToysRun-RandomGen/issues) on GitHub.

## ❓ FAQ

How do I change the default action keyword?

You can change the action keyword in PowerToys Settings → PowerToys Run → Plugin Manager → RandomGen → Action Keyword.

Are the generated passwords secure?

Yes, passwords are generated using cryptographically secure random number generation methods from the .NET framework, ensuring high entropy and unpredictability.

Can I use this data in production?

The generated data is intended for testing, development, and demonstration purposes only. While passwords are cryptographically secure, other data like names, addresses, and credit card numbers are fictional.

Does this plugin work offline?

Yes, RandomGen works completely offline and doesn't require an internet connection.

How can I add a new data type?

To add a new data type, you would need to modify the Main.cs file, add a new generator method, and update the command handling logic. See the Contributing section for more details.

## 🔒 Security Note

- **Secure Password Generation** - Passwords are generated using `System.Security.Cryptography.RandomNumberGenerator` for cryptographically secure randomness
- **PIN Security** - PINs are checked against common patterns (like 1234, 0000) to avoid weak PINs
- **Fake Data Only** - All generated data (names, addresses, credit cards, etc.) is completely fictional and suitable for testing only
- **Privacy** - No personal data is collected, stored, or transmitted by this plugin
- **Local Processing** - All data generation happens locally on your machine

> ⚠️ **Note:** While passwords generated by this tool use cryptographically secure methods, always follow your organization's security policies for production passwords.

## 🙏 Acknowledgements

- [Bogus](https://github.com/bchavez/Bogus) - For generating realistic fake data
- [Microsoft PowerToys](https://github.com/microsoft/PowerToys) - For the amazing PowerToys Run platform
- [All Contributors](https://github.com/ruslanlap/PowerToysRun-RandomGen/graphs/contributors) - For their valuable contributions
- Credit card numbers are fake and generated using standard test patterns
- Do not use generated personal information for malicious purposes