CLI tool to generate React Native Nitro Modules templates
npm install create-nitro-libA command-line tool to generate React Native Nitro Modules templates quickly and consistently, following industry best practices and modern tooling.
Create a new Nitro module project:
``bash`
bunx create-nitro-lib my-module
With options:
`bash`
bunx create-nitro-lib my-module --skip-install
- š Interactive project setup
- š¦ Complete project structure generation
- š§ TypeScript support out of the box
- š± Example app included
- šļø Android and iOS native code structure
- š Ready-to-use configuration files
The generated project includes:
``
react-native-my-module/
āāā package/ # The nitro module package
ā āāā src/ # TypeScript source code with specs
ā āāā android/ # Android native implementation
ā āāā ios/ # iOS native implementation
ā āāā cpp/ # C++ shared implementation
ā āāā nitro.json # Nitro configuration
āāā example/ # Expo example app
āāā scripts/ # Build scripts
āāā package.json # Workspace configuration
āāā tsconfig.json
āāā README.md
To work on this CLI tool:
`bash`
git clone
cd nitro-lib-template-cli
bun install
bun run build
bun link
Then you can test it locally:
`bash`
create-nitro-lib test-module
- bun run build - Build the CLIbun run dev
- - Run in development modebun run test
- - Test the CLI by generating a projectbun run publish:npm
- - Publish to NPMbun run publish:dry
- - Dry run to see what will be published
When you're ready to publish:
`bashTest everything works
bun run test
MIT