### Install Kotlin Faker CLI using wget and jq
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Installs the Kotlin Faker CLI by downloading the latest native image release. Requires jq to parse the GitHub API response. Make the downloaded file executable.
```bash
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
```
--------------------------------
### Installation
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Instructions on how to add kotlin-faker as a dependency to your project using Gradle or Maven.
```APIDOC
## Installation
Add kotlin-faker as a dependency in your project.
```kotlin
// Gradle (Kotlin DSL)
dependencies {
testImplementation("io.github.serpro69:kotlin-faker:$version")
}
// For domain-specific fakers, add additional modules
dependencies {
implementation("io.github.serpro69:kotlin-faker:$version")
implementation("io.github.serpro69:kotlin-faker-books:$version")
implementation("io.github.serpro69:kotlin-faker-tvshows:$version")
}
```
```xml
io.github.serpro69
kotlin-faker
${kotlin-faker.version}
```
```
--------------------------------
### Lorem Methods
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/lorem/lorem.md
Examples of how to use the lorem methods in Kotlin Faker.
```APIDOC
## Faker().lorem
### Description
Provides methods for generating lorem ipsum text.
### Methods
- `words()`: Generates alias words.
- `supplemental()`: Generates supplemental lorem ipsum text.
- `punctuation()`: Generates punctuation marks.
- `multibyte()`: Generates multibyte characters (non-implemented).
### Request Example
```kotlin
Faker().lorem.words() // => alias
Faker().lorem.supplemental() // => abbas
Faker().lorem.punctuation() // => '.'
```
### Response Example
```kotlin
// Example for words()
"alias"
// Example for supplemental()
"abbas"
// Example for punctuation()
"."
// Example for multibyte() (non-implemented)
// [240, 159, 152, 128]
```
```
--------------------------------
### Get Help for Kotlin Faker CLI
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Displays help information for the main Kotlin Faker CLI tool.
```bash
./faker-bot --help
```
--------------------------------
### Build Project with Gradle
Source: https://github.com/serpro69/kotlin-faker/blob/master/AGENTS.md
Execute the Gradle build task to compile and package the project. Ensure you have Gradle installed and the project is set up correctly.
```bash
./gradlew build
```
--------------------------------
### Generate Train Station Names in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/travel/train_station.md
Use the `trainStation` provider to get fake station names. Examples are shown for metro and railway stations in the UK, Spain, Germany, and the United States. No specific setup or imports are required beyond initializing the Faker instance.
```kotlin
Faker().trainStation.unitedKingdom.metro() // => Aldgate
```
```kotlin
Faker().trainStation.unitedKingdom.railway() // => Birmingham New Street railway station
```
```kotlin
Faker().trainStation.spain.metro() // => Alto del Arenal
```
```kotlin
Faker().trainStation.spain.railway() // => Madrid Atocha
```
```kotlin
Faker().trainStation.germany.metro() // => Alexanderplatz
```
```kotlin
Faker().trainStation.germany.railway() // => Berlin-Gesundbrunnen station
```
```kotlin
Faker().trainStation.unitedStates.metro() // => Back Bay
```
```kotlin
Faker().trainStation.unitedStates.railway() // => 30th Street Station
```
--------------------------------
### Get Help for Kotlin Faker 'list' command
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Displays help information specific to the 'list' command of the Kotlin Faker CLI.
```bash
./faker-bot list --help
```
--------------------------------
### Generate File Extension
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/file.md
Use this to generate a random file extension. Example output is 'flac'.
```kotlin
Faker().file.extension() // => flac
```
--------------------------------
### Generate Fake Data Examples
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Demonstrates generating fake data for name, address, and internet using a configured Faker instance.
```kotlin
// Generate fake data
faker.name.firstName() // => "María"
faker.address.city() // => "Barcelona"
faker.internet.email() // => "maria.garcia@example.test"
```
--------------------------------
### Get Help for Kotlin Faker 'lookup' command
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Displays help information specific to the 'lookup' command of the Kotlin Faker CLI.
```bash
./faker-bot lookup --help
```
--------------------------------
### Generate Fake Data with Kotlin-Faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/README.md
Basic usage example demonstrating how to instantiate the faker and generate a first name and city.
```kotlin
val faker = faker { }
faker.name.firstName() // => Ana
faker.address.city() // => New York
```
--------------------------------
### Generate Hitchhiker's Guide to the Galaxy Data in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/movies/hitchhikers_guide_to_the_galaxy.md
Use this snippet to generate random data from The Hitchhiker's Guide to the Galaxy. Ensure the Kotlin Faker library is included in your project.
```kotlin
Faker().hitchhikersGuideToTheGalaxy.characters() // => Agda
Faker().hitchhikersGuideToTheGalaxy.locations() // => 29 Arlington Avenue
Faker().hitchhikersGuideToTheGalaxy.marvinQuote() // => Life? Don't talk to me about life.
Faker().hitchhikersGuideToTheGalaxy.planets() // => Allosimanius Syneca
Faker().hitchhikersGuideToTheGalaxy.quotes() // => Earth: Mostly Harmless
Faker().hitchhikersGuideToTheGalaxy.species() // => Algolian Suntiger
Faker().hitchhikersGuideToTheGalaxy.starships() // => Billion Year Bunker
```
--------------------------------
### Generate camera data
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tech/camera.md
Use Faker().camera to generate camera brands and models. This requires no special setup.
```kotlin
Faker().camera.brand() // => Canon
```
```kotlin
Faker().camera.model() // => 450D
```
```kotlin
Faker().camera.brandWithModel() // => Benq G2F
```
--------------------------------
### Generate Fake Address
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `address` generator to create full addresses. Example output format is provided.
```kotlin
faker.address().fullAddress() // → "42 Meridian Loop"
```
--------------------------------
### Generate Fake Book Title
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `book` generator to create book titles. Example output format is provided.
```kotlin
faker.book().title() // → "The Quiet Algorithm"
```
--------------------------------
### Name Generation
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/name.md
Examples of generating different name components like first names, last names, and full names.
```APIDOC
## Name Generation API
### Description
This API provides methods to generate various name components, including male, female, and neutral first names, last names, and full names with or without a middle name.
### Method
N/A (This is a library usage example, not a direct HTTP endpoint)
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
N/A
## Usage Examples
### Generating First Names
```kotlin
// Generate a male first name
Faker().name.maleFirstName() // Example output: Aaron
// Generate a female first name
Faker().name.femaleFirstName() // Example output: Abbey
// Generate a neutral first name
Faker().name.neutralFirstName() // Example output: Alexis
// Generate a first name (can be male or female)
Faker().name.firstName() // Example output: Aaron || Abbey
```
### Generating Last Names
```kotlin
// Generate a last name
Faker().name.lastName() // Example output: Abbott
// Generate a male last name
Faker().name.maleLastName() // Example output: Adams
// Generate a female last name
Faker().name.femaleLastName() // Example output: Adams
```
### Generating Full Names
```kotlin
// Generate a full name
Faker().name.name() // Example output: Mr. John Smith
// Generate a full name with a middle name
Faker().name.nameWithMiddle() // Example output: Dr. John Abrams Smith
```
```
--------------------------------
### Generate Fake Name
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `name` generator to create full names. Example output format is provided.
```kotlin
faker.name().name() // → "Dr. Valentina Koslov"
```
--------------------------------
### List providers using Java syntax
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists all available providers and their functions, formatted using Java syntax. Uses the --java-syntax option.
```bash
./faker-bot list --java-syntax
```
--------------------------------
### Generate Fake Email
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `internet` generator to create email addresses. Example output format is provided.
```kotlin
faker.internet().email() // → "v.koslov@fake.dev"
```
--------------------------------
### Hitchhiker's Guide to the Galaxy Data
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/movies/hitchhikers_guide_to_the_galaxy.md
Examples of generating characters, locations, quotes, species, and starships from the Hitchhiker's Guide to the Galaxy.
```APIDOC
## Hitchhiker's Guide to the Galaxy Data Generation
### Description
This section demonstrates how to generate various data points related to the Hitchhiker's Guide to the Galaxy using the Kotlin Faker library.
### Method
Accessing properties of the `hitchhikersGuideToTheGalaxy` object.
### Endpoint
N/A (This is a library usage example, not an API endpoint)
### Request Example
```kotlin
import io.github.serpro69.faker.Faker
val faker = Faker()
// Generate a character name
val character = faker.hitchhikersGuideToTheGalaxy.characters()
// Generate a location
val location = faker.hitchhikersGuideToTheGalaxy.locations()
// Generate a Marvin quote
val marvinQuote = faker.hitchhikersGuideToTheGalaxy.marvinQuote()
// Generate a planet name
val planet = faker.hitchhikersGuideToTheGalaxy.planets()
// Generate a quote
val quote = faker.hitchhikersGuideToTheGalaxy.quotes()
// Generate a species name
val species = faker.hitchhikersGuideToTheGalaxy.species()
// Generate a starship name
val starship = faker.hitchhikersGuideToTheGalaxy.starships()
```
### Response
#### Success Response (200)
Returns a String containing the generated data.
#### Response Example
```json
{
"character": "Agda",
"location": "29 Arlington Avenue",
"marvinQuote": "Life? Don't talk to me about life.",
"planet": "Allosimanius Syneca",
"quote": "Earth: Mostly Harmless",
"species": "Algolian Suntiger",
"starship": "Billion Year Bunker"
}
```
```
--------------------------------
### Manage Documentation with MkDocs and Gradle
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Commands for serving documentation locally using MkDocs and generating API documentation with Gradle's Dokka plugin.
```bash
# Serve documentation locally
mkdocs serve
```
```bash
# Generate API documentation
./gradlew dokkaGfmMultiModule
```
--------------------------------
### Generate Programming Language Creator
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tech/programming_language.md
Use `Faker().programmingLanguage.creator()` to get the creator of a programming language. Example: John Backus.
```kotlin
Faker().programmingLanguage.creator()
```
--------------------------------
### Generate SHA Sums in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/CHANGELOG.adoc
Example of using the new `CryptographyProvider` to generate random SHA sums. Introduced in version 1.12.0.
```kotlin
CryptographyProvider().sha256()
```
--------------------------------
### List providers with verbose output and sample values
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists all providers and their functions, including sample generated values for each function. Uses the --verbose option.
```bash
./faker-bot list --verbose
```
--------------------------------
### Generate Programming Language Name
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tech/programming_language.md
Use `Faker().programmingLanguage.name()` to get a random programming language name. Example: A# .NET.
```kotlin
Faker().programmingLanguage.name()
```
--------------------------------
### Generate Food Allergens in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/CHANGELOG.adoc
Example of how to generate a list of food allergens using the food data provider. Ensure the 'core' module is updated.
```kotlin
Faker().food.allergens()
```
--------------------------------
### Create Faker Instance (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/getting-started.md
Instantiate Faker directly in Kotlin to start generating data. Use this for basic data generation.
```kotlin
val faker = Faker()
faker.name.firstName()
faker.address.city()
```
--------------------------------
### Generate Fake Game Title
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `game` generator to create game titles. Example output format is provided.
```kotlin
faker.game().title() // → "Shadow Protocol"
```
--------------------------------
### CLI App for Generator Lookup - Text
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/index.md
Example of using the CLI application to look up generator functionality. This helps in discovering available data generation options.
```text
kotlin-faker --generator address --method city --locale en-US
```
--------------------------------
### Generate Ethnic Food Categories in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.ethnicCategory` to get an ethnic food category. Example output: Peruvian.
```kotlin
Faker().food.ethnicCategory // => Peruvian
```
--------------------------------
### Generate a random color name in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/color.md
Call the `name()` method on the `color` object to get a random color name. Example output is 'blue'.
```kotlin
Faker().color.name() // => blue
```
--------------------------------
### Generate Breaking Bad Character
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tvshows/breaking_bad.md
Use the `character()` method to get a random character name from Breaking Bad. No setup is required beyond initializing the Faker instance.
```kotlin
Faker().breakingBad.character() // => Walter White
```
--------------------------------
### Apply and Check Code Formatting
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Use Spotless Gradle plugin to enforce code style. Run `spotlessCheck` to verify formatting and `spotlessApply` to automatically fix violations.
```bash
# Apply formatting fixes
./gradlew spotlessApply
```
--------------------------------
### List all providers and functions with Kotlin Faker CLI
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists all available data providers and their functions using the 'list' command.
```bash
./faker-bot list
```
--------------------------------
### Generate Emotion Noun with Kotlin Faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/lorem/emotion.md
Use `Faker().emotion.noun()` to get a random emotion noun. This function is part of the emotion provider and requires no additional setup.
```kotlin
Faker().emotion.noun() // => adoration
```
--------------------------------
### Generate Emotion Adjective with Kotlin Faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/lorem/emotion.md
Use `Faker().emotion.adjective()` to get a random emotion adjective. No specific setup is required beyond initializing the Faker instance.
```kotlin
Faker().emotion.adjective() // => able
```
--------------------------------
### Creating a Faker Instance
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Demonstrates how to create a Faker instance with default settings or custom configurations for locale, random seed, and other options.
```APIDOC
## Creating a Faker Instance
Create a Faker instance using the DSL or constructor, with optional configuration for locale, random seed, and other settings.
```kotlin
import io.github.serpro69.kfaker.Faker
import io.github.serpro69.kfaker.faker
import io.github.serpro69.kfaker.fakerConfig
// Simple instance with defaults
val faker = Faker()
// Using DSL with configuration
val faker = faker {
fakerConfig {
locale = "nl" // Dutch locale
randomSeed = 42L // Deterministic output
uniqueGeneratorRetryLimit = 1000 // Retry limit for unique values
}
}
// Using FakerConfig directly
val config = fakerConfig {
locale = "es"
randomSeed = 12345L
}
val faker = Faker(config)
// Generate fake data
faker.name.firstName() // => "María"
faker.address.city() // => "Barcelona"
faker.internet.email() // => "maria.garcia@example.test"
```
```
--------------------------------
### Create Faker Instance with DSL (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/getting-started.md
Utilize the Kotlin DSL for creating a Faker instance, allowing for configuration. This is useful for custom data generation setups.
```kotlin
val faker = faker {
// faker config
}
faker.name.firstName()
faker.address.city()
```
--------------------------------
### Generate Coin Flip Result in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/games/coin.md
Use the `Faker().coin.flip()` method to get a random result of 'Heads' or 'Tails'. No additional setup is required beyond initializing the Faker instance.
```kotlin
Faker().coin.flip() // => Heads || Tails
```
--------------------------------
### Promote Release
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Use the make promote-to-release command to promote a release.
```bash
make promote-to-release
```
--------------------------------
### Lookup with verbose output and sample values
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Looks up providers and functions by name, displaying sample generated values for each. Uses the --verbose option.
```bash
./faker-bot lookup name --verbose
```
--------------------------------
### Generate Movie Title and Quote in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/movies/movie.md
Use `Faker().movie.title()` to get a random movie title and `Faker().movie.quote()` to retrieve a famous movie quote. No specific setup is required beyond initializing the Faker instance.
```kotlin
Faker().movie.title() // => 12 Angry Men
```
```kotlin
Faker().movie.quote() // => Frankly, my dear, I don’t give a damn.
```
--------------------------------
### Get Currency Symbol in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/currency_symbol.md
Use the `currencySymbol.symbol()` method to get the currency symbol for the current locale. Ensure the Faker library is initialized.
```kotlin
Faker().currencySymbol.symbol() // => $
```
--------------------------------
### Generate Hello World in Ruby and JavaScript
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/source.md
Use `hello_world` to generate 'Hello World!' output. Specify 'ruby' for `puts 'Hello World!'` or 'javascript' for `alert('Hello World!');`.
```kotlin
Faker().source.hello_world("ruby") // => puts 'Hello World!'
```
```kotlin
Faker().source.hello_world("javascript") // => alert('Hello World!');
```
--------------------------------
### Generate Big Bang Theory Characters and Quotes
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tvshows/big_bang_theory.md
Use `Faker.bigBangTheory.characters()` to get a character name and `Faker.bigBangTheory.quotes()` to get a quote. These functions are part of the `bigBangTheory` faker object.
```kotlin
Faker.bigBangTheory.characters() // => Sheldon Cooper
```
```kotlin
Faker.bigBangTheory.quotes() // => Bazinga!
```
--------------------------------
### Generate Rock Band Name and Song
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/music/rock_band.md
Use `Faker().rockBand.name()` to get a band name and `Faker().rockBand.song()` to get a song title. These methods are part of the music faker functionality.
```kotlin
Faker().rockBand.name() // => Led Zeppelin
Faker().rockBand.song() // => Are You Gonna Be My Girl
```
--------------------------------
### Initialize and Use TechFaker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/tech.md
This Kotlin code demonstrates how to initialize the TechFaker instance and generate fake data for applications and devices. Make sure to import the correct faker package if using multiple providers.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.tech.faker
val faker = faker { }
faker.app.name()
faker.device.platform()
```
--------------------------------
### Generate Bossa Nova Artists and Songs
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/music/bossa_nova.md
Use `Faker().bossaNova.artists()` to get a random artist name and `Faker().bossaNova.songs()` to get a random song title. These functions are part of the music faker module.
```kotlin
Faker().bossaNova.artists() // => Alaide Costa
```
```kotlin
Faker().bossaNova.songs() // => A Banda
```
--------------------------------
### Initialize and Generate Game Data (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/games.md
This Kotlin code demonstrates how to initialize the faker instance with the Games provider and then generate fake game-related data. Remember to import the correct faker package if using multiple providers.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.games.faker
val faker = faker { }
faker.coin.flip()
faker.dnd.alignments()
```
--------------------------------
### Generate Hobby Activity in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/misc/hobby.md
Use the `hobby.activity()` method to generate a random hobby activity. No specific setup is required beyond initializing the Faker instance.
```kotlin
Faker().hobby.activity() // => 3D printing
```
--------------------------------
### List providers with verbose output and specific locale
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists providers and functions with sample values, using the specified locale (e.g., 'de'). All localized functions will be printed.
```bash
./faker-bot list --verbose --locale de
```
--------------------------------
### Hitchhiker's Guide to the Galaxy Dictionary File
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/movies/hitchhikers_guide_to_the_galaxy.md
This YAML file contains the data used by the Hitchhiker's Guide to the Galaxy faker provider. It is not directly executable code but defines the data sources.
```yaml
--8<-- "core/src/jvmMain/resources/locales/en/hitchhikers_guide_to_the_galaxy.yml"
```
--------------------------------
### Generate The Office Characters and Quotes in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tvshows/the_office.md
Use Faker().theOffice.characters() to get a random character name and Faker().theOffice.quotes() to get a random quote from The Office. Ensure the library is properly configured for the 'en' locale.
```kotlin
Faker().theOffice.characters() // => Michael Scott
```
```kotlin
Faker().theOffice.quotes() // => "Everything I have I owe to this job..., this stupid, wonderful, boring, amazing job."
```
--------------------------------
### Generate Horse Name and Breed in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/creatures/horse.md
Use `Faker().horse.name()` to get a random horse name and `Faker().horse.breed()` to get a random horse breed. Ensure the Kotlin Faker library is included in your project.
```kotlin
Faker().horse.name() // => Ebony
```
```kotlin
Faker().horse.breed() // => Abaco Barb
```
--------------------------------
### Create Faker Instance with Non-DSL Configuration
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/faker-dsl.md
For more control, use the `FakerConfig.Builder` to incrementally build the configuration. Set initial properties, add more configuration later, and finally build the `FakerConfig` before creating the `Faker` instance.
```kotlin
val configBuilder = FakerConfig.Builder()
.setLocale("nl")
.setUniqueGeneratorRetryLimit(111)
configBuilder.setRandomSeed(42)
val config: FakerConfig = configBuilder.build()
val faker = Faker(config)
```
--------------------------------
### Separator API
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/separator.md
Provides functionality for getting locale-based separator symbol.
```APIDOC
## Faker().separator
### Description
Provides functionality for getting locale-based separator symbol.
### Method
GET
### Endpoint
/separator
### Request Example
```json
{
"example": "Faker().separator.separator()"
}
```
### Response
#### Success Response (200)
- **separator** (string) - The locale-based separator symbol.
#### Response Example
```json
{
"example": "&"
}
```
```
--------------------------------
### Release Snapshot and Pre-releases
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Utilize Makefile targets for managing project releases, including snapshot versions and pre-release builds.
```bash
# Snapshot releases
make snapshot-minor
```
```bash
# Pre-releases
make pre-release-major|minor|patch
make next-pre-release
```
--------------------------------
### Generate Markdown Headers in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/lorem/markdown.md
Use the `markdown.headers()` function to generate markdown header syntax. No specific setup is required beyond initializing Faker.
```kotlin
Faker().markdown.headers() // => #
```
--------------------------------
### Currency Symbol
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/currency_symbol.md
Provides functionality for getting locale-based currency symbols.
```APIDOC
## Currency Symbol API
### Description
Provides functionality for getting locale-based currency symbols.
### Method
GET
### Endpoint
/currencySymbol
### Request Example
```json
{
"example": "Faker().currencySymbol.symbol()"
}
```
### Response
#### Success Response (200)
- **symbol** (string) - The currency symbol for the current locale.
#### Response Example
```json
{
"example": "$"
}
```
```
--------------------------------
### Run Standard Gradle Build Commands
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Execute common Gradle tasks for cleaning, testing, formatting, and building the project. Includes commands for running unit and integration tests, checking code formatting, performing a full build with shadow JAR creation, and compiling a native CLI image.
```bash
# Run unit tests
./gradlew clean test
```
```bash
# Run integration tests
./gradlew clean integrationTest
```
```bash
# Run code formatting checks
./gradlew spotlessCheck
```
```bash
# Full build with all checks
./gradlew clean test integrationTest spotlessCheck build shadowJar
```
```bash
# Build native CLI image (requires GraalVM JDK 17)
./gradlew nativeCompile
```
--------------------------------
### Create Faker Instance with DSL (Functional Java)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/getting-started.md
Use the functional Java approach with a consumer for Faker configuration. Requires `FunctionalUtil.fromConsumer`.
```java
Faker faker = faker(fromConsumer(f -> {
// faker config
}));
faker.getName().firstName()
faker.getAddress().city()
```
--------------------------------
### Generate Company Data in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/company.md
Use Faker().company to generate various company-related data. No specific setup is required beyond initializing the Faker instance.
```kotlin
Faker().company.buzzwords() // Advanced
```
```kotlin
Faker().company.bs() // clicks-and-mortar
```
```kotlin
Faker().company.name() // Smith and Sons
```
```kotlin
Faker().company.industry() // Defense & Space
```
```kotlin
Faker().company.profession // teacher
```
```kotlin
Faker().company.type() // Public Company
```
```kotlin
Faker().company.sicCode() // 0112
```
--------------------------------
### Create Faker Instance with Defaults
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Instantiate Faker with default settings. Ensure the necessary import is included.
```kotlin
import io.github.serpro69.kfaker.Faker
// Simple instance with defaults
val faker = Faker()
```
--------------------------------
### Install Kotlin-Faker with Maven
Source: https://github.com/serpro69/kotlin-faker/blob/master/README.md
Add this dependency to your Maven project to include Kotlin-Faker.
```xml
io.github.serpro69
kotlin-faker
${version}
```
--------------------------------
### Initialize and Use Kotlin Faker Commerce
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/commerce.md
Import the commerce faker and initialize it. You can then call methods like `bank.name()` or `code.asin()` to generate fake data. Ensure the main `kotlin-faker` dependency is also present.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.commerce.faker
val faker = faker { }
faker.bank.name()
faker.code.asin()
```
--------------------------------
### Install Kotlin-Faker with Gradle
Source: https://github.com/serpro69/kotlin-faker/blob/master/README.md
Add this dependency to your Gradle project to include Kotlin-Faker.
```groovy
dependencies {
implementation 'io.github.serpro69:kotlin-faker:$version'
}
```
--------------------------------
### Science Data Generation
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/science.md
Examples of how to generate various science-related data points.
```APIDOC
## Science Data Generation
### Description
This section provides examples for generating fake data related to scientific branches, elements, modifiers, scientists, and tools using the Kotlin Faker library.
### Method
N/A (This is a library usage example, not an HTTP API)
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
#### Success Response (N/A)
N/A
#### Response Example
```kotlin
// Scientific Branches
Faker().sciense.branch.empiricalNaturalBasic() // => Physics
Faker().sciense.branch.empiricalNaturalApplied() // => Engineering
Faker().sciense.branch.empiricalSocialBasic() // => Anthropology
Faker().sciense.branch.empiricalSocialApplied() // => Business Administration
Faker().sciense.branch.formalBasic() // => Logic
Faker().sciense.branch.formalApplied() // => Computer Science
// Elements
Faker().science.element() // => Hydrogen
Faker().science.elementSymbol() // => H
Faker().science.elementState() // => Gas
Faker().science.elementSubcategory() // => Alkali metal
// Other Science Data
Faker().science.modifier() // => Quantum
Faker().science.scientist() // => Isaac Newton
Faker().science.tool() // => Microscope
```
```
--------------------------------
### Compass Functions in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/travel/compass.md
Demonstrates how to use the compass functions to generate directions, abbreviations, and azimuths. Ensure the Faker library is initialized.
```kotlin
Faker().compass.direction() // => north
```
```kotlin
Faker().compass.abbreviation() // => N
```
```kotlin
Faker().compass.azimuth() // => 180
```
--------------------------------
### Generate House Furniture in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/house.md
Use `Faker().house.furniture()` to generate a random furniture item. No specific setup is required beyond initializing the Faker instance.
```kotlin
Faker().house.furniture() // => chair
```
--------------------------------
### Educator Data Generation
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/educator.md
Examples of how to generate various educator-related data such as school names, types, and subjects.
```APIDOC
## Educator Data Generation
### Description
Provides methods to generate fake data related to educators, schools, and academic subjects.
### Methods
- `schoolName()`: Generates a random school name.
- `secondary()`: Generates a type of secondary school (e.g., High School).
- `primary()`: Generates a type of primary school (e.g., Elementary School).
- `secondarySchool()`: Generates a full secondary school name.
- `primarySchool()`: Generates a full primary school name.
- `campus()`: Generates a campus name.
- `subject()`: Generates a subject name, potentially with a specialization.
- `universityType()`: Generates a type of university (e.g., College).
- `tertiaryDegreeType()`: Generates a type of tertiary degree (e.g., Master of).
- `tertiaryDegreeCourseNumber()`: Generates a course number for a tertiary degree.
### Request Example
```kotlin
Faker().educator.schoolName() // => Bluemeadow
Faker().educator.secondary() // => High School
Faker().educator.primary() // => Elementary School
Faker().educator.secondarySchool() // => Bluemeadow High School
Faker().educator.primarySchool() // => Bluemeadow Elementary School
Faker().educator.campus() // => Bluemeadow Campus
Faker().educator.subject() // => Applied Science (Psychology)
Faker().educator.universityType() // => College
Faker().educator.tertiaryDegreeType() // => Master of
Faker().educator.tertiaryDegreeCourseNumber() // => 306
```
### Non-Implemented Functions
- `university()`: Placeholder for university generation.
- `degree()`: Placeholder for degree generation.
- `courseName()`: Placeholder for course name generation.
### Request Example (Non-Implemented)
```kotlin
Faker().educator.university() // =>
Faker().educator.degree() // =>
Faker().educator.courseName() // =>
```
```
--------------------------------
### Create Faker Instance with DSL Configuration
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Configure Faker using a DSL for locale, random seed, and unique value generation retry limit. Ensure necessary imports.
```kotlin
import io.github.serpro69.kfaker.Faker
import io.github.serpro69.kfaker.faker
import io.github.serpro69.kfaker.fakerConfig
// Using DSL with configuration
val faker = faker {
fakerConfig {
locale = "nl" // Dutch locale
randomSeed = 42L // Deterministic output
uniqueGeneratorRetryLimit = 1000 // Retry limit for unique values
}
}
```
--------------------------------
### Initialize and Use EduFaker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/edu.md
Initialize the EduFaker by importing the correct package and then use its methods to generate fake educational data. The main kotlin-faker dependency must be on the classpath.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.edu.faker
val faker = faker { }
faker.educator.schoolName()
faker.science.element()
```
--------------------------------
### Configure RandomClassProvider in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/CHANGELOG.adoc
Example of configuring `RandomClassProvider` on higher levels. This feature was added in version 1.13.0.
```kotlin
val faker = Faker(randomClassProvider = MyCustomProvider())
```
--------------------------------
### Generate Currency Symbol
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/currency.md
Use `Faker().currency.symbol()` to generate a random currency symbol. Example: HK$.
```kotlin
Faker().currency.symbol() // => HK$
```
--------------------------------
### List all available faker implementations
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Prints a list of all available faker implementations supported by the Kotlin Faker CLI. Uses the --list-fakers option.
```bash
./faker-bot list --list-fakers
```
--------------------------------
### Run Kotlin Faker CLI using a JAR file
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Executes the Kotlin Faker CLI by running its JAR file. Use the --help option to see available commands and options.
```bash
java -jar ./faker-bot.jar --help
```
--------------------------------
### Generate Currency Code
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/currency.md
Use `Faker().currency.code()` to generate a random currency code. Example: AED.
```kotlin
Faker().currency.code() // => AED
```
--------------------------------
### String Templating with Kotlin Faker (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/index.md
Demonstrates how to use string providers for templated string generation. This is useful for creating dynamic strings based on patterns.
```kotlin
--8<-- "Homepage.kt:string_provider_one"
```
--------------------------------
### Generate Fake IBAN
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the `bank` generator to create IBAN numbers. Example output format is provided.
```kotlin
faker.bank().iban() // → "DE89 3704 0044 0532"
```
--------------------------------
### Generate Fake Book Data in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/books.md
Initialize the faker instance and use the book provider to generate fake data such as book titles. Remember to import the correct faker package.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.books.faker
val faker = faker { }
faker.book.title()
faker.cosmere.aons()
```
--------------------------------
### Generate Fake Database Data (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/databases.md
Initialize the faker instance and use the databases faker to generate fake MySQL data. Ensure the correct package is imported.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.databases.faker
val faker = faker { }
faker.mysql.type()
faker.mysql.engine()
```
--------------------------------
### Predefined Values for Constructor Parameters
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/random-class-instance.md
Demonstrates how specific values can be assigned to constructor parameters during random instance generation.
```kotlin
baz.id == 0
baz.user == "user_X3a8s813dcb"
baz.uuid == UUID.fromString("00000000-0000-0000-0000-000000000000")
baz.relatedUuid == UUID.fromString("11111111-1111-1111-1111-111111111111")
```
--------------------------------
### Generate Appliance Data in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tech/appliance.md
Use Faker().appliance to generate fake appliance brands and equipment. Ensure the Faker library is initialized.
```kotlin
Faker().appliance.brand() // => Bosch
```
```kotlin
Faker().appliance.quimpment() // => Air ioniser
```
--------------------------------
### Make Release
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Use make commands to perform major, minor, or patch releases.
```bash
make release-major|minor|patch
```
--------------------------------
### Markdown Generation
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/lorem/markdown.md
Provides examples for generating markdown elements such as headers and emphasis using the `Faker().markdown` object.
```APIDOC
## Faker().markdown
### Description
Generates markdown elements.
### Method
N/A (This is a library usage example, not an API endpoint)
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
#### Success Response (200)
N/A
#### Response Example
```kotlin
Faker().markdown.headers() // => #
Faker().markdown.emphasis() // => _
```
```
--------------------------------
### Generate Job Title
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.title()` to generate a random job title. Example output: IT Manager.
```kotlin
Faker().job.title() // => IT Manager
```
--------------------------------
### List specific providers with Kotlin Faker CLI
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists functions for specified providers (e.g., Address, Name). Matching is case-insensitive.
```bash
./faker-bot list Address Name
```
--------------------------------
### Initialize Faker in Java
Source: https://context7.com/serpro69/kotlin-faker/llms.txt
Use kotlin-faker from Java with helper utilities for DSL-style configuration. The `faker()` function and `fromConsumer` helper simplify initialization and configuration.
```java
import io.github.serpro69.kfaker.Faker;
import static io.github.serpro69.kfaker.FakerKt.faker;
import static io.github.serpro69.kfaker.FunctionalUtil.fromConsumer;
// Simple instance
Faker faker = new Faker();
String firstName = faker.getName().firstName();
String city = faker.getAddress().city();
String email = faker.getInternet().email();
```
```java
// With DSL configuration (using fromConsumer helper)
Faker configuredFaker = faker(fromConsumer(f -> {
f.config(fromConsumer(config -> {
config.setLocale("de");
config.setRandomSeed(42L);
}));
}));
```
```java
// Alternative without fromConsumer (explicit return)
Faker alternativeFaker = faker(f -> {
f.config(config -> {
config.setLocale("fr");
config.setRandomSeed(123L);
return kotlin.Unit.INSTANCE;
});
return kotlin.Unit.INSTANCE;
});
```
```java
// Generate data
String germanName = configuredFaker.getName().firstName(); // => "Hans"
String frenchCity = alternativeFaker.getAddress().city(); // => "Paris"
```
--------------------------------
### Generate Education Level
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.educationLevel()` to generate a random education level. Example output: Associates.
```kotlin
Faker().job.educationLevel() // => Associates
```
--------------------------------
### Generate Employment Type
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.employmentType()` to generate a random employment type. Example output: Full-time.
```kotlin
Faker().job.employmentType() // => Full-time
```
--------------------------------
### List all available locales
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Prints a list of all locales supported by the Kotlin Faker CLI. Uses the --list-locales option.
```bash
./faker-bot list --list-locales
```
--------------------------------
### Generate Various Data Types with kotlin-faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/index.md
Demonstrates the diverse data generation capabilities of kotlin-faker across different domains. Use these examples to see the range of fake data available.
```kotlin
--8<-- "Homepage.kt:data_provider_zero"
```
```kotlin
--8<-- "Homepage.kt:data_provider_one"
```
```kotlin
--8<-- "Homepage.kt:data_provider_two"
```
```kotlin
--8<-- "Homepage.kt:data_provider_three"
```
```kotlin
--8<-- "faker/commerce/src/jvmTest/kotlin/io/github/serpro69/kfaker/commerce/integration/docs/Homepage.kt:commerce_faker_one"
```
```kotlin
--8<-- "faker/books/src/jvmTest/kotlin/io/github/serpro69/kfaker/books/integration/docs/Homepage.kt:books_faker_one"
```
```kotlin
--8<-- "faker/movies/src/jvmTest/kotlin/io/github/serpro69/kfaker/movies/integration/docs/Homepage.kt:movies_faker_one"
--8<-- "faker/tvshows/src/jvmTest/kotlin/io/github/serpro69/kfaker/tv/integration/docs/Homepage.kt:tvshows_faker_one"
```
--------------------------------
### Generate Job Position
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.position()` to generate a random job position. Example output: Supervisor.
```kotlin
Faker().job.position() // => Supervisor
```
--------------------------------
### Generate Job Field
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.field()` to generate a random job field. Example output: Marketing.
```kotlin
Faker().job.field() // => Marketing
```
--------------------------------
### Generate Music-Related Fake Data in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/music.md
Initialize the Kotlin Faker with the music provider and generate fake data such as instruments or opera names. Ensure the correct package is imported if using multiple faker modules.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.music.faker
val faker = faker { }
faker.music.instruments()
faker.opera.italian.byGiuseppeVerdi()
```
--------------------------------
### Generate Sushi Types in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.sushi()` to generate a type of sushi. Example output: Abalone.
```kotlin
Faker().food.sushi() // Abalone
```
--------------------------------
### Generate Currency Name
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/core/currency.md
Use `Faker().currency.name()` to generate a random currency name. Example: UAE Dirham.
```kotlin
Faker().currency.name() // => UAE Dirham
```
--------------------------------
### Initialize and Use LoremFaker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/lorem.md
Instantiate the faker object, ensuring the correct package is imported if multiple faker providers are used. Then, call methods on the faker instance to generate fake data such as adjectives or verbs.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.lorem.faker
val faker = faker { }
faker.adjective.positive()
faker.verbs.base()
```
--------------------------------
### Generate Vegetables in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.vegetables()` to generate a random vegetable name. Example output: Artichoke.
```kotlin
Faker().food.vegetables() // Artichoke
```
--------------------------------
### CLI App - List Generators
Source: https://github.com/serpro69/kotlin-faker/blob/master/material/overrides/home.html
Use the command-line interface to list available data generators.
```bash
$ faker-cli list
```
--------------------------------
### Generate Fruits in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.fruits()` to generate a random fruit name. Example output: Apples.
```kotlin
Faker().food.fruits() // Apples
```
--------------------------------
### Select Constructor by Parameter Size with Kotlin Faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/random-class-instance.md
Configure the constructor selection strategy for class instantiation. By default, the constructor with the fewest arguments is used. This example explicitly selects a constructor with 3 parameters.
```kotlin
constructorParamSize(3)
```
--------------------------------
### Generate Fake Creature Data (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/fakers/creatures.md
Initialize the faker instance and use it to generate fake data for dogs and horses. Remember to import the correct faker package if using multiple fakers.
```kotlin
// NB! the package you import if using multiple fakers
import io.github.serpro69.kfaker.creatures.faker
val faker = faker { }
faker.dog.name()
faker.horse.breed()
```
--------------------------------
### Generate Australian Animals
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/travel/australia.md
Use the `australia.animals()` method to generate random Australian animal names. Example output: Koala.
```kotlin
Faker().australia.animals() // => Koala
```
--------------------------------
### Configure Faker Instance with DSL in Java
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/java-interop.md
Use `FunctionalUtils.fromConsumer` to configure the Faker instance with a DSL in Java, avoiding explicit return statements for lambdas.
```java
Faker faker = faker(fromConsumer(f -> {
f.config(fromConsumer(config -> {
config.setRandomSeed(42L);
}));
}));
```
--------------------------------
### Generate Australian Locations
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/travel/australia.md
Use the `australia.locations()` method to generate random Australian location names. Example output: Brisbane.
```kotlin
Faker().australia.locations() // => Brisbane
```
--------------------------------
### Generate Play Name
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/music/theater.md
Use `Faker().theater.play()` to generate a random play name. Example output: A Delicate Balance.
```kotlin
Faker().theater.play() // => A Delicate Balance
```
--------------------------------
### Use Custom Faker Instance (Kotlin)
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/custom-data-provider.md
Instantiate and use your custom faker to generate data. Access the custom data providers and their methods directly from the faker instance.
```kotlin
val testFaker = CustomFaker()
println(testFaker.fooBar.foo()) // baz
println(testFaker.fooBar.bar()) // foobar
println(testFaker.fooBar.baz()) // ABC 123
```
--------------------------------
### Generate Device Information with Kotlin Faker
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/tech/device.md
Use the `device` provider to generate various device attributes. Examples include model name, platform, manufacturer, and serial number.
```yaml
--8<-- "core/src/jvmMain/resources/locales/en/device.yml"
```
```kotlin
Faker().device.modelName() // => iPhone
Faker().device.platform() // => Android OS
Faker().device.manufacturer() // => Dell
Faker().device.serial() // => pEekWH7zGxVITv6NTa5KHjLSwr5Ie4
```
--------------------------------
### Generate Job Seniority
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/edu/job.md
Use `Faker().job.seniority()` to generate a random job seniority level. Example output: Lead.
```kotlin
Faker().job.seniority() // => Lead
```
--------------------------------
### Creating a New Random Instance
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/wiki/random-class-instance.md
Use the `new` function on `RandomClassProvider` to create a fresh instance. Configurations set via `fakerConfig` are applied, but those set on the original `faker.randomProvider` instance are not.
```kotlin
--8<-- "Extras.kt:extras_random_instance_fourteen"
```
--------------------------------
### Generate Spices in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.spices()` to generate a random spice name. Example output: Achiote Seed.
```kotlin
Faker().food.spices() // Achiote Seed
```
--------------------------------
### Gradle Tag Task
Source: https://github.com/serpro69/kotlin-faker/blob/master/CLAUDE.md
Alternatively, use the ./gradlew tag task for release management. Refer to the README.md for detailed instructions.
```bash
./gradlew tag
```
--------------------------------
### Generate Food Ingredients in Kotlin
Source: https://github.com/serpro69/kotlin-faker/blob/master/docs/pages/data-provider/commerce/food.md
Use `Faker().food.ingredients()` to generate a random food ingredient. Example output: Achacha.
```kotlin
Faker().food.ingredients() // Achacha
```
--------------------------------
### List providers using partial matching with Kotlin Faker CLI
Source: https://github.com/serpro69/kotlin-faker/blob/master/cli-bot/README.md
Lists functions for providers that partially match the given term (e.g., 'addr' for Address). Supported since version 1.4.0.
```bash
./faker-bot list addr
```