The tree
command, but interactive - a terminal filesystem navigator.
demo.mp4
- Interactive Navigation - Navigate with arrow keys or vim-style controls (j/k/gg/G)
- Instant File Opening - Press Enter to open with default applications
- Configurable Depth - See as much or as little as you want
- Cross-Platform - Works on macOS, Linux and WSL
- Zero Dependencies - Single binary, no installation complexity
# View current directory
dtree
# View specific directory
dtree /path/to/project
# Expand 3 levels deep
dtree --depth 3 .
# Usage
dtree -h
curl -sSL https://raw.githubusercontent.com/C0ldSmi1e/dtree/main/install.sh -o dtree_install.sh && bash dtree_install.sh && rm dtree_install.sh
go install github.com/C0ldSmi1e/dtree@latest
git clone https://github.com/C0ldSmi1e/dtree.git
cd dtree
go build -o dtree
Key | Action |
---|---|
โ/โ or j/k |
Navigate up/down |
Ctrl+U/D |
Jump half-screen up/down |
Ctrl+B/F |
Jump full-screen up/down |
gg/G |
Go to top/bottom |
Enter/Space |
Expand/collapse directories |
Enter |
Open files with default app |
q/Ctrl+C/Esc |
Quit |
dtree [options] [directory]
Options:
-d, --depth <num> Initial depth to expand (default: 1)
-h, --help Show help message
Examples:
dtree # Current directory, depth 1
dtree ~/Projects # Specific directory
dtree -d 2 . # Expand 2 levels deep
- Go 1.21 or later
go test ./tests/... # All tests
go test ./tests/... -v # Verbose output
go test ./tests/... -cover # With coverage
dtree/
โโโ main.go # Entry point
โโโ internal/ # Private packages
โ โโโ tree/ # Tree data structures
โ โโโ ui/ # Terminal interface
โ โโโ fileops/ # File operations
โโโ tests/ # Test suite
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.