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

@conversantech/react-native-package-info-viewer

v1.0.2

Published

View App Package and Build Info

Downloads

192

Readme

React Native Package Info Viewer

npm version license

A robust React Native component to display application version, dependencies, build information (Git commit, branch, author), dynamic configuration values, and Device Information. Perfect for debug menus, QA testing, and "About App" screens.

Table of Contents

Features 🚀

  • 📦 App Info: Displays Version, Version Code, App ID, and Name.
  • 📱 Device Info: Shows Model, OS Version, Battery Level, and IP Address.
  • 🏗 Build Metadata: Git Commit Hash, Branch, Author, and Build Date. (Requires Setup ⚡)
  • 🔧 Config Viewer: Safely displays environment variables with automatic masking.
  • 🧩 Dependency List: Lists all dependencies and devDependencies.
  • 🎨 Fully Customizable: Change colors to match your app's theme.
  • 📤 Share/Copy: Quickly share debug info via WhatsApp, Slack, or Clipboard.
  • 🔘 Debug Button: A handy pre-styled button to trigger the info screen.

Compatibility 📱

This package is designed for modern React Native applications and supports:

| Requirement | Version | |-------------|---------| | React Native | >= 0.60.0 | | React | >= 18.0.0 | | iOS | 12.4+ | | Android | API 21+ |


Installation 💿

npm install @conversantech/react-native-package-info-viewer
# or
yarn add @conversantech/react-native-package-info-viewer

Peer Dependencies

Ensure you have these installed in your project:

yarn add moment react-native-skeleton-placeholder react-native-device-info @react-native-clipboard/clipboard react-native-share react-native-vector-icons

(Don't forget to run npx pod-install or cd ios && pod install for iOS)


Setup (Crucial Step) ⚡

To see accurate Git Commit and Build Date information, this package requires a simple script setup. This script generates a build-info.json file whenever you build your app.

  1. Open your main project's package.json.
  2. ADD or APPEND to the scripts section:
"scripts": {
  "prebuild": "npx generate-build-info",
  ...
}

Now, whenever you run npm run prebuild or add it to your start scripts, it will generate a global/build-info.json file in your root directory.


Usage 🛠

1. The Info Screen (PackageInfo)

This is the main component that displays all the data.

import React from 'react';
import { PackageInfo } from '@conversantech/react-native-package-info-viewer';

// 1. Import your package.json
import packageJson from './package.json';

// 2. Import the generated build-info
let buildInfo = {};
try {
  buildInfo = require('./global/build-info.json');
} catch (e) { console.log("Build info not found"); }

const AboutScreen = ({ navigation }) => {
  return (
    <PackageInfo
      navigation={navigation}
      
      // Data Props
      packageJson={packageJson}
      buildInfo={buildInfo}
      environmentName="STAGING"
      
      // Theme Customization
      primaryColor="#007AFF"
      backgroundColor="#f5f5f5"
      cardBackgroundColor="#ffffff"
      textColor="#333333"
      secondaryTextColor="#666666"

      // Config/Env Variables
      configValues={{
        API_URL: "https://api.dev.com",
        STRIPE_KEY: "sk_test_51Mz...",
      }}
    />
  );
};

export default AboutScreen;

2. The Debug Button (DebugButton)

A pre-styled button to easily navigate to your Info Screen.

import { DebugButton } from '@conversantech/react-native-package-info-viewer';

export default function LoginScreen({ navigation }) {
  return (
    <View>
      <DebugButton 
        visible={__DEV__} 
        onPress={() => navigation.navigate('AboutScreen')}
      />
    </View>
  );
}

Props 📚

PackageInfo

| Prop Name | Type | Default | Description | |-----------|------|---------|-------------| | packageJson | Object | {} | The raw JSON content of your package.json. | | buildInfo | Object | {} | The JSON content of build-info.json. | | configValues | Object | {} | Any key-value pairs (Env vars) you want to display. | | environmentName | String | 'UNKNOWN' | Shows at the top of the Config section. | | primaryColor | Color | '#007AFF' | Color for buttons, links, and highlights. | | backgroundColor | Color | '#f5f5f5' | Main screen background color. | | cardBackgroundColor| Color | '#ffffff' | Background color for info cards. | | textColor | Color | '#333333' | Main text color. | | secondaryTextColor| Color | '#666666' | Secondary/Label text color. |

DebugButton

| Prop Name | Type | Default | Description | |-----------|------|---------|-------------| | visible | Boolean | true | Controls whether the button is rendered. | | onPress | Function | undefined | Callback function when the button is tapped. | | buttonStyle | Style | {} | Custom style for the button container. | | textStyle | Style | {} | Custom style for the button text. |


Created & Maintained By

This package is created and maintained by Conversantech.

License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details. Copyright (c) 2026 Conversantech.