/diagtree

Fuzzy Explorer for everything: logs, configs, Kafka topics, and more.

Primary LanguageGo

fe

Fuzzy Explorer

Fuzzy Explorer is your ultimate terminal companion for navigating logs, configurations, Kafka topics, and more.

If there is one tool I would recommend to every sysadmin, DevOps engineer, or anyone who lives in a terminal, it's fzf. I use it for nearly everything: searching and taking action on the results. Here are some examples of what you can do:

  • Search with brew search then install with brew install
  • Find processes with ps -ef | grep then terminal with kill
  • Open a recent Jira issue in your web browser
  • Launch your project in your favorite editor
  • Copy a password from KeepassXC to the clipboard
  • Retrieve secrets from Vault
  • Query Kafka topics
  • Quickly view Sentry issues
  • Tail logs using lnav
  • ...

However, there are situations where you might want it to stay open after making selection, such as when commands take time to generate a list of options:

Fuzzy Explorer solves this problem by keeping the tree open, allowing you to seamlessly explorer and act on hierarchical data.

Requirements

Installation

Install via homebrew

brew install quantonganh/tap/fe

Install via go

go install github.com/quantonganh/fe@latest

Usage

First, create a configuration file to define your exploration hierarchy:

terminal: wezterm

root:
  name: envs
  children:
    - name: local
      children:
        - name: godoc
          children:
            - command: >
                go list std
              children:
                - command: go doc -short $current | grep '^[ ]*func' | sed -E 's/^[ ]*func ([^[(]+).*/\1/'
                  children:
                  - finalCommand: go doc $parent.$current | less

Run the program with your configuration:

fe -c /path/to/config.yaml

Navigate through the selection using vim-like key bindings.

Press / to search using fzf.

With Fuzzy Explorer, you can quickly navigate complex data structure, perform contextual actions, and stay in control of your workflow.