Skip to main content

Curses Tree Style Path Picker

Project description


A Curses based, tree style, path picker. For use as a terminal based file dialog.



pip install treepick


usage: treepick [-h] [-a] [-r] [path]

Select paths from a directory tree.

positional arguments:
  path            A valid path.

optional arguments:
  -h, --help      show this help message and exit
  -a, --hidden    Show all hidden paths too.
  -r, --relative  Output relative paths.


from treepick import pick

hidden = True

parent_path = '/path/to/directory'

my_list_of_paths = pick(parent_path, hidden)



UP, k Step up one line.
DOWN, j Step down one line.
K Jump to previous parent directory.
J Jump to next parent directory.
PGDN, f Jump down a page of lines.
PGUP, b Jump up a page of lines.
HOME, g Jump to first line.
END, G Jump to last line.
TAB, RET Toggle expansion/collapse of directory.
RIGHT, l Expand and step into directory.
LEFT, h Collapse directory.
SHIFT RIGHT, L Expand directory and child directories.
SHIFT LEFT, H Jump to parent directory and collapse all.
SPC Toggle picking of paths.
v Toggle picking of all currently expanded paths.
: Toggle picking based on entered globs.
p View all currently picked paths.
/ Search for string in currently expanded paths.
n Jump to next occurrence of search string.
N Jump to previous occurrence of search string.
. Toggle display of dotfiles.
s Display total size of path, recursively
S Display totol size of all currently expanded paths.
F5, r Reset marking and expansion.
F1, ? View all keybindings.
q, ESC Quit and display all marked paths.


  • [x] Support window resizing.
  • [x] Page for viewing all current picks
  • [x] Fix permission exception handling in my du package.
  • [x] Retain traversal position when toggling hidden directories.
  • [x] Different colors for sizes.
  • [x] Prompt to pick via entered globs.
  • [x] Search for string and navigate results.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for treepick, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size treepick-0.1.4-py3-none-any.whl (11.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size treepick-0.1.4.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page