cmd

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MPL-2.0 Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisableSSHKeepAlive time.Duration = 0 * time.Second
)

Variables

This section is empty.

Functions

func BuildRoot

func BuildRoot() *cobra.Command

BuildRoot creates a new root command from the.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewBuildCmd

func NewBuildCmd(flags *flags.GlobalFlags) *cobra.Command

NewBuildCmd creates a new command.

func NewDeleteCmd

func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command

NewDeleteCmd creates a new command.

func NewDownCmd added in v1.1.0

func NewDownCmd(flags *flags.GlobalFlags) *cobra.Command

NewDownCmd creates a new down command that stops and deletes a workspace.

func NewExecCmd added in v1.1.0

func NewExecCmd(f *flags.GlobalFlags) *cobra.Command

func NewExportCmd

func NewExportCmd(flags *flags.GlobalFlags) *cobra.Command

NewExportCmd creates a new command.

func NewImportCmd

func NewImportCmd(flags *flags.GlobalFlags) *cobra.Command

NewImportCmd creates a new command.

func NewListCmd

func NewListCmd(flags *flags.GlobalFlags) *cobra.Command

NewListCmd creates a new destroy command.

func NewLogsCmd

func NewLogsCmd(flags *flags.GlobalFlags) *cobra.Command

NewLogsCmd creates a new destroy command.

func NewLogsDaemonCmd

func NewLogsDaemonCmd(flags *flags.GlobalFlags) *cobra.Command

NewLogsDaemonCmd creates a new destroy command.

func NewOutdatedCmd added in v1.1.0

func NewOutdatedCmd(f *flags.GlobalFlags) *cobra.Command

NewOutdatedCmd creates a new outdated command.

func NewPingCmd

func NewPingCmd(flags *flags.GlobalFlags) *cobra.Command

func NewReadConfigurationCmd added in v1.1.0

func NewReadConfigurationCmd(f *flags.GlobalFlags) *cobra.Command

NewReadConfigurationCmd creates a new read-configuration command.

func NewRenameCmd added in v1.3.0

func NewRenameCmd(globalFlags *flags.GlobalFlags) *cobra.Command

NewRenameCmd creates a new command for renaming a workspace.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd returns a new root command.

func NewRunUserCommandsCmd added in v1.1.0

func NewRunUserCommandsCmd(f *flags.GlobalFlags) *cobra.Command

NewRunUserCommandsCmd creates a new run-user-commands command.

func NewRunUserCommandsCmdAlias added in v1.1.0

func NewRunUserCommandsCmdAlias(f *flags.GlobalFlags) *cobra.Command

NewRunUserCommandsCmdAlias creates the hidden camelCase alias for devcontainer CLI compat.

func NewSSHCmd

func NewSSHCmd(f *flags.GlobalFlags) *cobra.Command

NewSSHCmd creates a new ssh command.

func NewSelfUpdateCmd added in v1.1.0

func NewSelfUpdateCmd() *cobra.Command

NewSelfUpdateCmd creates a new self-update command.

func NewSetUpCmd added in v1.1.0

func NewSetUpCmd(f *flags.GlobalFlags) *cobra.Command

NewSetUpCmd creates a new set-up command.

func NewStatusCmd

func NewStatusCmd(flags *flags.GlobalFlags) *cobra.Command

NewStatusCmd creates a new command.

func NewStopCmd

func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command

NewStopCmd creates a new destroy command.

func NewTroubleshootCmd

func NewTroubleshootCmd(flags *flags.GlobalFlags) *cobra.Command

func NewUpgradeCmd

func NewUpgradeCmd(f *flags.GlobalFlags) *cobra.Command

NewUpgradeCmd creates a new upgrade command.

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd creates a new ws-tunnel command.

Types

type BuildCmd

type BuildCmd struct {
	*flags.GlobalFlags
	provider.CLIOptions

	ProviderOptions []string

	SkipDelete bool
	Machine    string
}

BuildCmd holds the cmd flags.

func (*BuildCmd) Run

func (cmd *BuildCmd) Run(ctx context.Context, client client.WorkspaceClient) error

type DeleteCmd

