moonwalk
recursively walks the working directory back to the root returning all files in the walk back. It now includes filtering, search, multiple output formats, an interactive TUI mode, and detailed statistics about files found in the walk.
- ๐ Walk from current directory or a specified path back to root
- ๐ Filter files by extension
- ๐ Search for text within files
- ๐ Multiple output formats (text, JSON, CSV)
- ๐ฅ๏ธ Interactive TUI mode with real-time navigation
- ๐ File size reporting
- ๐ Statistics and summary information
- ๐ฏ Control depth of directory traversal
Launch the beautiful terminal user interface:
$ moonwalk -tui
- ๐ Visual file browser with file-type specific icons (๐น Go, ๐ Python, ๐จ JavaScript, etc.)
- โจ๏ธ Keyboard navigation with arrow keys or vim-style (j/k)
- ๐ Live search - press
/
to filter files by name - ๐ Toggle statistics - press
d
to show/hide detailed info - ๐ Path display - press
p
to toggle current directory path - โ Interactive help - press
h
or?
for command reference - ๐ Real-time refresh - press
r
to rescan directory - ๐จ Beautiful styling with syntax highlighting
- ๐ฑ Responsive design that adapts to terminal size
Key | Action |
---|---|
โ/โ or j/k |
Navigate up/down |
g / G |
Go to top/bottom |
/ |
Enter search mode |
d |
Toggle detailed statistics |
p |
Toggle path display |
h or ? |
Toggle help |
r |
Refresh/rescan files |
q or Ctrl+C |
Quit |
# TUI mode with Go files only
$ moonwalk -tui -ext .go
# TUI mode with content search
$ moonwalk -tui -search "TODO"
# TUI mode from specific directory
$ moonwalk -tui -path /home/user/projects
$ moonwalk
$ moonwalk -path /Users/tmickleydoyle/Desktop
The path needs to be the absolute path to the working directory.
$ moonwalk -ext .go
$ moonwalk -search "import"
$ moonwalk -depth 2
$ moonwalk -size
$ moonwalk -summary
$ moonwalk -format json
$ moonwalk -format csv
# Search for Go functions with file sizes in JSON format
$ moonwalk -path /Users/tmickleydoyle/Projects -ext .go -search "func" -size -format json
# Get summary of Python files up to 3 levels deep
$ moonwalk -ext .py -depth 3 -summary
# Interactive TUI for JavaScript files with content search
$ moonwalk -tui -ext .js -search "import"
[Directory] "/Users/tmickleydoyle/Desktop"
[File] "/Users/tmickleydoyle/Desktop/data.csv" (2.3 KB)
[File] "/Users/tmickleydoyle/Desktop/data.json" (4.1 KB)
[File] "/Users/tmickleydoyle/Desktop/filename.txt" (512 B)
[File] "/Users/tmickleydoyle/Desktop/download.png" (2.5 MB)
[Directory] "/Users/tmickleydoyle"
[File] "/Users/tmickleydoyle/cohorts.json" (1.2 KB)
[File] "/Users/tmickleydoyle/house_query.sql" (3.4 KB)
[Directory] "/Users"
[File] "/Users/setup.txt" (128 B)
Summary:
Total Files: 8
Total Directories: 3
Total Size: 2.5 MB
Average File Size: 320.0 KB
Largest File: /Users/tmickleydoyle/Desktop/download.png (2.5 MB)
File Extensions:
.csv: 1 files
.json: 2 files
.txt: 2 files
.png: 1 files
.sql: 1 files
.html: 1 files
go install github.com/tmickleydoyle/moonwalk@latest
git clone https://github.com/tmickleydoyle/moonwalk.git
cd moonwalk
go build -o moonwalk .
- Go 1.15 or higher
- Terminal with color support (for best TUI experience)
Usage:
moonwalk [flags]
Flags:
-path string starting point directory
-ext string filter files by extension (e.g., .go, .txt)
-search string search for text within files
-format string output format (text, json, csv) (default "text")
-size show file sizes
-summary show summary statistics
-depth int maximum directory depth (-1 for unlimited) (default -1)
-tui run in interactive TUI mode
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Built with Bubble Tea for the TUI interface
- Styled with Lip Gloss for beautiful terminal output
- Inspired by the need for better directory exploration tools