Versions in this module Expand all Collapse all v0 v0.2.1 Jul 27, 2026 v0.2.0 Jul 27, 2026 Changes in this version type CreateOptions + WorkspaceMounts []WorkspaceMount type TemplateBuildOptions + WorkspaceMounts []build.TemplateWorkspaceMount + type WorkspaceMount = control.WorkspaceMount v0.1.4 Jul 27, 2026 Changes in this version type Client + func (c *Client) CreateWorkspace(ctx context.Context, templateID string) (*Workspace, error) + func (c *Client) DeleteWorkspace(ctx context.Context, workspaceID string) error + func (c *Client) GetWorkspace(ctx context.Context, workspaceID string) (*Workspace, error) + func (c *Client) ListWorkspaces(ctx context.Context) ([]Workspace, error) + func (c *Client) PromoteSandboxWorkspace(ctx context.Context, sandboxID string) (*Workspace, error) + type Workspace = control.Workspace v0.1.3 Jul 20, 2026 v0.1.2 Jul 20, 2026 v0.1.1 Jul 17, 2026 v0.1.0 Jul 16, 2026 Changes in this version + func TemplateToDockerfile(template *Template) (string, error) + func TemplateToJSON(template *Template, computeHashes bool) (string, error) + type Client struct + Build *build.Service + func NewClient(baseURL, apiKey string, opts ...core.TransportOption) (*Client, error) + func (c *Client) BuildTemplate(ctx context.Context, template *Template, name string, ...) (*TemplateBuildInfo, error) + func (c *Client) BuildTemplateInBackground(ctx context.Context, template *Template, name string, ...) (*TemplateBuildInfo, error) + func (c *Client) Connect(ctx context.Context, sandboxID string, opts *ConnectOptions) (*Sandbox, error) + func (c *Client) ConnectSandbox(ctx context.Context, sandboxID string, req *control.ConnectSandboxRequest) (*ConnectSandboxResponse, error) + func (c *Client) Create(ctx context.Context, templateID string, opts *CreateOptions) (*Sandbox, error) + func (c *Client) CreateSandbox(ctx context.Context, req *control.NewSandboxRequest) (*Sandbox, error) + func (c *Client) DeleteTemplate(ctx context.Context, ref string) error + func (c *Client) Get(ctx context.Context, sandboxID string) (*SandboxDetail, error) + func (c *Client) GetSandbox(ctx context.Context, sandboxID string) (*SandboxDetail, error) + func (c *Client) GetTemplate(ctx context.Context, ref string, opts *TemplateGetOptions) (*build.TemplateResponse, error) + func (c *Client) GetTemplateBuildStatus(ctx context.Context, templateID, buildID string, ...) (*build.BuildStatusResponse, error) + func (c *Client) List(ctx context.Context, opts *ListOptions) ([]*SandboxHandle, error) + func (c *Client) ListSandboxes(ctx context.Context, params *control.ListSandboxesParams) ([]*SandboxHandle, error) + func (c *Client) ListTemplates(ctx context.Context, opts *TemplateListOptions) ([]build.ListedTemplate, error) + func (c *Client) NewCMD(baseURL, accessToken string) (*cmd.Service, error) + func (c *Client) Runtime(baseURL, accessToken string) (*Runtime, error) + func (c *Client) RuntimeFromDetail(sandbox *control.SandboxDetail) (*Runtime, error) + func (c *Client) RuntimeFromSandbox(sandbox *control.Sandbox) (*Runtime, error) + func (c *Client) TemplateAliasExists(ctx context.Context, alias string) (bool, error) + func (c *Client) TemplateExists(ctx context.Context, ref string) (bool, error) + type CommandHandle struct + CmdID string + PID int + PTY bool + func (h *CommandHandle) Close() error + func (h *CommandHandle) CloseStdin(ctx context.Context) error + func (h *CommandHandle) Kill(ctx context.Context) (bool, error) + func (h *CommandHandle) SendStdin(ctx context.Context, data string) error + func (h *CommandHandle) Wait(ctx context.Context) (*CommandWaitResult, error) + type CommandResult struct + DurationMS int64 + Error string + ExitCode int + Stderr string + Stdout string + type CommandRunOptions struct + Args []string + CWD string + Envs map[string]string + Stdin *string + Timeout *int + type CommandWaitResult struct + ExitCode int + PTY string + Stderr string + Stdout string + type CommandsModule struct + func (m *CommandsModule) Connect(ctx context.Context, pid int) (*CommandHandle, error) + func (m *CommandsModule) Exec(ctx context.Context, command string, opts *CommandRunOptions) (*CommandResult, error) + func (m *CommandsModule) Kill(ctx context.Context, pid int) (bool, error) + func (m *CommandsModule) List(ctx context.Context) ([]cmd.ProcessInfo, error) + func (m *CommandsModule) Run(ctx context.Context, command string, opts *CommandRunOptions) (*CommandResult, error) + func (m *CommandsModule) SendStdin(ctx context.Context, pid int, data string) error + func (m *CommandsModule) Start(ctx context.Context, command string, opts *CommandRunOptions) (*CommandHandle, error) + type ConnectOptions struct + Timeout int32 + type ConnectSandboxResponse struct + Sandbox *Sandbox + StatusCode int + type CreateOptions struct + AutoPause *bool + EnvVars map[string]string + Metadata map[string]string + PollInterval time.Duration + TemplateID string + Timeout *int32 + VolumeMounts []control.VolumeMount + WaitReady *bool + WaitTimeout time.Duration + WorkspaceID string + type FilesystemModule struct + func (m *FilesystemModule) Exists(ctx context.Context, path string) (bool, error) + func (m *FilesystemModule) GetInfo(ctx context.Context, path string) (*cmd.EntryInfo, error) + func (m *FilesystemModule) List(ctx context.Context, path string, depth *int) ([]cmd.EntryInfo, error) + func (m *FilesystemModule) MakeDir(ctx context.Context, path string) (bool, error) + func (m *FilesystemModule) Read(ctx context.Context, path string) (string, error) + func (m *FilesystemModule) Remove(ctx context.Context, path string) error + func (m *FilesystemModule) Rename(ctx context.Context, oldPath, newPath string) (*cmd.EntryInfo, error) + func (m *FilesystemModule) WatchDir(ctx context.Context, path string, recursive *bool) (*cmd.FilesystemWatchStream, error) + func (m *FilesystemModule) Write(ctx context.Context, path string, data []byte) (*WriteInfo, error) + func (m *FilesystemModule) WriteFiles(ctx context.Context, files []cmd.WriteFileEntry) ([]WriteInfo, error) + type GatewayConfig struct + APIKey string + BaseURL string + ProjectID string + Timeout time.Duration + type GitCloneOptions struct + Branch string + Depth int + type GitCommandOptions struct + CWD string + Envs map[string]string + Timeout *int + User string + type GitModule struct + func (m *GitModule) Checkout(ctx context.Context, ref, path string, opts *GitCommandOptions) (*CommandResult, error) + func (m *GitModule) Clone(ctx context.Context, repoURL, path string, opts *GitCloneOptions) (*CommandResult, error) + func (m *GitModule) Pull(ctx context.Context, path string, opts *GitCommandOptions) (*CommandResult, error) + func (m *GitModule) Status(ctx context.Context, path string, opts *GitCommandOptions) (*CommandResult, error) + type ListOptions struct + Limit int + Metadata map[string]string + NextToken string + State []string + type LogEntry struct + Level string + Message string + Timestamp time.Time + func (l LogEntry) String() string + type PtyCreateOptions struct + Args []string + CWD string + Envs map[string]string + Size *cmd.PtySize + Timeout *int + type PtyModule struct + func (m *PtyModule) Connect(ctx context.Context, pid int) (*CommandHandle, error) + func (m *PtyModule) Create(ctx context.Context, command string, opts *PtyCreateOptions) (*CommandHandle, error) + func (m *PtyModule) Kill(ctx context.Context, pid int) (bool, error) + func (m *PtyModule) Resize(ctx context.Context, pid int, size cmd.PtySize) error + func (m *PtyModule) SendStdin(ctx context.Context, pid int, data string) error + type ReadyCmd struct + func WaitForCommand(command string) ReadyCmd + func WaitForFile(filename string) ReadyCmd + func WaitForPort(port int) ReadyCmd + func WaitForProcess(processName string) ReadyCmd + func WaitForTimeout(timeout time.Duration) ReadyCmd + func WaitForURL(rawURL string, statusCode int) ReadyCmd + func (r ReadyCmd) Command() string + type ResourceOperationError struct + CleanupAttempted bool + CleanupErr error + Err error + Operation string + RelatedID string + ResourceID string + ResourceType string + func (e *ResourceOperationError) Error() string + func (e *ResourceOperationError) Unwrap() error + type Runtime struct + type Sandbox struct + func (s *Sandbox) Commands() (*CommandsModule, error) + func (s *Sandbox) Connect(ctx context.Context, req *control.ConnectSandboxRequest) (*ConnectSandboxResponse, error) + func (s *Sandbox) Delete(ctx context.Context) error + func (s *Sandbox) Files() (*FilesystemModule, error) + func (s *Sandbox) GetHost(port int) (string, error) + func (s *Sandbox) GetInfo(ctx context.Context) (*SandboxDetail, error) + func (s *Sandbox) GetMetrics(ctx context.Context) (*cmd.MetricsResponse, error) + func (s *Sandbox) Git() (*GitModule, error) + func (s *Sandbox) IsRunning() bool + func (s *Sandbox) Kill(ctx context.Context) error + func (s *Sandbox) Logs(ctx context.Context, params *control.SandboxLogsParams) (*control.SandboxLogsResponse, error) + func (s *Sandbox) Pause(ctx context.Context) error + func (s *Sandbox) Proxy(ctx context.Context, req *cmd.ProxyRequest) (*http.Response, error) + func (s *Sandbox) Pty() (*PtyModule, error) + func (s *Sandbox) Refresh(ctx context.Context, req *control.RefreshSandboxRequest) error + func (s *Sandbox) Reload(ctx context.Context) (*SandboxDetail, error) + func (s *Sandbox) Resume(ctx context.Context, timeout int32) (*Sandbox, error) + func (s *Sandbox) Runtime() (*Runtime, error) + func (s *Sandbox) SetTimeout(ctx context.Context, req *control.TimeoutRequest) error + type SandboxDetail struct + func (s *SandboxDetail) Commands() (*CommandsModule, error) + func (s *SandboxDetail) Connect(ctx context.Context, req *control.ConnectSandboxRequest) (*ConnectSandboxResponse, error) + func (s *SandboxDetail) Delete(ctx context.Context) error + func (s *SandboxDetail) Files() (*FilesystemModule, error) + func (s *SandboxDetail) GetHost(port int) (string, error) + func (s *SandboxDetail) GetInfo(ctx context.Context) (*SandboxDetail, error) + func (s *SandboxDetail) GetMetrics(ctx context.Context) (*cmd.MetricsResponse, error) + func (s *SandboxDetail) Git() (*GitModule, error) + func (s *SandboxDetail) IsRunning() bool + func (s *SandboxDetail) Kill(ctx context.Context) error + func (s *SandboxDetail) Logs(ctx context.Context, params *control.SandboxLogsParams) (*control.SandboxLogsResponse, error) + func (s *SandboxDetail) Pause(ctx context.Context) error + func (s *SandboxDetail) Proxy(ctx context.Context, req *cmd.ProxyRequest) (*http.Response, error) + func (s *SandboxDetail) Pty() (*PtyModule, error) + func (s *SandboxDetail) Refresh(ctx context.Context, req *control.RefreshSandboxRequest) error + func (s *SandboxDetail) Reload(ctx context.Context) (*SandboxDetail, error) + func (s *SandboxDetail) Resume(ctx context.Context, timeout int32) (*Sandbox, error) + func (s *SandboxDetail) Runtime() (*Runtime, error) + func (s *SandboxDetail) SetTimeout(ctx context.Context, req *control.TimeoutRequest) error + type SandboxHandle struct + func (s *SandboxHandle) Connect(ctx context.Context, req *control.ConnectSandboxRequest) (*ConnectSandboxResponse, error) + func (s *SandboxHandle) Delete(ctx context.Context) error + func (s *SandboxHandle) GetInfo(ctx context.Context) (*SandboxDetail, error) + func (s *SandboxHandle) IsRunning() bool + func (s *SandboxHandle) Kill(ctx context.Context) error + func (s *SandboxHandle) Logs(ctx context.Context, params *control.SandboxLogsParams) (*control.SandboxLogsResponse, error) + func (s *SandboxHandle) Pause(ctx context.Context) error + func (s *SandboxHandle) Refresh(ctx context.Context, req *control.RefreshSandboxRequest) error + func (s *SandboxHandle) Reload(ctx context.Context) (*SandboxDetail, error) + func (s *SandboxHandle) Resume(ctx context.Context, timeout int32) (*Sandbox, error) + func (s *SandboxHandle) SetTimeout(ctx context.Context, req *control.TimeoutRequest) error + type Template struct + func NewTemplate() *Template + func (t *Template) AptInstall(packages []string, opts *TemplateAptInstallOptions) *Template + func (t *Template) BunInstall(packages []string, opts *TemplateBunInstallOptions) *Template + func (t *Template) Copy(src, dest string, opts *TemplateCopyOptions) *Template + func (t *Template) CopyItems(items []TemplateCopyItem) *Template + func (t *Template) FromAWSRegistry(image, accessKeyID, secretAccessKey, region string) *Template + func (t *Template) FromBaseImage() *Template + func (t *Template) FromBunImage(variant string) *Template + func (t *Template) FromDebianImage(variant string) *Template + func (t *Template) FromDockerfile(dockerfileContentOrPath string) (*Template, error) + func (t *Template) FromGCPRegistry(image string, serviceAccountJSON any) *Template + func (t *Template) FromImage(image string, registryConfig ...map[string]any) *Template + func (t *Template) FromNodeImage(variant string) *Template + func (t *Template) FromPythonImage(version string) *Template + func (t *Template) FromTemplate(templateID string) *Template + func (t *Template) FromUbuntuImage(variant string) *Template + func (t *Template) GitClone(repoURL, path string, opts *TemplateGitCloneOptions) *Template + func (t *Template) MakeDir(paths []string, opts *TemplateMakeDirOptions) *Template + func (t *Template) MakeSymlink(src, dest string, opts *TemplateMakeSymlinkOptions) *Template + func (t *Template) NpmInstall(packages []string, opts *TemplateNpmInstallOptions) *Template + func (t *Template) PipInstall(packages []string, opts *TemplatePipInstallOptions) *Template + func (t *Template) Remove(paths []string, opts *TemplateRemoveOptions) *Template + func (t *Template) Rename(src, dest string, opts *TemplateRenameOptions) *Template + func (t *Template) Request() *build.BuildRequest + func (t *Template) RunCmd(command string, opts *TemplateCommandOptions) *Template + func (t *Template) RunCmds(commands []string, opts *TemplateCommandOptions) *Template + func (t *Template) SetEnvs(envs map[string]string) *Template + func (t *Template) SetReadyCmd(readyCommand ReadyCmd) *Template + func (t *Template) SetStartCmd(startCommand string, readyCommand ReadyCmd) *Template + func (t *Template) SetUser(user string) *Template + func (t *Template) SetWorkdir(path string) *Template + func (t *Template) SkipCache() *Template + type TemplateAptInstallOptions struct + Force *bool + NoInstallRecommends bool + type TemplateBuildInfo struct + Build *build.BuildResponse + BuildID string + Name string + Status string + Tags []string + Template *build.TemplateResponse + TemplateID string + type TemplateBuildOptions struct + BaseTemplateID string + CPUCount *int32 + Envs map[string]string + MemoryMB *int32 + OnBuildLog func(LogEntry) + PollInterval time.Duration + Tags []string + Visibility string + VolumeMounts []build.TemplateVolumeMount + Wait *bool + WaitTimeout time.Duration + Workdir string + type TemplateBuildStatusOptions struct + Level string + Limit *int + LogsOffset *int + type TemplateBunInstallOptions struct + Dev bool + Force *bool + G bool + type TemplateCommandOptions struct + Force *bool + User string + type TemplateCopyItem struct + Dest string + FilesHash string + ForceUpload bool + Mode *int + ResolveSymlinks bool + Src string + Srcs []string + type TemplateCopyOptions struct + FilesHash string + ForceUpload bool + Mode *int + ResolveSymlinks bool + type TemplateGetOptions struct + Limit int + NextToken string + type TemplateGitCloneOptions struct + Branch string + Depth int + Force *bool + User string + type TemplateListOptions struct + Limit int + Offset int + TeamID string + Visibility string + type TemplateMakeDirOptions struct + Mode *int + type TemplateMakeSymlinkOptions struct + type TemplateNpmInstallOptions struct + Dev bool + Force *bool + G bool + type TemplatePathOptions struct + Force *bool + User string + type TemplatePipInstallOptions struct + Force *bool + G *bool + type TemplateRemoveOptions struct + Recursive bool + type TemplateRenameOptions struct + type WriteInfo struct + BytesWritten int64 + Path string