kcp
kcp copied to clipboard
feature: add `kubectl ws -i`
Feature Description
We should support kubectl ws -i
for interactive browsing the tree
Proposed Solution
use something like https://github.com/manifoldco/promptui or https://github.com/rivo/tview/
Alternative Solutions
No response
Want to contribute?
- [ ] I would like to work on this issue.
Additional Context
No response
Similar: https://github.com/kcp-dev/kcp/pull/2309
https://github.com/charmbracelet/bubbletea
Small note, I wrote a bash-based prototype for this functionality. It's available at https://github.com/embik/kubectl-switch-ws. I don't think the bash-based version cuts it for integrating it into kubectl ws
, but maybe we can get away with using fzf
over our own full TUI.
Hey Folks! Is this issue open for grabs?
Hey @rakshitgondwal, it is, yes!
Hey @embik, have we come to any conclusion on what framework to use for the TUI? I've worked with Bubbletea before but I would be open to implementing any other as well.
No real conclusion, I think. We are looking for a solution that is lightweight and fast, and no one has too many thoughts on the matter. Something that I was wondering is if running echo "option1\noption2\n" | fzf
in a shell exec within the code might be the "best" solution (basically implement https://github.com/embik/kubectl-switch-ws in Go and get the data via Go clients instead of kubectl
calls), but I'm open to whatever works and looks and feels nice.