Skip to content

Make containers clickable to vscode and iterm2 #179

@horner

Description

@horner
Image

Summary

Enable one-click launching of a container host from the Manager App using deep links:

  • VS Code Remote-SSH via URL (vscode://)
  • iTerm2 SSH session via a custom URL handler / script

This allows operators and developers to jump directly from the UI into a live shell or editor session for a selected container host.


Background / Motivation

The Manager App already maintains a list of container hosts (name, hostname, user, etc.). Developers frequently need to:

  • Inspect logs
  • Debug running services
  • Edit files remotely

Currently this requires manually copying hostnames and opening tools by hand. Supporting deep-link launches significantly reduces friction and context-switching.


Requirements

1. VS Code Remote-SSH Launch

For each container host, expose an action:

Label: Open in VS Code

Behavior:

  • Generate a URL of the form:

    vscode://vscode-remote/ssh-remote+<ssh_target>
    
  • <ssh_target> should resolve via ~/.ssh/config when possible (preferred)

  • If a path is known (e.g. app root), append:

    vscode://vscode-remote/ssh-remote+<ssh_target>/<path>
    

examples:

vscode://vscode-remote/ssh-remote+deploy@10.0.0.12:2222
vscode://vscode-remote/ssh-remote+deploy@10.0.0.12:2222/srv/app

Notes:

  • This must be a clickable link (<a href> or equivalent)
  • No escaping of @ or + characters
  • Should work from browsers and embedded webviews

2. iTerm2 SSH Launch

Expose an additional action:

Label: Open in iTerm2

Behavior:

  • Use a custom URL scheme, e.g.:

    iterm-ssh://<ssh_target>
    
  • The Manager App is only responsible for generating the link

  • The user’s system will handle the scheme (via a helper script)

Assumptions:

  • A helper script exists locally that:

    • Registers iterm-ssh://
    • Opens iTerm2
    • Runs ssh <ssh_target>
  • The app should not attempt to detect iTerm2 availability


Data Model Expectations

Each container host entry should already expose or be extended to include:

  • host (DNS name or IP)
  • user (optional; may be in SSH config)
  • sshAlias (preferred, optional)
  • defaultPath (optional)

Resolution order for <ssh_target>:

  1. sshAlias
  2. user@host
  3. host

UI / UX

  • Actions should be available inline with each container host row

  • Icons preferred:

    • VS Code icon for editor launch
    • Terminal icon for iTerm2
  • Actions should open in a new application, not navigate away from the Manager App


Security Considerations

  • No credentials are embedded in URLs
  • Relies entirely on user-local SSH configuration and keys
  • Manager App does not store or transmit private keys

Acceptance Criteria

  • Clicking “Open in VS Code” launches VS Code and connects to the correct host
  • Clicking “Open in iTerm2” opens a new iTerm2 window and runs ssh
  • Works for hosts defined via SSH config aliases
  • Graceful no-op if VS Code or iTerm2 is not installed
  • No console errors in the Manager App

Out of Scope

  • Windows support for iTerm2
  • Detecting installed applications
  • Managing SSH keys or credentials
  • Inline terminal/editor inside the Manager App

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions