fakedata
CLI utility that generates data in various formats.
Overview
fakedata is a small utility that generates data from the command line:
Quick start
$ fakedata email country
cemshid@example.com Afghanistan
LucasPerdidao@example.me Turkey
arthurholcombe1@test.us Saint Helena
iamgarth@example.us Montenegro
joelcipriano@test.name Croatia
keryilmaz@test.name Vietnam
plbabin@test.org Lithuania
bermonpainter@test.us Haiti
opnsrce@example.name Malaysia
ankitind@test.info Virgin Islands, British
Limit the amout of generated rows:
$ fakedata country.code --limit 5
SH
CF
GQ
PE
FO
Choose a different output format:
$ fakedata product.category product.name --format=csv
Shoes,Rankfix
Automotive,Namis
Movies,Matquadfax
Tools,Damlight
Computers,Silverlux
Industrial,Matquadfax
Home,Sil-Home
Health,Toughwarm
Shoes,Freetop
Tools,Domnix
Generators
fakedata provides a number of generators:
$ fakedata --generators
color one word color
country Full country name
country.code 2-digit country code
date date
domain domain
domain.tld example|test
# ...
# It's a long list :)
Some generators allow you to pass in a range so you can scope their generation
to a subset of values:
$ fakedata int,1..100 # will generate only integers between 1 and 100
$ fakedata int,50.. # specifying only min number works too
$ fakedata int,50 # also works
fakedata can generate insert statements. By default, it uses the name of the generators
as column names:
$ fakedata email domain --format=sql --limit 1
INSERT INTO TABLE (email,domain) values ('yigitpinarbasi@example.org','example.me');
You can specify the name of the column using a field with the following format
column_name=generator. For example:
$ fakedata login=email referral=domain --format=sql --limit 1
INSERT INTO TABLE (login,referral) values ('calebogden@example.com','test.me');
How to install
Homebrew
fakedata can be installed through Homebrew:
$ brew tap lucapette/tap
$ brew install fakedata
Standalone
fakedata can be installed as an executable. Download the latest
compiled binaries and put it
anywhere in your executable path.
Source
Please refer to our contributing guidelines to build and
install fakedata from the source.
How to contribute
Please refer to our contributing guidelines.
Code of Conduct
You are expected to follow our code of conduct when
interacting with the project via issues, pull requests or in any other form.
Many thanks to the awesome contributor covenant initiative!
License
MIT License Copyright (c) [2017] Luca Pette