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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nim-redux-cli

v1.1.0

Published

nim-redux-cli is a simple tool to set up a Redux project with RTK Query and React Router. It provides a quick and easy way to get started with a Redux setup for your project. It also includes a simple setup for a basic React Native project.

Readme

nim-redux-cli

⚡ A powerful CLI tool to quickly set up Redux with either RTK Query or traditional reducers for React, Next.js, React Native, and Expo projects.


🔧 What does it do?

This CLI automatically:

  • Detects your project type (React, Next.js, React Native, or Expo)
  • Asks you to choose between RTK Query or a Normal Reducer setup
  • Creates all necessary Redux folder structure and files
  • Injects the Redux <Provider> into the correct app entry point
  • Installs all required dependencies
  • Includes optional auth mutation setup for RTK Query

📦 Installation

Install globally via npm:

npm install -g nim-redux-cli

Or use it directly without installing globally:

npm install nim-redux-cli
npx nim-redux-cli

🚀 Getting Started

First, create your project using your preferred framework:

npx create-react-app my-app
# or
npx create-next-app my-app
# or
npx create-expo-app my-app
# or
npx @react-native-community init my-app

Then, navigate to your project folder:

cd my-app

Run the tool:

npx nim-redux-cli

You’ll be prompted to choose a Redux setup type:

  • RTK Query
  • Normal Reducer

Based on your selection, it will generate the required structure and logic.


🧱 File Structure Generated

Depending on your choice, this tool will create files like:

For RTK Query:

src/
  redux/
    store.js
    service/
      backendApi.js
      authSlice.js
  utils/
    constant.js
  lib/
    axios.js

For Normal Reducer:

src/
  redux/
    store.js
    slices/
      authSlice.js

Additionally, the tool will wrap your app with the Redux <Provider> in the correct entry file:

  • React: src/main.jsx or src/main.js or src/main.tsx
  • Next.js: app/layout.jsx or pages/_app.js or pages/_app.tsx
  • React Native: App.js or App.tsx or App.jsx
  • Expo: app/_layout.js or app/_layout.jsx or app/_layout.tsx

📦 Dependencies Installed Automatically

  • @reduxjs/toolkit
  • react-redux
  • axios (for RTK Query setup)

🧪 Example Output

npx nim-redux-cli
? Choose Redux setup: (Use arrow keys)
❯ RTK Query
  Normal Reducer

📁 Created directory: /your-project/src/redux
📄 Created file: /your-project/src/redux/store.js
📄 Created file: /your-project/src/redux/service/backendApi.js
📄 Created file: /your-project/src/redux/service/authSlice.js
📄 Created file: /your-project/src/utils/constant.js
📄 Created file: /your-project/src/lib/axios.js
🧵 <Provider> wrapped in /your-project/App.js
✅ RTK Query setup complete for react-native project.
👨‍💻 Thanks for using this tool and to the creators of the tool. Have a great day!
🌐 Visit my website: https://www.zaynmiraj.com

💡 Tips

  • You can rerun this command if you want to switch between RTK and Reducer setup (but be cautious of overwriting existing files).
  • Works best in a clean/new project scaffolded with Create React App, Next.js, React Native, or Expo.

🙏 Credits

Built by ZaYn Miraj
CLI Creator: @zaynmiraj


🪪 License

MIT License Copyright (c) 2025 ZaYn Miraj