type DeleteCmd struct {
	*flags.GlobalFlags
	client2.DeleteOptions
}

DeleteCmd holds the delete cmd flags.

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(cobraCmd *cobra.Command, args []string) error

Run runs the command logic.

type DevsyProInstance

type DevsyProInstance struct {
	Host         string
	ProviderName string
	Version      string
}

type DownCmd added in v1.1.0

type DownCmd struct {
	*flags.GlobalFlags
	client2.DeleteOptions
}

DownCmd holds the down cmd flags.

func (*DownCmd) Run added in v1.1.0

func (cmd *DownCmd) Run(ctx context.Context, args []string) error

Run stops and then deletes the workspace.

type ExecCmd added in v1.1.0

type ExecCmd struct {
	*flags.GlobalFlags

	WorkspaceFolder     string
	ContainerID         string
	DockerPath          string
	RemoteEnv           []string
	DefaultUserEnvProbe string
	IDLabels            []string
	ContainerDataFolder string
	SkipPostCreate      bool
}

func (*ExecCmd) Run added in v1.1.0

func (cmd *ExecCmd) Run(ctx context.Context, args []string) error

type ExportCmd

type ExportCmd struct {
	*flags.GlobalFlags
}

ExportCmd holds the export cmd flags.

func (*ExportCmd) Run

func (cmd *ExportCmd) Run(ctx context.Context, devsyConfig *config.Config, args []string) error

Run runs the command logic.

type ImportCmd

type ImportCmd struct {
	*flags.GlobalFlags

	WorkspaceID string

	MachineID    string
	MachineReuse bool

	ProviderID    string
	ProviderReuse bool

	Data string
}

ImportCmd holds the export cmd flags.

func (*ImportCmd) Run

func (cmd *ImportCmd) Run(
	ctx context.Context,
	devsyConfig *config.Config,
) error

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags

	Output  string
	SkipPro bool
}

ListCmd holds the configuration.

func (*ListCmd) Run

func (cmd *ListCmd) Run(ctx context.Context) error

Run runs the command logic.

type LogsCmd

type LogsCmd struct {
	*flags.GlobalFlags
}

LogsCmd holds the configuration.

func (*LogsCmd) Run

