Skip to content

lucashancock/term-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree Explorer Library built with Bubbletea and Lipgloss

Highly customizable tree explorer built entirely in Go.

Example: without directory lines

Screenshot 2025-01-22 at 11 53 06 AM

Example: with directory lines

Screenshot 2025-01-22 at 11 54 30 AM

See test.go for usage. There are many exposed properties on the tree object which you can set.

Examples of various customizations are:

  • Keybinds
  • Styles
  • Tree Indentation & Characters
  • Folder/File Icons
  • Font color/highlight/underline/bold using lipgloss in the Styles attribute
  • Tree with directory lines or without them
  • Cursor for line selection
  • Custom styling for selected line
  • Etc.

Reach out to lucas.hancock18@gmail.com for inquiries.

References

Note

Lipgloss has a pretty nice tree generator but currently doesn't support selection/navigation. This project is my own code which uses simple iteration and string concatenation to build out the tree. It is probably not that efficient and could've been done better, but it works. If you're looking for a project that integrates with the existing lipgloss tree builder, there is a pull request for a bubble that implements selection and navigation which is yet to be merged. Check it out here: charmbracelet/bubbles#639

About

tree explorer for the terminal, built with bubbletea and lipgloss.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages