npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rn-turbo-generator

v0.1.5

Published

A CLI to scaffold React Native TurboModules with codegen-ready structure

Readme

🚀 TurboModule Generator CLI for React Native

A tiny CLI that creates the basic file structure for a React Native TurboModule. You answer a few questions, and the tool scaffolds everything you need to get started.

No heavy logic. No opinions. Just clean TurboModule bones 🦴 that you can flesh out your own way.


✨ What this package does

  • Asks you a few simple questions in the terminal

  • Generates:

    • TurboModule spec file
    • Android native module boilerplate
    • Package + registration files
  • Creates dummy methods only

  • Leaves full control to you to customize logic later

Think of it as a TurboModule starter kit 🧰


📦 Installation

npm install -g rn-turbo-generator

or

npx rn-turbo-generator

🧠 Questions you’ll answer

When you run the CLI, you’ll be prompted with:

TurboModule name (PascalCase)
Default method name
Platform support (android / ios / both)
Android package name (e.g. com.example.app)

Example answers 👇

Module Name: NativeLocalStorage
Method Name: clear
Platform: android
Package Name: com.nativelocalstorage

🗂️ What gets generated

After answering the questions, the CLI creates:

  • /turbo-modules folder with TurboModule spec
  • Android native module files
  • Android package class
  • Basic dummy method implementation

⚠️ Important This tool does not write business logic. It only creates structure so you can move fast 🏃‍♂️💨


🧩 Required manual step (Very important)

You must add codegenConfig to your package.json.

📍 Place it just before the dependencies key

"codegenConfig": {
  "name": "RnTurboModules",
  "type": "modules",
  "jsSrcsDir": "src/turbo-modules",
  "android": {
    "javaPackageName": "com.YOUR_PACKAGE_NAME"
  }
}

This tells React Native how to generate native bindings 🧬


⚙️ Generate codegen artifacts

Run the following commands:

cd android
./gradlew generateCodegenArtifactsFromSchema

This step generates all required TurboModule bindings automatically ⚡


🧩 Register the package (Android)

Open MainApplication.kt and add your package manually:

PackageList(this).packages.apply {
  // Packages that cannot be autolinked yet can be added manually here
  add(NativeLocalStoragePackage())
}

📌 The package file is already generated 📌 You only need to register it


🧪 Using the TurboModule in your app

Now you can import and use your TurboModule:

import NativeLocalStorage from './turbo-modules/NativeLocalStorage';

NativeLocalStorage?.clear();

🎉 That’s it. Your TurboModule is alive.


🛠 What you should do next

  • Replace dummy methods with real logic
  • Add more methods to the spec file
  • Implement native logic in Android / iOS
  • Ship blazing fast native features 🚀

🧠 Notes

  • Works only with New Architecture enabled
  • Designed for TurboModules
  • Android-first, iOS optional
  • Clean structure, zero lock-in

💡 Philosophy

“Scaffold fast, customize freely.”

This tool builds the runway. You decide how high the plane flies ✈️


Developed by Mohan Gupta ❤️␠␠
Happy hacking 💙␠␠
If TurboModules were LEGO, this would be the base plate 🧱❤️