
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@faker-js/cli
Advanced tools
A CLI of @faker-js/faker.
:information_source: Note: This is currently a MVP.
npm install --save-dev @faker-js/cli
npx faker [--module <moduleName>] <functionName>
:information_source: Note: Read more about
npx
Faker-CLI expects a functionName argument.
An additional, optional --module (or short -m) might be provided in case of naming collisions for functionName.
This is equivalent to calling faker[moduleName][functionName] in any JavaScript environment.
If no module option was given, the CLI will search through faker to find an appropriate function for your provided functionName.
Checkout Fakers's API for information on which modules and functions are available.
If you want a integer you can run:
npx faker int
of
npx faker -m number int
Upcoming features might include:
Users will be able to specify a locale for localized data.
Currently, the CLI always uses the default en locale.
In the future, this feature could be implemented as follows:
npx faker --locale de -m person firstName
This example would print a first name from the German locale.
@faker-js/faker NativelyThis CLI is currently in its MVP stage, which means that it only performs the bare minimum. If you need an integer within a specific range, you'll have to do it yourself. In the future, this feature could be implemented as follows:
npx faker -m number int --min 10 --max 20
This example will generate an integer between 10 and 20.
The min and max options are available in Faker's int options.
Developers often dislike changing work environments.
If you're already working in the terminal, you probably don't want to leave it to look up a small detail.
Instead, you expect the CLI to have a proper --help documentation that includes examples.
This will be the case in the future.
FAQs
A CLI of @faker-js/faker.
We found that @faker-js/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.