cmdinternal

package
v1.4.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MPL-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentExecutedAnnotation = "devsy.sh/agent-executed"

Functions

func NewAgentCmd

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

NewAgentCmd is the hidden parent for commands that run inside a workspace or container, invoked by the daemon over the agent tunnel.

func NewBrowserTunnelCmd

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

NewBrowserTunnelCmd creates a new browser-tunnel helper command.

func NewCheckProviderUpdateCmd

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

NewCheckProviderUpdateCmd creates a new command.

func NewContainerTunnelCmd

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

NewContainerTunnelCmd creates a new command.

func NewDaemonCmd

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

NewDaemonCmd creates a new command.

func NewDaemonLocalCmd

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

func NewDockerCredentialsCmd

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

NewDockerCredentialsCmd creates a new command.

func NewDockerCredentialsHelperCmd

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

func NewFleetServerCmd

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

NewFleetServerCmd creates a new fleet command.

func NewGetCmd

func NewGetCmd() *cobra.Command

NewGetCmd creates a new ssh command.

func NewGetImageCmd

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

NewGetImageCmd creates a new command.

func NewGetImagePlatformsCmd

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

NewGetImagePlatformsCmd creates a new command.

func NewGetProviderNameCmd

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

NewGetProviderNameCmd creates a new command.

func NewGetWorkspaceConfigCommand

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

NewGetWorkspaceConfigCommand creates a new command.

func NewGetWorkspaceNameCmd

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

NewGetWorkspaceNameCmd creates a new command.

func NewGetWorkspaceUIDCmd

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

NewGetWorkspaceUIDCmd creates a new command.

func NewGitCredentialsCmd

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

NewGitCredentialsCmd creates a new command.

func NewGitSSHSignatureCmd

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

NewGitSSHSignatureCmd creates new git-ssh-signature command This agent command can be used as git ssh program by setting

> git config --global gpg.ssh.program "devsy internal agent git-ssh-signature"

Git by default uses ssh-keygen for signing commits with ssh. This CLI command is a drop-in replacement for ssh-keygen and hence needs to support ssh-keygen interface that git uses.

custom-ssh-signature-handler -Y sign -n git -f /Users/johndoe/.ssh/my-key.pub /tmp/.git_signing_buffer_tmp4Euk6d

func NewGitSSHSignatureHelperCmd

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

NewGitSSHSignatureHelperCmd creates a new git-ssh-signature-helper command This agent command can be used to inject the Git SSH signature helper.

This command is used to set up the environment for Git SSH signature verification by configuring the necessary helper using a provided signing key path.

Example usage:

git-ssh-signature-helper [signing-key-path]

The signing key path is a required argument for this command. It should be what equal to what you would have set as user.signingkey git config.

func NewHTTPCmd

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

NewHTTPCmd returns a new command.

func NewInternalCmd

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

NewInternalCmd is the hidden parent for plumbing commands invoked by other processes (the daemon, the desktop app, container init scripts), not part of the user-facing CLI contract.

func NewJSONCmd

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

NewJSONCmd returns a new command.

func NewLogsDaemonCmd

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

NewLogsDaemonCmd creates a new destroy command.

func NewRequestCmd

func NewRequestCmd() *cobra.Command

NewRequestCmd creates a new ssh command.

func NewRunUserCommandsCmd

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

NewRunUserCommandsCmd creates a new run-user-commands command.

func NewRunUserCommandsCmdAlias

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

NewRunUserCommandsCmdAlias creates the hidden camelCase alias for devcontainer CLI compat.

func NewSSHClientCmd

func NewSSHClientCmd() *cobra.Command

NewSSHClientCmd creates a new ssh command.

func NewSSHGitCloneCmd

func NewSSHGitCloneCmd() *cobra.Command

func NewSSHServerCmd

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

NewSSHServerCmd creates a new ssh command.

func NewShellCmd

func NewShellCmd() *cobra.Command

NewShellCmd creates a new command.

func NewStringsCmd

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

NewStringsCmd returns a new command.

func StartContainer

func StartContainer(
	ctx context.Context,
	runner devcontainer.Runner,
	workspaceConfig *provider2.AgentWorkspaceInfo,
) (*config.Result, error)

Types

type BrowserTunnelCmd

