PassGenCli 1.0.1

dotnet tool install --global PassGenCli --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local PassGenCli --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=PassGenCli&version=1.0.1
                    
nuke :add-package PassGenCli --version 1.0.1
                    

DNX - .Net 10 New Features

DNX is a new tool/script delivered with the .Net 10, the purpose of this tool is to make super simpler the .Net tools execution, without needing even the installation of the tool.

Fot those familiar with python and/or javascript, it is similar to npx, uvx or pipx.

How to use it?


PassGen - Secure Password Generator

A lightweight, secure CLI tool for generating cryptographically strong passwords with customizable options.

Features

  • Generates cryptographically secure passwords using System.Security.Cryptography.RandomNumberGenerator
  • Customizable password length
  • Exclude specific characters to meet policy requirements
  • No external dependencies - pure C# implementation
  • Cross-platform support (.NET 10.0)

Installation

Install as a global .NET tool via NuGet:

dotnet tool install --global PassGenCli

Usage

Basic Usage

Generate a password with default settings (16 characters):

passgen

Specify Length

Generate a password with a specific length:

passgen -l 32
passgen --length 24

Exclude Characters

Exclude specific characters from the generated password:

# Exclude commonly confused characters
passgen --length 20 --exclude "0O1lI"

# Exclude special characters that might cause issues
passgen -l 16 -e "{}[]"

# Exclude quotes for shell-friendly passwords
passgen -l 20 -e "\"'"

Help

Display usage information:

passgen --help
passgen -h

Character Sets

By default, passwords are generated from the following character sets:

  • Uppercase letters: A-Z
  • Lowercase letters: a-z
  • Digits: 0-9
  • Special characters: !@#$%^&*()_+-=[]{}|;:,.<>?

Security

  • Uses RandomNumberGenerator from System.Security.Cryptography for cryptographically secure random number generation
  • Implements proper distribution across all available characters
  • No predictable patterns or biases in password generation

Examples

# Generate a 32-character password
passgen -l 32

# Generate a password without ambiguous characters
passgen --length 20 --exclude "0O1lI"

# Generate a database-safe password (no special chars that might need escaping)
passgen -l 24 -e "\"'`\\;|&$"

# Generate a 16-character password excluding brackets
passgen -l 16 -e "{}[]()<>"

Building from Source

# Clone the repository
git clone https://github.com/wilsonneto-swe/passgen-cli.git
cd passgen-cli

# Build the project
dotnet build

# Run locally
dotnet run -- -l 20

# Pack as NuGet package
dotnet pack

# Install locally
dotnet tool install --global --add-source ./bin/Debug PassGenCli

License

MIT License - See LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Requirements

  • .NET 10.0 or higher
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.1 210 11/23/2025
1.0.0 209 11/23/2025