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.


  • Support window resizing.
  • Page for viewing all current picks
  • Fix permission exception handling in my du package.
  • Retain traversal position when toggling hidden directories.
  • Different colors for sizes.
  • Prompt to pick via entered globs.
  • 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.

Source Distribution

treepick-0.1.4.tar.gz (9.3 kB view hashes)

Uploaded source

Built Distribution

treepick-0.1.4-py3-none-any.whl (11.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page