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

hotwire-native-dev-tools

v0.3.1

Published

Dev Tools for Hotwire Native

Downloads

606

Readme

hotwire_native_dev_tools_preview

Hotwire Native Dev Tools aims to support the development process of Hotwire Native apps by providing a set of tools to inspect and debug the app.

  • 🔍 Inspect the bridge communication and native stack
  • 🪵 View console logs right in the mobile app
  • ⚠️ Detect common Turbo issues
  • 📦 No dependencies

Installation

npm install hotwire-native-dev-tools

or

yarn add hotwire-native-dev-tools

Usage (JS)

Basic usage:

import { setupDevTools } from 'hotwire-native-dev-tools';
setupDevTools();

However, since you probably want to use the dev tools only during mobile app development, the recommended approach is to create a custom entrypoint that you load only when needed:

Example Rails + Vite:

// app/javascript/entrypoints/hotwire_native_dev_tools.js

import { setupDevTools } from 'hotwire-native-dev-tools';
setupDevTools();
// layout/application.html.erb

<head>
  <%= vite_javascript_tag "hotwire_native_dev_tools" if Rails.env.development? && hotwire_native_app? %>
</head>

Tip: Place the vite_javascript_tag early to capture all console logs and messages. This way, you'll minimize the chances of missing console logs or bridge messages that are sent before the dev tools are initialized.


Example Rails + Importmap:

pin "hotwire-native-dev-tools"
pin "dev-tools", preload: false
// app/javascript/dev-tools.js

import { setupDevTools } from 'hotwire-native-dev-tools';
setupDevTools();
// layout/application.html.erb

<head>
  <%= javascript_importmap_tags %>
  <%= javascript_import_module_tag "dev-tools" if Rails.env.development? && hotwire_native_app? %>
</head>

Alternatively, if you prefer not to create a custom entrypoint, you can use a JavaScript condition to determine whether the dev tools should be loaded:

import { setupDevTools } from 'hotwire-native-dev-tools';
const isDev = process.env.NODE_ENV === 'development';
setupDevTools({
  enabled: isDev,
});

Please note that your JS condition may vary depending on your setup and needs.
The downside of this approach is that you ship the JS code of the dev tools to the client, even if the client is not in development mode.
This dev tools package is quite small (~15kb), but if you want to avoid shipping unnecessary code to the client, you should use the custom entrypoint approach.

Usage (Native)

Some features, such as the Native Stack and PathConfiguration properties, are only available if you add the dev tool bridge components to your app:

iOS

  1. Copy the Swift file DevToolsComponent.swift into your Xcode project
  2. Register the component
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        Hotwire.registerBridgeComponents([
+            DevToolsComponent.self
        ])
        return true
    }
}

Android

  1. Copy the Kotlin file DevToolsComponent.kt into your Android Studio project
  2. Update the package names where the comments say // Replace with your package name
  3. Register the component
+ import replace.with.your.package.name.DevToolsComponent

class DemoApplication : Application() {
    override fun onCreate() {
        super.onCreate()

        Hotwire.registerBridgeComponents(
+            BridgeComponentFactory("dev-tools", ::DevToolsComponent),
        )
    }
}

Development

  • Fork the project locally
  • npm install
  • npm run dev

Setting Up the Package Locally
One way to link the package locally is to use yarn link.
This allows you to develop the package and test it in another project.

In the root of this project run:

yarn link

In the project you want to use the package run:

yarn link hotwire-native-dev-tools

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/leonvogt/hotwire-native-dev-tools.
Any contributions, whether it's a bug fix, a new feature, or just a suggestion for improvement, are most welcome.