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

@avistech/reactsmith

v1.0.0

Published

Forge React 19 components with tests from your terminal. Zero dependencies.

Readme

reactsmith

npm version CI license node

Forge React 19 components with tests from your terminal. Zero dependencies.

npx @avistech/reactsmith Button
src/components/Button/
├── Button.jsx
├── Button.test.jsx
└── index.js

Features

  • One command, one folder with the component, its test and an index barrel
  • React 19 ready: no import React, plain function components, ref as a normal prop
  • Auto-detects TypeScript (tsconfig.json) and your test runner (Vitest or Jest)
  • React Testing Library tests that pass out of the box
  • Several components at once: rcc Header Footer Sidebar
  • Safe by default: never overwrites an existing folder unless you pass --force
  • Zero dependencies, Node 18+

Installation

Run without installing:

npx @avistech/reactsmith Button

Or install as a dev dependency so the whole team gets the same version:

npm install --save-dev @avistech/reactsmith
npx rcc Button

Or install globally:

npm install -g @avistech/reactsmith
rcc Button        # short alias
reactsmith Button # full name

Usage

rcc <ComponentName...> [options]

| Option | Description | Default | |---|---|---| | --path <dir> | Folder to create components in | src/components | | --ts / --js | Force TSX or JSX output | auto (looks for tsconfig.json) | | --css | Add a CSS module (Name.module.css) | off | | --no-index | Skip the index barrel file | off | | --runner <vitest\|jest> | Test runner to write imports for | auto (reads package.json) | | --force | Overwrite an existing component folder | off | | -v, --version | Print the version | | | -h, --help | Show help | |

Examples

rcc Button                                  # src/components/Button
rcc user-card                               # names become PascalCase: UserCard
rcc Header Footer --css                     # two components, each with a CSS module
rcc ProfileCard --path src/features/profile # custom location
rcc Modal --ts                              # force TypeScript

Tip: add a script to your app's package.json:

{
  "scripts": {
    "g": "rcc"
  }
}

Then run npm run g Button.

Generated output

Button.jsx

export default function Button({ children }) {
  return (
    <div data-testid="button">
      {children ?? 'Button component'}
    </div>
  );
}

Button.test.jsx (Vitest)

import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import Button from './Button';

describe('Button', () => {
  it('renders without crashing', () => {
    render(<Button />);
    expect(screen.getByTestId('button')).toBeInTheDocument();
  });

  it('renders children', () => {
    render(<Button>Hello</Button>);
    expect(screen.getByText('Hello')).toBeInTheDocument();
  });
});

Test setup in your app (one time)

The generated tests use React Testing Library. With Vite + Vitest:

npm install -D vitest jsdom @testing-library/react @testing-library/jest-dom

vite.config.js

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  test: {
    environment: 'jsdom',
    globals: true,
    setupFiles: './src/setupTests.js',
  },
});

src/setupTests.js

import '@testing-library/jest-dom/vitest';

Contributing

Issues and pull requests are welcome.

git clone https://github.com/avistech/reactsmith.git
cd reactsmith
npm test
npm link   # try your local copy as `rcc` in any project

Templates live in templates/index.js. Each export is a function that returns one file's contents.

License

MIT © avistech