Home

Awesome

Better tree (arguably)

Manipulate file tree in terminal.

<img alt="Preview" src="assets/preview.gif" width="600" />

Installation

go install github.com/LeperGnome/bt/cmd/bt@v1.0.0

Or from source

make install

Usage

bt [flags] [directory]

Flags:
  -i    In-place render (without alternate screen)
  -pad uint
        Edge padding for top and bottom (default 5)

Key bindings:

keydesc
j / arr downSelect next child
k / arr upSelect previous child
h / arr leftMove up a dir
l / arr rightEnter selected directory
dMove selected child (then 'p' to paste)
yCopy selected child (then 'p' to paste)
DDelete selected child
if / idCreate file (if) / directory (id) in current directory
rRename selected child
eEdit selected file in $EDITOR
ggGo to top most child in current directory
GGo to last child in current directory
enterCollapse / expand selected directory
escClear error message / stop current operation
?Toggle help
q / ctrl+cExit

Motivation

I find myself disliking a majority of column-based terminal file managers. The reason for that is - when I need to copy/move some files across nested subdirectories, I constantly lose context of where I am currently, because columns always go left and right. Even though those file managers are really mature and loaded with features (e.g. ranger, lf, xplr, nnn), it's uneasy for me to perform simple tasks.

I like how broot renders the ui, but I guess that it's mainly usable for exploring a file tree, but not manipulating it (at least I found it this way, when I had to type a target directory for move).

That's why I'm writing my own simple tool for simple use cases. It's currently lacking a bunch of features (see todo list below), but the fundamentals are here.

TODO

Functional:
- [x] Tree rendering
- [x] File preview
- [x] Scrolling trees, that don't fit the screen
- [x] Move files
- [x] Jump into empty directories
- [x] Copy / paste files
- [x] Not reading whole file contents, only fix size
- [x] Remove files
- [~] Resolve filename conflicts (kinda done)
- [x] Sorting
- [x] "G" to go bottom and "gg" to go top
- [x] Creating files and directories
- [x] Renaming files and directories
- [x] Handle fs updates
- [~] Error handling (permissions denied, etc) (kinda)
- [x] File permission in status bar
- [x] Stylesheets
- [x] Edit selected file in editor of choice
- [x] Help
- [ ] Toggle hidden directories
- [ ] Image preview
- [ ] Custom opening files
- [ ] Custom delete cmd
- [ ] Mark multiple files
- [ ] Search
- [ ] Marked to stdout on exit
- [ ] Jump to current directory
- [ ] Go higher then local root
- [ ] Make current directory a local root

Fixes:
- [x] Fix size notation
- [ ] File preview ignore control chars

Maintenance:
- [ ] Release artifacts
- [ ] Tests
- [ ] CI
- [ ] Distribution
- [ ] CONTRIBUTING.md