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

mk-component-cli

v1.1.2

Published

CLI to create React JSX/TSX + modular CSS SASS, Fill them with a basic component structure. From a given name or list (For multiple Files)

Readme

MK Component CLI

Just a simple CLI tool to create base Components for React in batch.

Installation

npm i mk-components-cli --dev

You'll need to use npx to run the commands if install locally.

or, my prefered way. (no npx needed)

npm i -g mk-components-cli


Quick Start

there are three basic commands.

  • mk-config -> Deal with global configuration
  • mktsx -> Creates Typescript files
  • mkjsx -> Creates Javascript files

For all three try to run -h for more insights on what they do and the options they offer.



mk-config

For inline documentaion

mk-config -h

-current or -c -> Displays your current settings

mk-config -current
mk-config -c

-set-option -> Change Your settings.

This command takes 2 arguments that will be read as key and value. You just need to type them (no need to use {}). Ex:

mk-config -set-option css false

That will not create CSS files when you use mktsx or mkjsx.


Editing your config at the source

The following command will give you the source of your config file:

mk-config -path
mk-config -p

You can edit it manually. Just be aware of the options you're adding or the CLI will behave on a unexpectedly way. The accepted options are:

functionType = 'arrow' | 'function';
exportType = 'named' | 'default';
css = boolean;
cssModular = boolean;
cssType = 'scss' | 'css';
cssAlias = 'Any string that makes sense as css alias';

mktsx & mkjsx

Create Components files with respective CSS and a link to it. This CLI follows React best practices. For each component listed it'll create a folder and inside it a jsx and css files.

Consider the config below

{
    functionType: 'arrow',
    exportType: 'named',
    css: true,
    cssModular: true,
    cssType: 'scss',
    cssAlias: 'ss'
}

If you run

mktsx Nav Footer Sidebar

It'll create the following files/structure

.
├── Footer
│   ├── Footer.module.scss
│   └── Footer.tsx
├── Nav
│   ├── Nav.module.scss
│   └── Nav.tsx
└── Sidebar
    ├── Sidebar.module.scss
    └── Sidebar.tsx

The css files will be empty. But the components files are filled with a basic structure for a component. Also respecting the configurations. On this case it'll be:

import ss from './Nav.modular.scss';

export const Nav: React.FC = () => {
    return (
        <div className={ss.container}>
            Component
        </div>
    );
};

A different Config

{
    functionType: 'function',
    exportType: 'default',
    css: true,
    cssModular: false,
    cssType: 'css',
    cssAlias: 'style'
}

If you run:

mktsx Nav Footer Sidebar

That will give you the following.

.
├── Footer
│   ├── Footer.css
│   └── Footer.jsx
├── Nav
│   ├── Nav.css
│   └── Nav.jsx
└── Sidebar
    ├── Sidebar.css
    └── Sidebar.jsx

With your component being.

import "./Nav.css";

function Nav() {
    return (
        <div className="">
            Nav
        </div>
    );
};

export default Nav;

Thoughts

Want to collaborate on this project ? Any ideas or bug to report? Send me a PM, open a issue or pull request :D