generate is a command-line interface (CLI) tool written in Go for quickly generating sample and test data such as IBAN
numbers, VAT numbers, UUIDs, and random passwords. It is designed to fit seamlessly into developer workflows by automatically copying
generated output directly to the system clipboard.
- IBAN Generation: Generates valid IBAN numbers for various supported countries (e.g., Italy
IT, SpainES, NetherlandsNL, etc.). - VAT Generation: Generates valid VAT numbers for various supported countries (e.g., Italy
IT, SpainES, NetherlandsNL, etc.). Only IT is supported at this time. - UUID Generation: Supports generating both Version 4 (random) and Version 7 (time-ordered) UUIDs.
- Password Generation: Generates random passwords with customizable length.
- Fictional persona data with fiscal code: Generates random data for fictional persons with their (Italian) fiscal code.
- Clipboard Integration: Automatically copies generated values to the system clipboard (can be disabled via flag).
- Flexible Output Formats: Supports plain text (
tab) and JSON (json) output.
# 1. Add repository (Tap)
brew tap f-lombardo/tools
# 2. Trust the generate formula (needed by Homebrew 6.0+)
brew trust --formula f-lombardo/tools/generate
# 3. Install the program
brew install generate(Go 1.27 or higher is required.)
Clone the repository and build the binary using Makefile:
make buildOr directly using go:
go build -o generate .You can move the compiled binary into a directory in your $PATH (e.g., /usr/local/bin or ~/bin) to run it from
anywhere:
mv generate /usr/local/bin/go install github.com/f-lombardo/generate@latestGeneral syntax:
generate [global options] <command> [command options]| Option | Type | Default | Description |
|---|---|---|---|
-clipboard |
bool |
true |
Automatically copies results to the system clipboard. Use -clipboard=false to disable. |
-output |
string |
tab |
Output format. Supported values: tab (plain text) or json. |
-version |
Prints current version and exits. |
Generates a syntactically valid IBAN.
Command Options:
-country(string, default:IT): ISO 3166-1 alpha-2 country code (e.g.,IT,ES,DE,FR,NL).
Examples:
# Generate an Italian IBAN and copy it to clipboard
generate iban
# Generate a Spanish IBAN
generate iban -country ES
# Format output as JSON
generate -output json iban -country ITGenerates a Universally Unique Identifier (UUID).
Command Options:
-version(string, default:4): UUID version to generate (4for random UUID,7for time-ordered UUID).
Examples:
# Generate a UUID v4 (default)
generate uuid
# Generate a UUID v7 (time-ordered)
generate uuid -version 7
# Generate a UUID v4 in JSON format
generate -output json uuidGenerates a random password.
Command Options:
-length(int, default:14): Length of the password (minimum4).
Examples:
# Generate a random password of default length (14)
generate password
# Generate a password with custom length of 20
generate password -length 20
# Generate a password in JSON format
generate -output json passwordGenerates a syntactically valid VAT number.
Command Options:
-country(string, default:IT): ISO 3166-1 alpha-2 country code (e.g.,IT,ES,DE,FR,NL). Only IT is supported at this time.
Examples:
# Generate an Italian VAT number and copy it to clipboard
generate vat
# Generate an Italian VAT number with country flag
generate vat -country IT
# Format output as JSON
generate -output json vat -country ITGenerates data for a fake person (first name, last name, gender, birth date, place of birth) and computes a valid Italian Fiscal Code (Codice Fiscale).
Command Options:
-country(string, default:IT): ISO 3166-1 alpha-2 country code. Only IT is supported at this time.
Examples:
# Generate fake Italian person data with valid Codice Fiscale
generate person
# Format output as JSON
generate -output json person-
Generate an IBAN without copying to clipboard:
generate -clipboard=false iban -country DE
-
JSON output for use in scripts or pipelines:
generate -output json uuid -version 7
-
Print application version:
generate -version
To run the unit test suite using Makefile:
make testOr directly using go:
go test -v -p 1 ./...To run all quality checks (code formatting, golangci-lint, go vet, vulnerability scan with govulncheck, and unit tests):
make qualityThis project is licensed under the MIT License.
