Fakerer
More Faker than Faker.
Fakerer is a maintained fork of elixirs/faker. It is 100% API-compatible - same Faker.* modules, same functions, same behavior. Migrating from Faker to Fakerer is a one-line change in your mix.exs.
Why this exists
The upstream faker package shipped 0.18.0 in February 2024, then a 0.19.0-alpha.1 in February 2025 that has been sitting for over a year without graduating to a stable release. Open issues and PRs going back to 2023 are unaddressed.
Plenty of folks have asked, in issues and PRs, when a stable release might get released. The pre-release was a good sign, but it was never followed up - and after a year of waiting, I'd rather maintain a fork than keep refreshing the upstream tracker. No drama, no hard feelings - this is what open source forks are for.
Credit
Fakerer stands entirely on the shoulders of the original library. Faker was created by Igor Kapkov (@igas) and has been maintained for years by the elixirs/faker team and an enormous list of contributors. All of the locale data, all of the generators, all of the patterns - that's their work. The MIT license is preserved, and so is Igor's copyright.
If you use Fakerer, you are using Faker. Please go star elixirs/faker.
Migration from Faker
Change one line in your mix.exs:
# Before
{:faker, "~> 0.18", only: :test}
# After
{:fakerer, "~> 1.0", only: :test}
That's it. Every Faker.* call you already have keeps working - Faker.Person.first_name/0, Faker.Address.city/0, Faker.Internet.email/0, all of it. Faker.start() in your test_helper.exs is unchanged too. The Hex package is fakerer, but the underlying OTP application is still :faker - so any config :faker, locale: :de (or similar) you have keeps working without modification.
Fakerer 1.0.0 includes everything from Faker 0.18.0 plus the changes from 0.19.0-alpha.1 - an upstream pre-release that shipped to Hex in February 2025 (requiring an exact-version pin to install) but never graduated to a stable release. That covers Elixir 1.17 & 1.18 compatibility, deprecation warning fixes, the Airports IATA nil fix, and more - see the CHANGELOG.
Quickstart
add
{:fakerer, "~> 1.0"}to your deps inmix.exs:defp deps do [ {:fakerer, "~> 1.0", only: :test} ] endrun:
mix deps.getadd
Faker.start()totest/test_helper.exs:ExUnit.start() Faker.start()jump to usage examples.
Requirements
- OTP 26+
- Elixir 1.16+
Usage
See documentation and usage examples.
Troubleshooting
If you get a message like the one below when you call
Faker.Address.city/0, you need to add:fakerto your application's mix file, in theapplicationsfunction, as above. (Yes,:faker- the Hex package is:fakerer, but the OTP application name stays:fakerso existing code, includingconfig :faker, ...in your application config, continues to work unchanged.)** (FunctionClauseError) no function clause matching in Faker.Address.city_count/1 lib/faker/address.ex:48: Faker.Address.city_count(nil) lib/faker/address.ex:41: Faker.Address.city/0
Tools
Fakerer was designed as a lightweight library, that's why it can be easily used with other tools.
Templating
You can build templates for testing purposes with the Blacksmith project. See the Blacksmith readme for details.
Contributing
Contributions are welcome - see CONTRIBUTING.md. Review cadence is roughly monthly.
License
Released under the MIT License.
Original copyright © Igor Kapkov; fork maintenance copyright © Art Kay.