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 🙏

© 2024 – Pkg Stats / Ryan Hefner

kwik-file-create

v1.0.2

Published

This is a cli tool to create and delete many files quickly using the terminal.

Downloads

4

Readme

kwik-file-create

This is a cli tool to create and delete many files quickly and easily using the terminal.

Installation

npm install -g kwik-file-create

Usage

There are 2 commands you can use.

The first one is:

kfc create <string>: This command accepts a path to a parent directory in which the sub files will be created. In case the path provided doesn't exist, it automatically creates it. Once you run this command, you will be prompted to enter the name of the files which you want to create. Once you are done, you can end the prompting process by typing END

For example:

kfc create ./public

Please start entering the names of the files one at a time, for example: index.html. Once you are done, type END and hit Enter.
? Enter name of the file:  octopus.txt
? Enter name of the file:  fish.txt
? Enter name of the file:  whales.txt
? Enter name of the file:  sharks.txt
? Enter name of the file:  END

Successfully created your files!

Note that here we are creating multiple files of the same extension, i.e, .txt. You can skip adding the same extension to every file name by making use of the -e or --extension flag, like this:

kfc create ./public --extension .txt

Please start entering the names of the files one at a time, for example: index.html. Once you are done, type END and hit Enter.
? Enter name of the file:  octopus
? Enter name of the file:  fish
? Enter name of the file:  whales
? Enter name of the file:  sharks
? Enter name of the file:  END

Successfully created your files!

If you want to create directories/folders instead of files, you can make use of the -d or --directory flag, like this:

kfc create ./greetings --directory

Please start entering the names of the folders one at a time, for example: controllers. Once you are done, type END and hit Enter.
? Enter name of the folder:  namaste
? Enter name of the folder:  namaskaram
? Enter name of the folder:  hola
? Enter name of the folder:  hello/hii
? Enter name of the folder:  hello/world
? Enter name of the folder:  END

Successfully created your folders!

This is what the ./greetings folder looks like:

ls ./greetings

hello  hola  namaskaram  namaste

ls ./greetings/hello

hii  world

The second command is:

kfc remove <string>: This command accepts a path to a parent directory from which files and directories will be deleted. Once you have entered the path, it lists down all the files and folders present there. To navigate to the files, use the arrow keys and select them by pressing the spacebar. Once you have selected the files and directories which are to be deleted, press Enter.

kfc remove ./greetings

? Select the files/directories you want to delete: (Press <space> to select, <a>
to toggle all, <i> to invert selection, and <enter> to proceed)
❯◯ hello (directory)
 ◯ hola (directory)
 ◯ namaskaram (directory)
 ◯ namaste (directory)

# After selecting and pressing enter:

? Select the files/directories you want to delete: hello (directory), hola
(directory)
? The selected files/directories will be deleted. Go ahead? (Y/n) yes

Here we are deleting the hello and hola directory which lie inside ./greetings. This is what the ./greetings folder looks like:

ls ./greetings

namaskaram  namaste

Connect With Me

If you found this package helpful, do give it a star on GitHub. You can connect with me on Twitter/X - @Krish4856