pls is a better ls for developers, pronounced /pliːz/ as in 'please'

Overview

pls on PyPI Python versions GPL-3.0

Demo of `pls`

pls is a better ls for developers. The "p" stands for ("pro" as in "professional"/"programmer") or "prettier".

It works in a manner similar to ls, in that it lists directories and files in a given directory, but it adds many more developer-friendly features.

Note that pls is not a replacement for ls. ls is a tried, tested and trusted tool with lots of features. pls, on the other hand, is a simple tool for people who just want to see the contents of their directories.

Features

pls provides many features over ls command. pls can:

  • show Nerd Font icons or emoji next to files and directories making it easier to grep the output
  • colour output to elevate important files or dim unimportant ones
  • use a more nuanced approach to hidden files than plainly hiding files with a leading dot .
  • group directories and shows them all before files
  • ignore leading dots . and normalise case when sorting files
  • align files names by first character
  • cascade formatting rule specs by based on specificity levels
  • read .pls.yml files from the directory to augment its configuration
  • show more details like permissions, owner and size in columns
  • run quite fast, thanks to multiprocessing

The icon, color and most behaviour in the application can be configured using plain-text YAML files for the pros who prefer to tweak their tools.

Upcoming features

In the future pls will be able to

  • generate visibility rules by parsing .gitignore
  • add MIME type as another method for matching files to specs
  • use complete path based matching for files
  • link files and hide derived files behind the main ones
  • generate tree-like output for subdirectories

If you want to help implement any of these features, feel free to submit a PR. pls is free and open-source software.

Comparison with similar tools

There are a lot of ls replacements. Here are some of the most popular ones.

pls aims to stand out because of some very specific choices.

  • Does not intend to replace ls. pls, as a command, is just as easy to type.
  • Targets a more tech-savvy audience in its features.
  • Intelligently maps file type. Just comparing the file extension would be too generic.
  • Meticulously chosen iconography for the appreciating eyes.
  • Highly customisable at a project level using a simple .pls.yml file.
  • Built in a friendly language, Python. This makes it easy to fork and change it yourself.

Installation

To get the best of pls, install a Nerd Font on your computer. Nerd Fonts come patched with many icons from different popular icon sets. If you're a "pro" (the target audience for pls) these fonts are basically a must.

pls is a pure-Python codebase and is deployed to PyPI. So installing it on any system with a supported Python version is quite straightforward.

$ python3 -m pip install --user pls

There are no native packages yet.

Usage

pls has a very simple API with easy to memorise flags. There are no mandatory arguments. Just run pls anywhere on your disk.

$ pls

There are a few optional arguments and flags you can use to tweak the behaviour. You can see the complete list of arguments and their description by passing the --help or -h flags.

$ pls --help

Directory

The only positional argument is a directory. Pass this to see the contents of a different folder rather than the current working directory.

$ pls path/to/somewhere/else

Icons

pls supports many icons for popular languages out of the box and will show icons by default. If you don't have a Nerd Font (why?), you can switch to emoji icons using --icons emoji or -iemoji. Be warned they are quite bad. If you are a sad person, you turn icons off using --icon none or -inone.

Note: The built-in icon configuration is intentionally lean. The whole idea is for pls to be customisable by you.

Filtering

You can choose to hide files or folders from the output using --no-files and --no-dirs respectively. Passing both will lead to a blank output. On the other hand if you want to see files and directories that pls would not show otherwise, pass --all.

Sorting

By default pls will place all directories first, followed by files with both sorted alphabetically from A to Z. You can prevent folders from being first by passing the --no-dirs-first flag. You can change the sort to go from Z to A using --sort desc or -sdesc. Leading dots are ignored during sorting.

Alignment

A lot of code related files start with a leading dot . for no valid reason. pls by default

  • moves their name left by one character to line up the actual alphabets
  • dims their leading dot

If you don't like this, you can set --no-align to turn off all this behaviour in one swoop.

Details

When you need more infomation about your files, pass the --details flag. This expands the list into a table, with

  • permissions
  • owner name
  • size

