cool-ls
TypeScript icon, indicating that this package has built-in type declarations

0.1.18 • Public • Published

License GitHub contributors GitHub last commit (by committer) GitHub top language GitHub issues npm type definitions GitHub stars Maintenance GitHub followers

cool-ls

cool-ls is a simple console utility designed to display a list of files. Upon installation, it adds the l command to the system, which shows a list of files and directories with sizes in a tree-like view, and provides the ability to search using regular expressions.

Features

  • List files and directories within a specified path.
  • Convenient replacements for common ls options.
  • Filter files by regular expressions or search strings.
  • Display directory sizes, subdirectories, and file trees.
  • Customizable tree depth.
  • Easy-to-use command-line interface.

Installation

To install the cool-ls, you can use NPM. Open your terminal or command prompt and run:

npm install -g cool-ls

Examples

List

l /

Screenshot

Tree

l --exclude 'node_modules|.git|dist' --tree --depth 2 --size

Screenshot

Search

l --find .ts --exclude .d.ts

l --reg '\.ts'

Screenshot

Tree search

l --find .ts --exclude .d.ts --tree

Screenshot

Absolute paths

l /etc --abs --reg 'net' --tree

Screenshot

Usage

You can use the l command followed by various options and a directory path to utilize the utility. Here are some examples:

Usage: l [options] [path]

A user-friendly alternative for the standard "ls" command.

Arguments:
  path                    Directory path

Options:
  -V, --version           output the version number
  -s, --size              Display directory sizes (default: false)
  -r, --reg [string]      Filter filenames using a regular expression
  -t, --tree              Display subdirectories and files in a tree structure (default: false)
  -f, --find [string]     Search for files using a search string
  -p, --plain             Displays files in a flat list, showing the full relative path (default: false)
  -d, --depth [number]    Limit the depth of the displayed tree
  -e, --exclude [string]  Exclude files matching the given regular expression
  -a, --abs               Show absolute paths
  -h, --help              display help for command

Package Sidebar

Install

npm i cool-ls

Weekly Downloads

3

Version

0.1.18

License

MIT

Unpacked Size

42.1 kB

Total Files

89

Last publish

Collaborators

  • teniryte