Skip to content

ScopeSV/bark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bark

A modern and beautiful tree command written in Zig 0.16.

Features

  • 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)

Example

.
├──  src
│   ├──  display.zig
│   ├──  git.zig [?]
│   ├──  icons.zig
│   ├──  main.zig [M]
│   └──  print.zig [M]
├──  build.zig
└──  build.zig.zon

1 directory, 7 files

Installation

Homebrew (macOS & Linux)

brew tap ScopeSV/tap https://codeberg.org/ScopeSV/homebrew-tap.git
brew install bark

Download binary

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/bark

Build from source

Requires Zig 0.16.

git clone https://codeberg.org/ScopeSV/bark.git
cd bark
zig build -Doptimize=ReleaseSafe
cp zig-out/bin/bark ~/.local/bin/

Usage

bark [options] [path]

Options

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

Examples

# 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"

Requirements

  • A Nerd Font installed in your terminal for icons to display correctly

License

MIT

About

A beautiful tree command with colors, nerd font icons, and git integration.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors