feat(cli): add limactl-menu TUI plugin for instance management - #5330
Soumya-codr wants to merge 1 commit into
Conversation
|
Thanks, but please sign the commit for DCO (run If you used an AI, you also have to disclose it |
|
The UI looks so redundant. |
Okay thanks for addressing that but i need more context from this , Do u want me to only chnage the whole thing to one panel like this
The single-panel design simplifies the UI but requires an extra click (Enter → select 'Show Info') to see instance details. For users managing multiple VMs, this adds friction vs the previous split view where info was visible alongside the list. Could we consider a middle ground @AkihiroSuda : Single panel with inline detail — when an instance is selected, show its key details (status, SSH port, IP) below the list in the same panel, then use popups only for actions? please let me know then i will move forward |
Could be just shown in the table?
Minimal code. |
|
@Soumya-codr |
007075b to
3615845
Compare
|
Hi @AkihiroSuda, I have updated the PR according to your feedback:
Usability Feedback & Proposed Hotkeys: To make the workflow much smoother while keeping the implementation minimal, I propose adding direct single-key hotkeys on the list along with a simple footer help bar:
Would you be open to including these hotkeys in this PR to improve daily usability? Looking forward to your thoughts! |
| if in.Protected { | ||
| prot = " [LOCKED]" | ||
| } | ||
| return fmt.Sprintf("%s %-18s SSH:%-5d %s%s", icon, name, in.SSHLocalPort, in.SSHAddress, prot) |
There was a problem hiding this comment.
You can print more info here as in limactl ls
There was a problem hiding this comment.
Done! Updated the row layout to include status, arch, CPUs/memory, and SSH address in aligned columns matching limactl ls.
There was a problem hiding this comment.
Fixed! Replaced exec.Command with exec.CommandContext to resolve the noctx linter error. golangci-lint now passes cleanly with 0 issues.
Can we use functional keys? |
|
Start/Stop can share a single key for toggling the state |
| s.showTextView(" Error ", "Failed to get SSH config: "+err.Error()) | ||
| return | ||
| } | ||
| tmp := "/tmp/lima-ssh-" + in.Name + ".config" |
There was a problem hiding this comment.
This path is vulnerable and can be written by other user on the host
There was a problem hiding this comment.
Removed man copySSH action entirely to eliminate the /tmp file security vulnerability.
| s.showTextView(" Info ", b.String()) | ||
| } | ||
|
|
||
| func (s *State) copySSH(in *limatype.Instance) { |
There was a problem hiding this comment.
Do we really need this?
Include ~/.lima/*/ssh.config is more convenient
There was a problem hiding this comment.
Agreed! Removed copySSH action to keep the tool minimal and avoid redundant SSH config management.
| if p == "" || p == "[]" { | ||
| p = "No port forwards configured" | ||
| } | ||
| s.showTextView(" Port Forwards ", "Port Forwards for "+in.Name+"\n\n"+p) |
There was a problem hiding this comment.
Something weird was shown
╔ Port Forwards ═══════════════════════════════════════════════════════╗
║ ║
║ Port Forwards for agent ║
║ ║
║ [{ 0x3b47f1cd7c38 52:55:55:87:3a:b6 lima0 0x3b47f1babde8}] ║
║ ║
║ ║
╚══════════════════════════════════════════════════════════════════════╝
There was a problem hiding this comment.
Fixed! Updated the port format string to {{range .PortForwards}}{{.GuestIP}}:{{.GuestPort}} -> {{.HostIP}}:{{.HostPort}}{{"\n"}}{{end}} to properly render port mappings instead of raw network interfaces.
3615845 to
c218014
Compare
Updated to Midnight Commander-style Function Keys ( |
Done! |
|
Hi @AkihiroSuda , I have updated the PR addressing all your review feedback:
Please have a look when you get a chance. Thanks! |
|
Can we put this plugin in a separate repository under github.com/lima-vm ? It is different from the built-in pkg/uiutil |
|
Realize this is WIP, but gave it a spin and thought I'd offer a couple first impressions:
|
F1 is commonly used for Help, F5 is for Refresh (not Restart) |
I expect |
Implements lima-vm#5285 - adds 'limactl menu' TUI plugin for managing Lima instances through an interactive terminal UI. Features: - Single-panel instance list showing status icon, name, status, arch, CPUs/memory, and SSH address - Midnight Commander-style function keys (F1 Help, F2 Start/Stop Toggle, F3 Info, F5 Refresh, F8 Delete, F10 Quit) - Interactive action popup menu on Enter - F5 refreshes the instance list in-place - Confirmation modals for destructive actions (Stop, Delete) - Modals for instance details and port forwards - Footer help bar with keyboard shortcut legend - Empty state with option to create a new instance when no VMs exist Developed with AI assistance. Signed-off-by: Soumya Sagar <soumya.sagar.codr@gmail.com>
c218014 to
6f55939
Compare
|
Needs rebasing |
|
ping @Soumya-codr |


What This PR Changes
Implements #5285 - adds a
limactl menuTUI plugin for managing Lima instances through an interactive terminal UI. The plugin provides:journalctl -n 50and follow toggle (L)Linked Issue (Required in most cases)
Closes #5285
How I Tested This