Skip to content

C0ldSmi1e/dtree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DTree ๐ŸŒณ

The tree command, but interactive - a terminal filesystem navigator.

demo.mp4

โœจ Features

  • 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

๐Ÿš€ Quick Start

# View current directory
dtree

# View specific directory  
dtree /path/to/project

# Expand 3 levels deep
dtree --depth 3 .

# Usage
dtree -h

๐Ÿ“ฆ Installation

๐Ÿš€ Quick Install (Recommended)

curl -sSL https://raw.githubusercontent.com/C0ldSmi1e/dtree/main/install.sh -o dtree_install.sh && bash dtree_install.sh && rm dtree_install.sh

๐Ÿ“ฅ Download Pre-built Binary

๐Ÿ› ๏ธ For Go Developers

go install github.com/C0ldSmi1e/dtree@latest

๐Ÿ”ง Build from Source

git clone https://github.com/C0ldSmi1e/dtree.git
cd dtree
go build -o dtree

๐ŸŽฎ Controls

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

๐Ÿ”ง Usage

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

๐Ÿ—๏ธ Development

Requirements

  • Go 1.21 or later

Running Tests

go test ./tests/...           # All tests
go test ./tests/... -v        # Verbose output
go test ./tests/... -cover    # With coverage

Project Structure

dtree/
โ”œโ”€โ”€ main.go           # Entry point
โ”œโ”€โ”€ internal/         # Private packages
โ”‚   โ”œโ”€โ”€ tree/        # Tree data structures
โ”‚   โ”œโ”€โ”€ ui/          # Terminal interface  
โ”‚   โ””โ”€โ”€ fileops/     # File operations
โ””โ”€โ”€ tests/           # Test suite

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐ŸŒณ The tree command, but interactive - a terminal filesystem navigator.

Resources

License

Stars

Watchers

Forks

Packages

No packages published