Skip to content

Latest commit

 

History

History

cli-bot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

faker-bot

Quickly find required kotlin-faker functionality from your terminal

ToC

Installation

Zero-dependencies native images are available on releases page.
Download the image to a desired location and make it executable or use below script (Depends on jq)

cd ~
wget $(curl -s https://api.github.com/repos/serpro69/kotlin-faker/releases/latest | jq -r '.assets[].browser_download_url') -O faker-bot
chmod a+x ~/faker-bot

If you prefer a .jar instead of a native image, these are also available for each release. Just download the jar and run it with java -jar:

java -jar ./faker-bot.jar --help

Usage

Usage details are also available with the --help option:

./faker-bot --help
./faker-bot list --help
./faker-bot lookup --help

Available commands

list

  • ./faker-bot list - list all providers and their functions
  • ./faker-bot list Address Name - list functions of Address and Name providers (Case insensitive)

Since version 1.4.0 partial matching is also supported:

  • ./faker-bot list addr - list functions of Address provider

lookup

  • ./faker-bot lookup name - lookup providers and functions by name (Case insensitive partial matching)

Available options

Verbose output

./faker-bot list --verbose - prints sample values for each function ./faker-bot lookup name --verbose - prints sample values for each function

Switch to java syntax

./faker-bot list --java-syntax - prints list of all available providers and their functions using java syntax

Using non-default locale

./faker-bot list --verbose --locale de - combined with --verbose, all localized functions will be printed using de locale.

List available locales

./faker-bot list --list-locales - prints all available locales

List available fakers

./faker-bot list --list-fakers - prints all available faker implementations

Thanks

Inspired by faker-ruby/faker-bot