ide

package
v0.1.89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ide centralizes the logic for opening labctl playgrounds in local IDEs (VSCode-family editors and Zed) over an SSH proxy.

Index

Constants

View Source
const (
	VSCode   = "code"
	Cursor   = "cursor"
	Windsurf = "windsurf"
	Zed      = "zed"
)

Variables

View Source
var Supported = []string{VSCode, Cursor, Windsurf, Zed}

Supported lists the IDE CLI names labctl knows how to open, in display order.

Functions

func Command

func Command(ctx context.Context, ide string, args []string) *exec.Cmd

Command builds the exec.Cmd that launches the IDE with args, taking care of the extra cmd /C wrapping required on Windows.

func EnsureInstalled

func EnsureInstalled(ide string) error

EnsureInstalled returns a friendly error if the IDE's CLI binary isn't on PATH.

func IsSupported

func IsSupported(name string) bool

IsSupported reports whether name is one of the supported IDEs.

func LaunchArgs

func LaunchArgs(ide, user, host, port, workDir string) []string

LaunchArgs returns the arguments to pass to the IDE binary to open workDir on the remote machine reachable at host:port as user over the SSH proxy.

func SupportedList

func SupportedList() string

SupportedList returns the supported IDE names as a quoted, comma-separated string for help text and error messages, e.g. `"code", "cursor", "windsurf", "zed"`.

func UserHomeDir

func UserHomeDir(user string) string

UserHomeDir returns the remote home directory for the given login user.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL