1.0.2 • Published 1 year ago

handy-cmd v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

About

A CMD-like app that you can use to run popular and simple filesystem commands through writing to a specific text file of your choice.

Available Commands to Use

Create a file

CREATE FILE ./path/to/file;

Delete a file

DELETE FILE ./path/to/file;

Create a folder

CREATE FOLDER ./path/to/file;

Delete a folder

DELETE FOLDER ./path/to/file;

Delete a file or folder (similar to rm -rf)

DELETE ./path/to/folder (or ./path/to/file);

Append to a file

APPEND TO ./path/to/file THIS CONTENT: "...";

Write to a file

WRITE TO ./path/to/file THIS CONTENT: "...";

Rename a file/folder

RENAME ./oldPath TO ./newPath;

Precautions

  • every command must end with a semi-color (\;) to distinguish the content of it.
  • every command is case-sensitive. so you must follow the command pattern as described.
  • you can add as many commands as possible in the file in one change but, take into consideration that the commands will not run sequentially as defined.

    it is recommended to use each command at a time to avoid any strange output.

Get Started

Option 1: Clone the repository

git clone https://github.com/Sohila-Hashem/HandyCmd.git

Option 2: Install the npm package

npm i handy-cmd --save-dev

Usage Instructions

  • after setting up the project, make sure to create a text file in the root directory with the name of your choice.
  • import/require the main function then pass the path to the created text file.

Tech Stack

Node.js/Javascript

dependencies

Chalk npm package to print colorful logging messages

devDependencies

mocha testing framework

chai mocha assertion library

nodemon package for automatic restarts

sinon library for creating more detailed unit testing

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago