https://github.com/willmcgugan/terminal-tree
https://github.com/willmcgugan/terminal-tree
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/willmcgugan/terminal-tree
- Owner: willmcgugan
- License: mit
- Created: 2024-09-18T13:40:48.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T17:51:38.000Z (8 months ago)
- Last Synced: 2025-03-29T04:04:49.949Z (3 months ago)
- Language: Python
- Size: 53.7 KB
- Stars: 168
- Watchers: 2
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
An experimental filesystem navigator for the terminal, built with [Textual](https://github.com/textualize/textual)
https://github.com/user-attachments/assets/de4c9bab-4cfa-4295-bd2e-450df855ef0d
This could form the basis of a file manager / picker.
For now, consider it a UI experiment.PS Its a [single file](https://github.com/willmcgugan/terminal-tree/blob/main/tree.py).
## Installing
This project isn't on Pypi or other package manager, but thanks to the sorcery that is [uv](https://docs.astral.sh/uv/guides/tools/) 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.
## Tree navigation

A directory tree that may be navigated by the keyboard or mouse.
## File preview

Some text file-types may be displayed with syntax highlighting in a preview panel.
This preview panel may be maximized from the command palette.
## Path completion and validation

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.
## Path components

You can also click on a path component to navigate to a parent directory.
## No issues please
I don't know is this will become a standalone tool, or be folded back in to [Textual](https://github.com/textualize/textual).
If you are interested in this project, please fork it. let me know if you do anything interesting with it!