added to the output. The permissions are presented as rwx triplets. The size is presented in binary compound-units (the ones with the "i" like "*iB"). You can switch to decimal units by passing --units decimal or -udecimal. This flag has no effect unless the --detail flag is passed too.

Owner
Dhruv Bhanushali
Software Engineer • IIT-R '19
Dhruv Bhanushali
Conditional Transformer Language Model for Controllable Generation

CTRL - A Conditional Transformer Language Model for Controllable Generation Authors: Nitish Shirish Keskar, Bryan McCann, Lav Varshney, Caiming Xiong,

Salesforce 1.7k Jan 05, 2023
A Python module and command-line utility for converting .ANS format ANSI art to HTML

ansipants A Python module and command-line utility for converting .ANS format ANSI art to HTML. Installation pip install ansipants Command-line usage

4 Oct 16, 2022
Simple Tool To Grab Like-Card Coupon

Simple Tool To Grab Like-Card Coupon

Soud 10 Jan 30, 2022
cmdpxl: a totally practical command-line image editor

cmdpxl: a totally practical command-line image editor

Jieruei Chang 476 Jan 07, 2023
Get Air Quality Index for your city/country 😷

Air Quality Index CLI Get Air Quality index for your City. Installation $ pip install air-quality-cli Contents Air Quality Index CLI Installation Cont

Yankee 40 Oct 21, 2022
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
A **CLI** folder organizer written in Python.

Fsorter Introduction A CLI folder organizer written in Python. Dependencies Before installing, install the following dependencies: Ubuntu/Debain Based

1 Nov 17, 2021
A dec-bin converter uses 2's complement.

2's Complement Dec-Bin Converter A dec-bin converter uses 2's complement. Visit my Medium Post. What is 2's complement? Two's complement is the most c

C.H Jacky 9 Mar 01, 2022
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Phil Wang 4.4k Jan 09, 2023
CmdTube is a Python CLI library for searching, downloading, and watching YouTube tutorials

CmdTube is a Python CLI library for searching, downloading, and watching YouTube tutorials. This library was made with programmers in mind and it's dedicated to every programmer who watches YouTube v

Samuel Ayomide Ogunleke 2 Aug 22, 2022
Simple subcommand CLIs with argparse

multicommand Simple subcommand CLIs with argparse. multicommand uses only the standard library and is ~150 lines of code (modulo comments and whitespa

Andrew Ross 10 Aug 01, 2022
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.

parse_it A python library for parsing multiple types of config files, envvars and command line arguments that takes the headache out of setting app co

Naor Livne 97 Oct 22, 2022
Play Wordle Bot - Wordle Bot written in python

Wordle Bot A Bot written in python with a CL Interface to guess adn solve Wordle

Prashant 1 Feb 25, 2022
🐍 Python CLI tool to get public information from a GitHub account

🐍 Gitter 🐍 Python CLI tool to get public information from a GitHub account 🤔 What's this? Gitter is a open-source project created to easily uses th

opp? 3 Oct 14, 2022
A project designed to make taking notes easier than ever - by doing it all on command line

A project designed to make taking notes easier than ever - by doing it all on command line! Yes, all of your files are easily accessible through one command interface, and can be written to at any ti

1 Dec 10, 2021
dcargs is a tool for generating portable, reusable, and strongly typed CLI interfaces from dataclass definitions.

dcargs is a tool for generating portable, reusable, and strongly typed CLI interfaces from dataclass definitions.

Brent Yi 119 Jan 09, 2023
Todo list console based application. Todo's save to a seperate file.

Todo list console based application. Todo's save to a seperate file.

1 Dec 24, 2021
⚙ A lightweight command line interface library for creating commands.

⚙ A lightweight command line interface library for creating cli commands. About | Installation | Usage | Features | Contributors | License About Next:

Serum 16 Sep 25, 2022
Simple CLI interface for linear task manager

Linear CLI (Unmaintained) Simple CLI interface for linear task manager Usage Install: pip install linearcli Setup: Generate a pe

Mike Lyons 1 Jan 07, 2022
A terminal utility to sort image files based on their characteristics.

About A terminal utility to sort image files based on their characteristics. Motivation This program was developed after I've realized that I had too

José Ferreira 1 Dec 10, 2022