Skip to content

πŸ“‚ HMSC (How Much Stuff CLI) analyst for your files and folders

License

Notifications You must be signed in to change notification settings

Abdullah-V/HMSC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HMSC

node javascript npm version license

πŸ”° About

HMSC (How Much Stuffs CLI) analyst for your files and folders. With HMSC you can see count of folders, count of files, file extensions, size of the files, etc. inside a folder.

πŸ“Έ Screenshot

screenshot

πŸ““ Requirements

πŸ”Œ Installation

$ npm i -g hmsc

⚑ Usage

πŸ“‚ Example directory structure

C:.
|   sampleFile1.js
|   sampleFile2.js
|   sampleFile3.py
|
+---onlyFiles
|       file1.js
|       file2.js
|       file3.py
|
+---onlyFolder
|   +---subFolder1
|   |   \---subSubFolder11
|   \---subFolder2
|       \---subSubFolder21
\---sampleFolder
    |   subFile1.js
    |   subFile2.py
    |
    +---subFolder1
    |       subFile1.js
    |
    \---subFolder2
            subFile1.js

--path

Give an absolute or relative path. If path is folder path, the number of folders, lines and files is shown. if file path, shows number of lines. You can multiple this.

Examples:

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\"

πŸ“‚ 9 folder;

πŸ“„ 33 line in 10 file;

Total size of files: 0.00033760 MB

2 file extensions: .js .py;

30 line (90.91% of total lines) on 7 .js file (70.00% of all files), Size: 0.00033760 MB (100.00% of total size)

3 line (9.09% of total lines) on 3 .py file (30.00% of all files), Size: 0.00000000 MB (0.00% of total size)

⭐ inside C:\\Users\\Abdullah\\Desktop\\testForHMS\\




$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\sampleFile1.js"

πŸ“„ 17 line in C:\\Users\\Abdullah\\Desktop\\testForHMS\\sampleFile1.js file; Size: 0.00020695 MB




$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\adasdsasd"

❌  No such file or directory: C:\Users\Abdullah\Desktop\testForHMS\adasdsasd




$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\" --path "C:\Users\Abdullah\Desktop\testForHMS\sampleFile1.js"

πŸ“‚ 4 folder;

πŸ“„ 17 line in 1 file;

Total size of files: 0.00020695 MB

1 file extensions: .js;

17 line (100.00% of total lines) on 1 .js file (100.00% of all files), Size: 0.00020695 MB (100.00% of total size)

⭐ inside C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\,C:\Users\Abdullah\Desktop\testForHMS\sampleFile1.js

--exclude

Folders or files you wanted to be excluded, give the relative or absolute path. You can multiple this.

Examples:

$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\"

πŸ“‚ 4 folder;

πŸ“„ 33 line in 10 file;

Total size of files: 0.00033760 MB

2 file extensions: .js .py;

30 line (90.91% of total lines) on 7 .js file (70.00% of all files), Size: 0.00033760 MB (100.00% of total size)

3 line (9.09% of total lines) on 3 .py file (30.00% of all files), Size: 0.00000000 MB (0.00% of total size)

⭐ inside C:\Users\Abdullah\Desktop\testForHMS\




$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFiles\"

πŸ“‚ 3 folder;

πŸ“„ 30 line in 7 file;

Total size of files: 0.00033760 MB

2 file extensions: .js .py;

28 line (93.33% of total lines) on 5 .js file (71.43% of all files), Size: 0.00033760 MB (100.00% of total size)

2 line (6.67% of total lines) on 2 .py file (28.57% of all files), Size: 0.00000000 MB (0.00% of total size)

⭐ inside C:\Users\Abdullah\Desktop\testForHMS\




$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\onlyFiles\" --path "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\subFolder1\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFiles\file1.js"

πŸ“‚ 3 folder;

πŸ“„ 2 line in 2 file;

Total size of files: 0.00000000 MB

2 file extensions: .js .py;

1 line (50.00% of total lines) on 1 .js file (50.00% of all files), Size: 0.00000000 MB (NaN% of total size)

1 line (50.00% of total lines) on 1 .py file (50.00% of all files), Size: 0.00000000 MB (NaN% of total size)

⭐ inside C:\Users\Abdullah\Desktop\testForHMS\onlyFiles\,C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\

--table

If given, output shown as table

Examples:

$ hmsc --path "C:\Users\Abdullah\Desktop\testForHMS\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFolder\" --exclude "C:\Users\Abdullah\Desktop\testForHMS\onlyFiles\" --table

πŸ“‚ 3 folder;

πŸ“„ 30 line in 7 file;

Total size of files: 0.00033760 MB

2 file extensions: .js .py;

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ File extension β”‚          Count of files β”‚               Line Count β”‚                                 Size β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚            .js β”‚ 5 (71.43% of all files) β”‚ 28 (93.33% of all lines) β”‚ 0.00033760MB (100.00% of total size) β”‚
β”‚            .py β”‚ 2 (28.57% of all files) β”‚   2 (6.67% of all lines) β”‚   0.00000000MB (0.00% of total size) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⭐ inside C:\Users\Abdullah\Desktop\testForHMS\

--exclude-hidden-files

Exclude hidden files

Example:

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\" --exclude-hidden-files

--exclude-hidden-folders

Exclude hidden folders

Example:

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\" --exclude-hidden-folders

--exclude-all-hiddens

Exclude hidden files and folders

Example:

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\" --exclude-all-hiddens

--sort-by <key>

Sort output by <key>

available keys: count, lineCount, size

NOTE: Sorting is ascending by default. For descending sorting use --desc option

Example:

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\" --table --sort-by "count"

$ hmsc --path "C:\\Users\\Abdullah\\Desktop\\testForHMS\\" --table --sort-by "size" --desc

βš–οΈ License

MIT LICENSE

About

πŸ“‚ HMSC (How Much Stuff CLI) analyst for your files and folders

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published