# module

> Generate the minimal skeleton for a new node.js module/package.

Latest version **2.0.0** (published 2025-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install module
pnpm add module
yarn add module
bun add module
```

Provides the command `module`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2025-10-26 |
| First published | 2012-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Luke Horvat |
| Maintainers | lukehorvat |
| Keywords | node, module, package, skeleton, boilerplate, scaffold, generator, cli, commonjs, esm |

## Links

- npm: https://www.npmjs.com/package/module
- Repository: https://github.com/lukehorvat/module
- Homepage: https://github.com/lukehorvat/module#readme
- Issues: https://github.com/lukehorvat/module/issues
- npm.io page: https://npm.io/package/module

## Dependencies (3)

- [kleur](https://npm.io/package/kleur.md) ^4.1.5
- [yargs](https://npm.io/package/yargs.md) ^18.0.0
- [tildify](https://npm.io/package/tildify.md) ^3.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2025-10-26
- 1.2.5 — 2016-04-15
- 1.2.4 — 2016-04-15
- 1.2.3 — 2016-04-15
- 1.2.2 — 2016-04-15
- 1.2.1 — 2016-04-14
- 1.2.0 — 2016-04-14
- 1.1.0 — 2016-04-14
- 1.0.0 — 2016-04-14
- 0.0.1 — 2012-02-01

## README

# module [![npm version](https://img.shields.io/npm/v/module.svg?style=flat-square)](https://www.npmjs.com/package/module)

Generate the minimal skeleton for a new node.js module/package.

![](./screenshot.png)

## Usage

For example, to create a module in the current working directory:

```sh
$ npx module
```

To create a module in another directory, specify a relative or absolute path:

```sh
$ npx module foo
```

The `--system` flag can be provided to control whether the module system is ESM (the default if flag not specified) or CommonJS:

```sh
$ npx module foo --system esm
```

```sh
$ npx module foo --system cjs
```

And the `--identifier` flag can be provided to control whether the module system is identified by file extension (the default if flag not specified), package.json `type` field, or implicitly from code syntax:

```sh
$ npx module foo --system esm --identifier file-ext
```

```sh
$ npx module foo --system cjs --identifier package-type
```

```sh
$ npx module foo --system esm --identifier syntax
```

To understand these flags better, see [Determining module system](https://nodejs.org/api/packages.html#determining-module-system) in the node.js docs.

---
_Source: https://npm.io/package/module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
