dex is a lightweight and fast command-line tool written in C to recursively display a directory tree. It supports sorting, filtering, and dotfile visibility — ideal for terminal users who want a simple and scriptable file-tree viewer.
git clone https://github.com/yourusername/dex.git
cd dex
cmake -B build
cmake --build build
cmake --install build- Installs the
dexbinary to/usr/local/bin/dexby default.
make -C build uninstall- Removes the binary from your system.
dex [options] <directory>- If
<directory>is omitted, dex defaults to the current directory (.). - Flags can appear in any order.
- You may use
-p <dir>or--path <dir>to explicitly specify the path.
| Option | Description |
|---|---|
-h, --help |
Show help/manual. |
-d, --show-dotfiles |
Include dotfiles (files starting with .) in the output. |
--sort=alpha |
Sort entries alphabetically (default). |
--sort=size |
Sort directories by total size recursively. |
--ignore <name> [...] |
Ignore one or more files or directories by name. Supports multiple args. |
-p <dir>, --path <dir> |
Explicitly specify the directory path to explore. |
Note: If both
--ignoreand a path are provided, the last non-option argument is treated as the path.
dexShow directory tree of the current folder.
dex --sort=size -dInclude dotfiles and sort by size.
dex --ignore build .gitIgnore the
buildand.gitdirectories.
dex --path ~/projectsExplore a specific directory.
dexuses POSIX-compliant file and directory functions.- It is written in modular C with a strict 1:1
.c↔.hstructure. - The CLI help output is generated from
Documentation/manual.txt, allowing easy edits without recompiling.
- GCC or Clang
- CMake ≥ 3.12
- Linux (tested on Arch Linux)
This project is licensed under the MIT License.
Written by Aviral Dubey — designed to be simple, efficient, and extensible. Inspired by Unix tools like tree, ls, and exa.
Pull requests and suggestions are welcome!
- Clean installation/uninstallation instructions
- Full usage section with flag breakdown
- Minimalist tone, suitable for open-source audiences
- Ready to drop into GitHub with no edits needed except username