kcp icon indicating copy to clipboard operation
kcp copied to clipboard

feature: add `kubectl ws -i`

Open mjudeikis opened this issue 11 months ago • 7 comments

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

mjudeikis avatar Mar 25 '24 15:03 mjudeikis

Similar: https://github.com/kcp-dev/kcp/pull/2309

mjudeikis avatar Mar 25 '24 16:03 mjudeikis

https://github.com/charmbracelet/bubbletea

embik avatar Mar 28 '24 16:03 embik

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.

embik avatar Jun 13 '24 12:06 embik

Hey Folks! Is this issue open for grabs?

rakshitgondwal avatar Sep 05 '24 23:09 rakshitgondwal

Hey @rakshitgondwal, it is, yes!

embik avatar Sep 07 '24 10:09 embik

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.

rakshitgondwal avatar Sep 07 '24 13:09 rakshitgondwal

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.

embik avatar Sep 10 '24 09:09 embik