Skip to main content

Creating a Nitro Module

This guide will walk you through creating a Nitro Module with and without an example app, as well as specifying a directory.

With example app

To create a Nitro Module along with an example app, use the following command. This will generate a new module and an example app to help you get started quickly.

bun create nitro-module@latest my-awesome-module

Without example app

If you prefer to create a Nitro Module without an example app, use the following command. This will generate only the module, without any additional example app.

bun create nitro-module@latest my-awesome-module --skip-example

The --skip-example flag indicates that the example app should be skipped.

Specifying a directory

If you prefer to create a Nitro Module within a specific directory, use the following command:

bun create nitro-module@latest my-awesome-module --module-dir packages

This command will create a Nitro Module within the packages directory as shown in the example above.