An experimental filesystem navigator for the terminal, built with Textual
terminal-tree-demo.mp4
This could form the basis of a file manager / picker. For now, consider it a UI experiment.
PS Its a single file.
This project isn't on Pypi or other package manager, but thanks to the sorcery that is uv you can try it out with the following command:
uvx --from git+https://github.com/willmcgugan/terminal-tree.git --python 3.12 -q terminal-tree
Tested in macOS only at this point. Chances are very high it works on Linux. Slightly lower chance (but non-zero) that it works on Windows.
A directory tree that may be navigated by the keyboard or mouse.
Some text file-types may be displayed with syntax highlighting in a preview panel.
This preview panel may be maximized from the command palette.
Hit g
to edit the current path.
The path will auto-complete as you type. Press right
to accept the auto-completion.
The path is also validated as you type. Invalid (non directory) paths are highlighted in red, or green if it is a valid path.
You can also click on a path component to navigate to a parent directory.
I don't know is this will become a standalone tool, or be folded back in to Textual.
If you are interested in this project, please fork it. let me know if you do anything interesting with it!