func (cmd *LogsCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type LogsDaemonCmd

type LogsDaemonCmd struct {
	*flags.GlobalFlags
}

LogsDaemonCmd holds the configuration.

func (*LogsDaemonCmd) Run

func (cmd *LogsDaemonCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type OutdatedCmd added in v1.1.0

type OutdatedCmd struct {
	*flags.GlobalFlags

	WorkspaceFolder string
	Config          string
}

OutdatedCmd checks for newer versions of installed devcontainer features.

func (*OutdatedCmd) Run added in v1.1.0

func (cmd *OutdatedCmd) Run(_ context.Context) error

Run runs the command logic.

type PingCmd

type PingCmd struct {
	*flags.GlobalFlags
}

func (*PingCmd) Run

func (cmd *PingCmd) Run(ctx context.Context, args []string) error

type PrintableError

type PrintableError struct {
	// contains filtered or unexported fields
}

(ThomasK33): Little type embedding here, so that we can serialize the error strings when invoking json.Marshal.

func (PrintableError) MarshalJSON

func (p PrintableError) MarshalJSON() ([]byte, error)

type ReadConfigurationCmd added in v1.1.0

type ReadConfigurationCmd struct {
	*flags.GlobalFlags

	WorkspaceFolder              string
	Config                       string
	ContainerID                  string
	IDLabels                     []string
	DockerPath                   string
	IncludeFeaturesConfiguration bool
	IncludeMergedConfiguration   bool
}

ReadConfigurationCmd holds the read-configuration cmd flags.

func (*ReadConfigurationCmd) Run added in v1.1.0

func (cmd *ReadConfigurationCmd) Run(
	c *cobra.Command,
	_ []string,
) error

Run executes the read-configuration command.

type RenameCmd added in v1.3.0

type RenameCmd struct {
	*flags.GlobalFlags
}

RenameCmd holds the rename cmd flags.

func (*RenameCmd) Run added in v1.3.0

func (cmd *RenameCmd) Run(ctx context.Context, args []string) error

Run validates inputs, loads config, and executes the workspace rename.

type RunUserCommandsCmd added in v1.1.0

type RunUserCommandsCmd struct {
	*flags.GlobalFlags

	WorkspaceFolder         string
	ContainerID             string
	DockerPath              string
	Config                  string
	OverrideConfig          string
	RemoteEnv               []string
	IDLabels                []string
	Prebuild                bool
	SkipNonBlockingCommands bool
	SkipPostCreate          bool
	SkipPostStart           bool
	SkipPostAttach          bool
	SkipOnCreate            bool
	SkipUpdateContent       bool
}

RunUserCommandsCmd holds the run-user-commands command flags.

func (*RunUserCommandsCmd) Run added in v1.1.0

func (cmd *RunUserCommandsCmd) Run(ctx context.Context) error

Run executes the run-user-commands logic.

type SSHCmd

type SSHCmd struct {
	*flags.GlobalFlags

	ForwardPortsTimeout string
	ForwardPorts        []string
	ReverseForwardPorts []string
	SendEnvVars         []string
	SetEnvVars          []string

	Stdio                     bool
	JumpContainer             bool
	ReuseSSHAuthSock          string
	AgentForwarding           bool
	GPGAgentForwarding        bool
	GitSSHSignatureForwarding bool
	GitSSHSigningKey          string

	// ssh keepalive options
	SSHKeepAliveInterval time.Duration `json:"sshKeepAliveInterval,omitempty"`

	StartServices   bool
	TermMode        string
	InstallTerminfo bool

	Command string
	User    string
	WorkDir string
}

SSHCmd holds the ssh cmd flags.

func (*SSHCmd) Run

func (cmd *SSHCmd) Run(
	ctx context.Context,
	devsyConfig *config.Config,
	client client2.BaseWorkspaceClient,
) error

Run runs the command logic.

type SelfUpdateCmd added in v1.1.0

type SelfUpdateCmd struct {
	Version string
	DryRun  bool
}

SelfUpdateCmd is a struct that defines a command call for "self-update".

type SetUpCmd added in v1.1.0

type SetUpCmd struct {
	*flags.GlobalFlags

	Container       string
	Config          string
	WorkspaceFolder string
	DockerPath      string
}

SetUpCmd holds the set-up command flags.

func (*SetUpCmd) Run added in v1.1.0

func (cmd *SetUpCmd) Run(ctx context.Context) error

Run executes the set-up command logic.

type StatusCmd

type StatusCmd struct {
	*flags.GlobalFlags
	client2.StatusOptions

	Output  string
	Timeout string
}

StatusCmd holds the cmd flags.

func (*StatusCmd) Run

func (cmd *StatusCmd) Run(
	ctx context.Context,
	client client2.BaseWorkspaceClient,
) error

Run runs the command logic.

type StopCmd

type StopCmd struct {
	*flags.GlobalFlags
	client2.StopOptions
}

StopCmd holds the destroy cmd flags.

func (*StopCmd) Run

func (cmd *StopCmd) Run(
	ctx context.Context,
	devsyConfig *config.Config,
	client client2.BaseWorkspaceClient,
) error

Run runs the command logic.

type TroubleshootCmd

type TroubleshootCmd struct {
	*flags.GlobalFlags
}

func (*TroubleshootCmd) Run

func (cmd *TroubleshootCmd) Run(ctx context.Context, args []string)

type UpgradeCmd

type UpgradeCmd struct {
	*flags.GlobalFlags

	WorkspaceFolder string
	Config          string
	DryRun          bool
}

UpgradeCmd upgrades devcontainer feature versions to the latest available.

func (*UpgradeCmd) Run added in v1.1.0

func (cmd *UpgradeCmd) Run(_ context.Context, targets []string) error

Run runs the command logic.

type VersionCmd

type VersionCmd struct{}

VersionCmd holds the ws-tunnel cmd flags.

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(_ *cobra.Command, _ []string) error

Run runs the command logic.

Jump to

Keyboard shortcuts

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