Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: interactive UI using bubbletea #782

Closed
imjasonh opened this issue Jul 29, 2022 · 1 comment
Closed

Idea: interactive UI using bubbletea #782

imjasonh opened this issue Jul 29, 2022 · 1 comment

Comments

@imjasonh
Copy link
Member

We can use bubbletea from https://charm.sh to give a layer of paint to our CLI.

In all cases, using the interactive TUI should be optional, and backward-compatible. If you're invoking ko build or ko resolve with flags today today, you should be able to keep doing that and never see an interactive UI.

But, if you don't, we can guide you through the necessary options.

Some possible examples:

  • If you haven't set KO_DOCKER_REPO, instead of failing, prompt for it. We can also ask if you want to persist this for future calls.
  • If you ko resolve without specifying a filepath, we can prompt you for one, and maybe autocomplete based on what directories exist and contain YAML files. (Maybe we could just do this with cobra though? 🤔)
  • Since build: Imply current import path #717 we accept a bare ko build, so we can't prompt to select an importpath, but maybe if you ko build <tab> we can intercept that and figure out which importpaths exist in the current context and let you choose one. Maybe with type-ahead autocomplete if there are more than a few of them.

There's probably more.

I'd also like to optionally have a better UX for pushing images, with grouped progress bars instead of the current interleaved logging. I'm imagining something like:

ko resolve [config/]:
- ./cmd/foo
  - linux/amd64   [pushing] 5/6 layers ======> 81%
  - linux/arm64.  [building] ...
  - linux/ppc64le [pushing] 4/6 layers ==> 47%
  - linux/s390x   [done] 56s
- ./cmd/bar
  - linux/amd64   [building] ...
  - linux/arm64.  [building] ...
  - linux/ppc64le [pushing] 1/6 layers => 4%
  - linux/s390x   [done] 49s
...

We can fallback to printing out layer digests if it's not a terminal, or if you opt out. (or don't opt in).

Ideas and feedback welcome, including any feedback that you don't want this. 😄

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant