ls-Improved (lsi) is a command-line tool for listing directory structures along with their descriptions. It is particularly useful for managing and accessing experimental results, which can often be buried deep within multiple directories.
Consider a directory structure filled with experimental results. Finding the best result can be cumbersome, often requiring you to open multiple directories or maintain a separate summary file.
With ls-Improved (lsi), you can view the list of directories along with their descriptions in a single command:
Follow these steps to download the latest version of the binary file, extract it, and set up the PATH:
- Visit the GitHub releases page.
- Find the latest version release and download the corresponding binary file in zip format.
- Extract the downloaded zip file. You can use the following command to unzip:
unzip <downloaded-file.zip>
- Place the extracted binary file in an appropriate directory (e.g.,
/usr/local/bin). - Add the directory to your environment variables. Typically, you can do this by adding the following line to your
~/.bashrcor~/.zshrcfile:export PATH=$PATH:/usr/local/bin
- To apply the changes, restart your terminal or run the following command:
source ~/.bashrc # or source ~/.zshrc
Below are the usage details:
lsi [PATH]: Show the directory structure and descriptions of the specifiedPATH(default is"./").lsi -a, --all: Include entries that start with.(hidden files and directories).lsi -f, --only-files: Show only files, not directories.lsi -d, --only-dirs: Show only directories, not files.lsi -c, --config-path <ConfigPath>: Load configuration from the specifiedConfigPath.lsi -n, --line-num <Number>: Limit the description lines to the specifiedNumber.lsi -S, --sort-mode <Mode>: Sort by path (p) or description (d).
lsi -s, --set-description <Description> [PATH]: Write the specifiedDescriptionto the.description.lsifile in the specifiedPATH.lsi -e, --edit-description <Editor> [PATH]: Open the description.description.lsifile in the specifiedEditor(default isvim).
Example command to set a description:
lsi -s "This is a brief description" ./experiments/run1Example command to edit a description using nano:
lsi -e nano ./experiments/run1It is beneficial to add the following aliases to your .bashrc or .zshrc for quicker navigation and usage:
alias clear='clear && lsi ./'
function cdlsi () {
cd "$@" && lsi ./
}
alias cd='cdlsi'Feel free to explore, contribute, and open issues if you encounter any. Happy organizing!


