A modern and beautiful tree command written in Zig 0.16.
- Nerd Font icons based on file type and extension
- Colorized output (directories in blue, files in green)
- Git status indicators (
[M]modified,[?]untracked,[A]added,[D]deleted) - File size display (human-readable: B, K, M, G)
- Sorted output (directories first, then alphabetical)
- Configurable directory depth
- Graceful error handling (permission denied, non-git repos)
- Cross-platform (Linux and macOS, x86_64 and aarch64)
.
├── src
│ ├── display.zig
│ ├── git.zig [?]
│ ├── icons.zig
│ ├── main.zig [M]
│ └── print.zig [M]
├── build.zig
└── build.zig.zon
1 directory, 7 files
brew tap ScopeSV/tap https://codeberg.org/ScopeSV/homebrew-tap.git
brew install bark
Grab the latest binary for your platform from the Releases page.
# Example for Linux x86_64
chmod +x bark-x86_64-linux
mv bark-x86_64-linux ~/.local/bin/barkRequires Zig 0.16.
git clone https://codeberg.org/ScopeSV/bark.git
cd bark
zig build -Doptimize=ReleaseSafe
cp zig-out/bin/bark ~/.local/bin/bark [options] [path]
| Flag | Description |
|---|---|
--size, -s |
Show file sizes |
--pattern |
Filter by pattern |
--depth N |
Max directory depth (default: 1000) |
--all, -a |
Show hidden files |
--no-color |
Disable colors |
--no-icon |
Disable nerd font icons |
--no-git |
Disable git status indicators |
-h, --help |
Show help |
# Current directory
bark
# Specific path
bark ~/projects
# Show file sizes
bark --size
# Limit depth and show hidden files
bark --depth 3 --all
# Minimal output
bark --no-color --no-icon --no-git
# Filter by pattern, only show Zig files
bark --pattern "*.zig"- A Nerd Font installed in your terminal for icons to display correctly