type BrowserTunnelCmd struct {
	*flags.GlobalFlags

	Workspace        string
	TargetURL        string
	AuthSockID       string
	ForwardPorts     bool
	ExtraPorts       []string
	User             string
	GitSSHSigningKey string
	InheritListeners []string
	// OpenBrowser tells the helper to probe TargetURL and open the host
	// browser once the listener accepts. The parent CLI exits in
	// milliseconds after spawning the helper, so the auto-open must be
	// owned by this long-lived process.
	OpenBrowser bool
}

BrowserTunnelCmd holds the browser-tunnel helper flags.

func (*BrowserTunnelCmd) Run

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

Run runs the browser-tunnel helper command.

type CheckProviderUpdateCmd

type CheckProviderUpdateCmd struct {
	*flags.GlobalFlags
}

func (*CheckProviderUpdateCmd) Run

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

type ContainerTunnelCmd

type ContainerTunnelCmd struct {
	*flags.GlobalFlags

	WorkspaceInfo string
	User          string
}

ContainerTunnelCmd holds the ws-tunnel cmd flags.

func (*ContainerTunnelCmd) Run

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

Run runs the command logic.

type DaemonCmd

type DaemonCmd struct {
	*flags.GlobalFlags

	Interval       string
	ShutdownAction string
}

DaemonCmd holds the cmd flags.

func (*DaemonCmd) Run

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

type DaemonLocalCmd

type DaemonLocalCmd struct {
	*flags.GlobalFlags
}

func (*DaemonLocalCmd) Run

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

type DockerCredentialsCmd

type DockerCredentialsCmd struct {
	*flags.GlobalFlags

	Port int
}

DockerCredentialsCmd holds the cmd flags.

func (*DockerCredentialsCmd) Run

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

type DockerCredentialsHelperCmd

type DockerCredentialsHelperCmd struct {
	*flags.GlobalFlags

	WorkspaceID string
}

func (*DockerCredentialsHelperCmd) Run

type FleetServerCmd

type FleetServerCmd struct {
	*flags.GlobalFlags

	WorkspaceID string
}

FleetServerCmd holds the fleet server cmd flags.

func (*FleetServerCmd) Run

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

Run runs the command logic.

type GetCmd

type GetCmd struct {
	File string
	Fail bool
}

GetCmd retrieves a JSON value by path.

func (*GetCmd) Run

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

Run executes the get command.

type GetImageCommand

type GetImageCommand struct {
	*flags.GlobalFlags
}

func (*GetImageCommand) Run

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

type GetImagePlatformsCommand

type GetImagePlatformsCommand struct {
	*flags.GlobalFlags
}

func (*GetImagePlatformsCommand) Run

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

type GetProviderNameCmd

type GetProviderNameCmd struct {
	*flags.GlobalFlags
}

func (*GetProviderNameCmd) Run

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

type GetWorkspaceConfigCommand

type GetWorkspaceConfigCommand struct {
	*flags.GlobalFlags
	// contains filtered or unexported fields
}

func (*GetWorkspaceConfigCommand) Run

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

type GetWorkspaceConfigCommandResult

type GetWorkspaceConfigCommandResult struct {
	IsImage         bool     `json:"isImage"`
	IsGitRepository bool     `json:"isGitRepository"`
	IsLocal         bool     `json:"isLocal"`
	ConfigPaths     []string `json:"configPaths"`
}

type GetWorkspaceNameCommand

type GetWorkspaceNameCommand struct {
	*flags.GlobalFlags
}

func (*GetWorkspaceNameCommand) Run

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

type GetWorkspaceUIDCommand

type GetWorkspaceUIDCommand struct {
	*flags.GlobalFlags
}

func (*GetWorkspaceUIDCommand) Run

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

type GitCredentialsCmd

type GitCredentialsCmd struct {
	*flags.GlobalFlags

	Port int
}

GitCredentialsCmd holds the cmd flags.

func (*GitCredentialsCmd) Run

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

type GitSSHSignatureHelperCmd

type GitSSHSignatureHelperCmd struct {
	*flags.GlobalFlags

	CertPath string
}

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 RequestCmd

type RequestCmd struct {
	Method  string
	Data    string
	Headers []string

	FailOnErrorCode bool
}

func (*RequestCmd) Run

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

type RunUserCommandsCmd

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

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

Run executes the run-user-commands logic.

type SSHClient

type SSHClient struct {
	Address string
	KeyFile string
	User    string
}

func (*SSHClient) Run

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

type SSHGitClone

type SSHGitClone struct {
	KeyFiles []string
	Port     string
}

func (*SSHGitClone) Run

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

type ShellCommand

type ShellCommand struct {
	Command string
	Login   bool
}

func (*ShellCommand) Run

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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