Giter Site home page Giter Site logo

sebnilsson / dotnetguid Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 3.0 31 KB

.NET Core Global Tool for creating GUIDs/UUIDs

Home Page: https://www.nuget.org/packages/dotnet-guid/

PowerShell 3.83% C# 96.17%
net-core-global-tool net-core guid uuid uuid-generator guid-generator

dotnetguid's Introduction

dotnet-guid

.NET Tool for creating GUIDs/UUIDs.

The tool creates a single or multiple random GUIDs/UUIDs, which can be formatted in multiple ways.

Installation

Download the latest version of .NET. Then install the dotnet-guid .NET Tool, using the command-line:

dotnet tool install -g dotnet-guid

Usage

USAGE:
    dotnet guid [count] [OPTIONS]

EXAMPLES:
    dotnet guid 5 -f N
    dotnet guid -f X -u
    dotnet guid -f B64
    dotnet guid -e

ARGUMENTS:
    [count]    Number of GUIDs/UUIDs to generate. Defaults to 1

OPTIONS:
    -h, --help         Prints help information
    -e, --empty        Uses empty, zero-value GUIDs/UUIDs only
    -l, --lowercase    Sets GUIDs/UUIDs to use lower-cased letters, where applicable
    -u, --uppercase    Sets GUIDs/UUIDs to use upper-cased letters, where applicable
    -f, --format       Sets the formatting of generated GUIDs/UUIDs
                       - B64: Base64 string (ABCDEfghij12345abcdefg)
                       - B64F: Base64 full string (ABCDEfghij12345abcdefg==)
                       - N: 32 digits (00000000000000000000000000000000)
                       - H: 32 digits separated by hyphens (00000000-0000-0000-0000-000000000000)
                       - HB: 32 digits separated by hyphens, enclosed in braces ({00000000-0000-0000-0000-000000000000})
                       - HP: 32 digits separated by hyphens, enclosed in parentheses
                       ((00000000-0000-0000-0000-000000000000))
                       - X: Four hexadecimal values enclosed in braces
                       ({0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}})

Examples

To get a single GUID/UUID, simply type:

dotnet guid

To get 3 random GUIDs/UUIDs, with letters in upper-case, formatted with brackets:

dotnet guid 3 -f H -u

dotnetguid's People

Contributors

sebnilsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

icodein stanac devsw

dotnetguid's Issues

Suggestion for option to copy to clipboard

It would be great if we had an option to copy to clipboard after generating guid(s).

E.g. calling dotnet-guid -c or dotnet-guid --copy could generate a GUID and copy it to clipboard.

@sebnilsson I can submit a pull request.

Doesn't work on machine with only 3.1

After installing and running on machine with only 3.1 installed, I get:

❯ guid -h
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
  - The following frameworks were found:
      3.1.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.1.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.1.0&arch=x64&rid=win10-x64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.