Documentation
¶
Overview ¶
Package zipbox is the Go SDK for Zipbox: create boxes, run commands, move files, open terminals and publish ports from code.
c := zipbox.New("") // reads ZIPBOX_API_KEY
box, err := c.Sandboxes.GetOrCreate(ctx, "demo", zipbox.CreateOptions{Tier: "s"})
res, err := box.Exec(ctx, "echo hello")
fmt.Print(res.Stdout)
Nothing on a box stops on a clock, and no call has a default deadline: pass a context with a deadline when you want one.
Index ¶
- Constants
- Variables
- func IsCode(err error, code ErrorCode) bool
- func ResolvePath(p string) string
- type APIKey
- type AccountService
- type Action
- type Box
- func (b *Box) CancelTransition(ctx context.Context) (TransitionCancelOutcome, error)
- func (b *Box) Command(id string) *Command
- func (b *Box) Delete(ctx context.Context, opts DeleteOptions) error
- func (b *Box) Exec(ctx context.Context, cmd string, opts ...ExecOption) (*ExecResult, error)
- func (b *Box) ExecArgv(ctx context.Context, argv []string, opts ...ExecOption) (*ExecResult, error)
- func (b *Box) ExecBackground(ctx context.Context, cmd string, opts ...ExecOption) (*Command, error)
- func (b *Box) ExecBackgroundArgv(ctx context.Context, argv []string, opts ...ExecOption) (*Command, error)
- func (b *Box) ExecStream(ctx context.Context, cmd string, opts ...ExecOption) (*ExecStream, error)
- func (b *Box) ExecStreamArgv(ctx context.Context, argv []string, opts ...ExecOption) (*ExecStream, error)
- func (b *Box) Fork(ctx context.Context, opts ForkOptions) (*Box, error)
- func (b *Box) ForkStatus(ctx context.Context) (*SandboxFork, error)
- func (b *Box) Logs(ctx context.Context, opts LogOptions) (string, error)
- func (b *Box) Pause(ctx context.Context) (*SandboxDetail, error)
- func (b *Box) Refresh(ctx context.Context) (*SandboxDetail, error)
- func (b *Box) Restart(ctx context.Context) error
- func (b *Box) Resume(ctx context.Context) (*SandboxDetail, error)
- func (b *Box) RunCode(ctx context.Context, lang Language, code string, opts ...ExecOption) (*ExecResult, error)
- func (b *Box) SSHInfo(ctx context.Context) (*SSHInfo, error)
- func (b *Box) Screenshot(ctx context.Context) ([]byte, error)
- func (b *Box) SetPrivate(ctx context.Context, enabled bool) error
- func (b *Box) SetTier(ctx context.Context, tier string) error
- func (b *Box) Start(ctx context.Context) (*SandboxDetail, error)
- func (b *Box) Stop(ctx context.Context) (*SandboxDetail, error)
- func (b *Box) WaitReady(ctx context.Context) (*SandboxDetail, error)
- type Client
- type Command
- func (c *Command) CloseStdin(ctx context.Context) error
- func (c *Command) Events(ctx context.Context, since string) (*ExecStream, error)
- func (c *Command) Get(ctx context.Context) (*CommandRecord, error)
- func (c *Command) Signal(ctx context.Context, sig Signal) error
- func (c *Command) Stdin(ctx context.Context, r io.Reader) error
- func (c *Command) Wait(ctx context.Context) (*ExecResult, error)
- type CommandRecord
- type CommandsService
- func (s *CommandsService) CloseStdin(ctx context.Context, id string) error
- func (s *CommandsService) Events(ctx context.Context, id, since string) (*ExecStream, error)
- func (s *CommandsService) Get(ctx context.Context, id string) (*CommandRecord, error)
- func (s *CommandsService) List(ctx context.Context) ([]CommandRecord, error)
- func (s *CommandsService) Signal(ctx context.Context, id string, sig Signal) error
- func (s *CommandsService) Stdin(ctx context.Context, id string, r io.Reader) error
- type CreateOptions
- type DeleteOptions
- type Error
- type ErrorCode
- type ExecEvent
- type ExecEventType
- type ExecOption
- type ExecResult
- type ExecStream
- type FileEntry
- type FileKind
- type FilesService
- func (s *FilesService) Copy(ctx context.Context, src, dst string) error
- func (s *FilesService) Delete(ctx context.Context, p string) error
- func (s *FilesService) Download(ctx context.Context, remotePath, localPath string) error
- func (s *FilesService) List(ctx context.Context, p string) ([]FileEntry, error)
- func (s *FilesService) Mkdir(ctx context.Context, p string) error
- func (s *FilesService) Move(ctx context.Context, src, dst string) error
- func (s *FilesService) Read(ctx context.Context, p string) ([]byte, error)
- func (s *FilesService) ReadTo(ctx context.Context, p string, w io.Writer) (int64, error)
- func (s *FilesService) Stat(ctx context.Context, p string) (*FileEntry, error)
- func (s *FilesService) Upload(ctx context.Context, localPath, remotePath string) error
- func (s *FilesService) Write(ctx context.Context, p string, content io.Reader) error
- type ForkError
- type ForkOptions
- type ForkPhase
- type ForkSourcePolicy
- type ForkSourceRecovery
- type Language
- type LogOptions
- type MachineSize
- type Option
- type Phase
- type Preview
- type PreviewService
- type Pty
- type PtyOptions
- type PtyService
- type Readiness
- type SSHInfo
- type Sandbox
- type SandboxDetail
- type SandboxFork
- type SandboxesService
- func (s *SandboxesService) CancelTransition(ctx context.Context, id string) (TransitionCancelOutcome, error)
- func (s *SandboxesService) Create(ctx context.Context, opts CreateOptions) (*Box, error)
- func (s *SandboxesService) Delete(ctx context.Context, id string, opts DeleteOptions) error
- func (s *SandboxesService) Fork(ctx context.Context, sourceID string, opts ForkOptions) (*Box, error)
- func (s *SandboxesService) Get(ctx context.Context, id string) (*SandboxDetail, error)
- func (s *SandboxesService) GetFork(ctx context.Context, childID string) (*SandboxFork, error)
- func (s *SandboxesService) GetOrCreate(ctx context.Context, name string, opts CreateOptions) (*Box, error)
- func (s *SandboxesService) List(ctx context.Context) ([]Sandbox, error)
- func (s *SandboxesService) Pause(ctx context.Context, id string) (*Box, error)
- func (s *SandboxesService) Restart(ctx context.Context, id string) error
- func (s *SandboxesService) Resume(ctx context.Context, id string) (*Box, error)
- func (s *SandboxesService) SetTier(ctx context.Context, id, tier string) error
- func (s *SandboxesService) Start(ctx context.Context, id string) (*Box, error)
- func (s *SandboxesService) Stop(ctx context.Context, id string) (*Box, error)
- func (s *SandboxesService) WaitReady(ctx context.Context, id string) (*Box, error)
- type Signal
- type Status
- type TailscalePeer
- type TailscaleService
- type TailscaleState
- type TailscaleStatus
- type TransitionCancelOutcome
- type WhoAmI
Constants ¶
const DefaultBaseURL = "https://api.tribes.xyz"
DefaultBaseURL is the Zipbox control plane.
const MaxFileBytes = 250 * 1024 * 1024
MaxFileBytes is the largest file one read or write moves (250 MiB).
const Version = "0.2.1"
Version is the SDK version, sent in the User-Agent header.
const WorkspaceDir = "/root/workspace"
WorkspaceDir is where relative paths resolve and commands start by default.
Variables ¶
var ErrPtyClosed = errors.New("zipbox: the terminal is closed")
ErrPtyClosed is returned by Pty methods after Close or Detach.
var ErrPtyTaken = errors.New("zipbox: the terminal session was taken over by another client")
ErrPtyTaken is returned by Pty.Read when another client took the session over.
Functions ¶
func ResolvePath ¶
ResolvePath joins a relative path to WorkspaceDir; an absolute path is cleaned.
Types ¶
type APIKey ¶
type APIKey struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Last4 string `json:"last4"`
CreatedAt time.Time `json:"createdAt"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
}
APIKey is an account API key as listed in Settings (never the secret).
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
AccountService reads account state. Reach it as Client.Account.
func (*AccountService) Balance ¶
Balance returns the credit balance and auto top-up state, as the dashboard reads them. The shape is not part of the stable contract.
type Box ¶
type Box struct {
// ID is the box id.
ID string
// Detail is the last box row this handle read, when it read one.
Detail *SandboxDetail
// Files reads and writes the box's filesystem.
Files *FilesService
// Commands manages commands started with ExecBackground.
Commands *CommandsService
// Pty opens interactive terminals on the box.
Pty *PtyService
// Preview publishes a local port at a public HTTPS URL.
Preview *PreviewService
// Tailscale joins the box to your own tailnet.
Tailscale *TailscaleService
// contains filtered or unexported fields
}
Box is a handle to one box. It is cheap to create (Client.Sandbox makes no call) and safe for concurrent use. The box token it needs is fetched on first use and cached by the client.
func (*Box) CancelTransition ¶ added in v0.1.7
func (b *Box) CancelTransition(ctx context.Context) (TransitionCancelOutcome, error)
CancelTransition cancels the box's state change in flight (see SandboxesService.CancelTransition).
func (*Box) Delete ¶ added in v0.1.5
func (b *Box) Delete(ctx context.Context, opts DeleteOptions) error
Delete deletes the box (see SandboxesService.Delete).
func (*Box) Exec ¶
func (b *Box) Exec(ctx context.Context, cmd string, opts ...ExecOption) (*ExecResult, error)
Exec runs cmd through `bash -lc` (so PATH, nvm, pyenv and the harness env are present) and waits for it to exit.
func (*Box) ExecArgv ¶
func (b *Box) ExecArgv(ctx context.Context, argv []string, opts ...ExecOption) (*ExecResult, error)
ExecArgv spawns argv directly, without a shell, and waits for it to exit.
func (*Box) ExecBackground ¶
ExecBackground starts cmd through `bash -lc` and returns as soon as it is running. The command keeps running whether or not anyone is attached, and survives a restart of the box's agent. Follow it with Command.Wait or Command.Events.
func (*Box) ExecBackgroundArgv ¶ added in v0.1.5
func (b *Box) ExecBackgroundArgv(ctx context.Context, argv []string, opts ...ExecOption) (*Command, error)
ExecBackgroundArgv is ExecBackground for argv spawned directly, without a shell.
func (*Box) ExecStream ¶
func (b *Box) ExecStream(ctx context.Context, cmd string, opts ...ExecOption) (*ExecStream, error)
ExecStream runs cmd through `bash -lc` and streams its events. The command is killed if the stream is closed before it exits; use ExecBackground for a command that must outlive the caller.
func (*Box) ExecStreamArgv ¶ added in v0.1.5
func (b *Box) ExecStreamArgv(ctx context.Context, argv []string, opts ...ExecOption) (*ExecStream, error)
ExecStreamArgv is ExecStream for argv spawned directly, without a shell.
func (*Box) Fork ¶ added in v0.1.7
Fork makes a new box from this one (see SandboxesService.Fork) and returns the new box.
func (*Box) ForkStatus ¶ added in v0.1.7
func (b *Box) ForkStatus(ctx context.Context) (*SandboxFork, error)
ForkStatus returns the fork that is making (or made) this box (see SandboxesService.GetFork).
func (*Box) Logs ¶
Logs returns the box's system journal (journalctl). Command output is its own log: see Commands.Events.
func (*Box) Pause ¶ added in v0.2.0
func (b *Box) Pause(ctx context.Context) (*SandboxDetail, error)
Pause pauses the box (nothing billed while paused) and returns its row, paused (see SandboxesService.Pause).
func (*Box) Refresh ¶
func (b *Box) Refresh(ctx context.Context) (*SandboxDetail, error)
Refresh re-reads the box row.
func (*Box) Restart ¶ added in v0.1.5
Restart hard-restarts the box. Files survive; running processes do not.
func (*Box) Resume ¶ added in v0.2.0
func (b *Box) Resume(ctx context.Context) (*SandboxDetail, error)
Resume resumes the paused box and returns its row, ready. A box still stopping is resumed once its Pause lands (see SandboxesService.Resume).
func (*Box) RunCode ¶
func (b *Box) RunCode(ctx context.Context, lang Language, code string, opts ...ExecOption) (*ExecResult, error)
RunCode writes code to a temporary file on the box, runs it with python3, node (as an ES module) or bash through the login shell, then removes it. It is sugar over Files.Write and Exec.
func (*Box) SSHInfo ¶
SSHInfo returns the box's SSH address and the command line that reaches it. Your public key must be on the box (Settings → SSH keys, or SSHPublicKey at create).
func (*Box) Screenshot ¶
Screenshot returns a PNG of the box's desktop. The desktop must be running (open it from the dashboard or start the browser).
func (*Box) SetPrivate ¶ added in v0.1.5
SetPrivate turns private mode ("tailnet only") on or off. A private box closes every public way in: its URLs, previews, terminal, IDE, desktop and SSH answer only devices on your tailnet. Turning it on needs the box connected to a tailnet (tailnet_not_connected otherwise).
func (*Box) SetTier ¶ added in v0.1.5
SetTier moves the box to another tier. A running box restarts into it.
func (*Box) Start ¶ added in v0.1.5
func (b *Box) Start(ctx context.Context) (*SandboxDetail, error)
Start is an alias of Resume: the same request and the same result.
type Client ¶
type Client struct {
// Sandboxes creates, lists and manages boxes.
Sandboxes *SandboxesService
// Account reads the account's balance and usage.
Account *AccountService
// contains filtered or unexported fields
}
Client is a Zipbox API client. It is safe for concurrent use. Box tokens are fetched lazily per box and cached for the client's lifetime.
type Command ¶
type Command struct {
CommandRecord
// contains filtered or unexported fields
}
Command is a handle to a command on a box.
func (*Command) CloseStdin ¶
CloseStdin closes the command's stdin.
func (*Command) Get ¶
func (c *Command) Get(ctx context.Context) (*CommandRecord, error)
Get re-reads the command's record.
func (*Command) Wait ¶
func (c *Command) Wait(ctx context.Context) (*ExecResult, error)
Wait follows the command until it exits and returns everything it printed. A dropped stream is resumed from its cursor with backoff, without limit; only an answered error (not_found, unauthorized, …) or ctx ends the wait.
type CommandRecord ¶
type CommandRecord struct {
ID string `json:"id"`
State string `json:"state"`
Argv []string `json:"argv"`
Cwd string `json:"cwd"`
Background bool `json:"background"`
// ExitCode is nil while the command runs.
ExitCode *int `json:"exitCode,omitempty"`
Signal *string `json:"signal,omitempty"`
TimedOut bool `json:"timedOut"`
StartedAt time.Time `json:"startedAt"`
EndedAt *time.Time `json:"endedAt,omitempty"`
StdoutBytes int64 `json:"stdoutBytes"`
StderrBytes int64 `json:"stderrBytes"`
}
CommandRecord is a command as the box reports it.
type CommandsService ¶
type CommandsService struct {
// contains filtered or unexported fields
}
CommandsService manages a box's commands. Reach it as Box.Commands.
func (*CommandsService) CloseStdin ¶
func (s *CommandsService) CloseStdin(ctx context.Context, id string) error
CloseStdin closes a command's stdin.
func (*CommandsService) Events ¶
func (s *CommandsService) Events(ctx context.Context, id, since string) (*ExecStream, error)
Events replays a command's events after since ("" = from the start) and follows it until it exits, re-attaching from the last cursor whenever the stream drops (see ExecStream). An answered error on the first attach is returned here.
func (*CommandsService) Get ¶
func (s *CommandsService) Get(ctx context.Context, id string) (*CommandRecord, error)
Get returns one command's record.
func (*CommandsService) List ¶
func (s *CommandsService) List(ctx context.Context) ([]CommandRecord, error)
List returns running and recently finished commands.
type CreateOptions ¶
type CreateOptions struct {
// Name is the box's permanent subdomain. Empty = the account's default box.
Name string
// Tier is the machine size (xs, s, m, l, xl, xxl). Empty = the default tier.
Tier string
// SSHPublicKey is an OpenSSH public key line authorized on the box.
SSHPublicKey string
// Mailbox creates the box's mailbox now. False = created the first time the box uses mail.
Mailbox bool
// Private starts the box in private mode ("tailnet only"): it is never public.
// A private box is not ready until it joins your tailnet, so Create returns
// once it is running with its key; then call Box.Tailscale.Connect.
Private bool
}
CreateOptions configures a new box. GetOrCreate takes the same options and applies them only when it creates the box.
type DeleteOptions ¶ added in v0.1.5
type DeleteOptions struct {
// Archive keeps a recoverable copy for 30 days. Nil = the server default (true).
Archive *bool
}
DeleteOptions configures Delete.
type Error ¶
type Error struct {
// Code is the public error code.
Code ErrorCode `json:"code"`
// Status is the HTTP status, or 0 when the error did not come from a response.
Status int `json:"status,omitempty"`
// Message is a human-readable description.
Message string `json:"message"`
// RequestID identifies the request in Zipbox's logs, when the server sent one.
RequestID string `json:"requestId,omitempty"`
// Retryable reports whether the same request may succeed if sent again later.
Retryable bool `json:"retryable"`
// RetryAfter is how long the server asked the caller to wait, when it said. JSON
// carries it as retryAfterMs, the envelope's name (see MarshalJSON).
RetryAfter time.Duration `json:"-"`
// DocsURL points at the docs entry for Code.
DocsURL string `json:"docsUrl"`
// contains filtered or unexported fields
}
Error is the single error type every SDK call returns for a failure the control plane or a box reported (and for a box that is not ready). Use errors.As to inspect it:
var zerr *zipbox.Error
if errors.As(err, &zerr) && zerr.Code == zipbox.CodeNotFound { … }
A command that exits non-zero is a result, never an Error.
func (*Error) MarshalJSON ¶ added in v0.1.7
MarshalJSON writes the error's fields plus retryAfterMs, RetryAfter in milliseconds, when the server said how long to wait.
type ErrorCode ¶
type ErrorCode string
ErrorCode is the public error code carried by every Zipbox error. The code is the contract; the message is for humans and may change.
const ( CodeInvalidRequest ErrorCode = "invalid_request" CodeForbidden ErrorCode = "forbidden" CodeNotFound ErrorCode = "not_found" CodeInsufficientCredits ErrorCode = "insufficient_credits" CodeConflict ErrorCode = "conflict" CodeRateLimited ErrorCode = "rate_limited" CodeBoxNotRunning ErrorCode = "box_not_running" // CodeMachineLimitReached: the account holds 250 machine names (a deleted box // keeps its name); reuse one instead of creating a new one. Never retried. See // https://zipbox.ai/docs/machine-limit. CodeMachineLimitReached ErrorCode = "machine_limit_reached" // CodeBoxKeyChanged: the box's key changed between reading it and sending a // sealed credential (a claim re-mints it). Tailscale.Connect re-seals once. CodeBoxKeyChanged ErrorCode = "box_key_changed" // CodeTailnetNotConnected: private mode needs the box on a tailnet first. CodeTailnetNotConnected ErrorCode = "tailnet_not_connected" CodeTailscaleUnavailableEgressLockdown ErrorCode = "tailscale_unavailable_egress_lockdown" // CodeTailscaleRequiresUpdate: the box's ZipOS predates Tailscale; accept the ZipOS update first. CodeTailscaleRequiresUpdate ErrorCode = "tailscale_requires_update" // CodeBoxPrivateUnreachable: the box is private and this device is not on its tailnet. CodeBoxPrivateUnreachable ErrorCode = "box_private_unreachable" // CodeNameTaken: the requested name is in use. CodeNameTaken ErrorCode = "name_taken" // CodeSourceUnsupported: the source is not a machine a fork supports (its class, // or, as a fork's own error, its disk layout). CodeSourceUnsupported ErrorCode = "source_unsupported" // CodeSourceBusy: the source has another change in flight. CodeSourceBusy ErrorCode = "source_busy" // CodePauseRequired: the source is running and the fork did not allow pausing it // (ForkPauseAndResume). CodePauseRequired ErrorCode = "pause_required" // CodeRequiresInteractive: copying the source's machine-scoped credentials needs // the owner signed in to the dashboard, not an API key. CodeRequiresInteractive ErrorCode = "requires_interactive" // CodeIdempotencyMismatch: the Idempotency-Key was already used for a different request. CodeIdempotencyMismatch ErrorCode = "idempotency_mismatch" // CodeSourceGone: the source was deleted before it was captured. CodeSourceGone ErrorCode = "source_gone" // CodeIdentityReused: the new box came up with the source's key, so it was // stopped before serving and its disk discarded. CodeIdentityReused ErrorCode = "identity_reused" // CodeCopyFailed: the isolated copy could not produce a verified filesystem. CodeCopyFailed ErrorCode = "copy_failed" // CodeStartFailed: the new box failed to boot. CodeStartFailed ErrorCode = "start_failed" )
The public error codes. See https://zipbox.ai/docs/errors for causes and fixes.
type ExecEvent ¶
type ExecEvent struct {
Type ExecEventType `json:"type"`
// Cursor resumes the stream after this event (Commands.Events since).
Cursor string `json:"cursor"`
// ID is set on start.
ID string `json:"id,omitempty"`
// Data is set on stdout and stderr.
Data string `json:"data,omitempty"`
// Stream and Message are set on gap: output past the 64 MiB per-stream cap
// was discarded (the process keeps running).
Stream string `json:"stream,omitempty"`
Message string `json:"message,omitempty"`
// State, ExitCode, Signal and TimedOut are set on exit.
State string `json:"state,omitempty"`
ExitCode *int `json:"exitCode,omitempty"`
Signal *string `json:"signal,omitempty"`
TimedOut bool `json:"timedOut,omitempty"`
}
ExecEvent is one event on a command's stream. Which fields are set depends on Type.
type ExecEventType ¶
type ExecEventType string
ExecEventType is the kind of an ExecEvent.
const ( EventStart ExecEventType = "start" EventStdout ExecEventType = "stdout" EventStderr ExecEventType = "stderr" EventGap ExecEventType = "gap" EventExit ExecEventType = "exit" )
Event types on a command's stream.
type ExecOption ¶
type ExecOption func(*execRequest)
ExecOption configures a command.
func WithCwd ¶
func WithCwd(dir string) ExecOption
WithCwd sets the working directory: absolute, or relative to /root/workspace (the default).
func WithEnv ¶
func WithEnv(env map[string]string) ExecOption
WithEnv adds environment variables on top of the box's own.
func WithStdin ¶
func WithStdin() ExecOption
WithStdin opens a stdin pipe fed by Command.Stdin. Default: /dev/null.
func WithTimeout ¶
func WithTimeout(d time.Duration) ExecOption
WithTimeout asks the box to kill the command after d. Without it a command runs until it exits or is signalled.
func WithUser ¶
func WithUser(user string) ExecOption
WithUser runs the command as another local user. Default: the box user (root).
type ExecResult ¶
type ExecResult struct {
// ID is the command id on the box.
ID string `json:"id"`
// ExitCode is shell-style: 0..255, 128+N when killed by signal N, -1 when
// the box lost track of the process (state "unknown").
ExitCode int `json:"exitCode"`
// Stdout and Stderr are the command's output, decoded as UTF-8.
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
// Signal is the signal the box delivered (a Signal call or a timeout), if any.
Signal *string `json:"signal,omitempty"`
// TimedOut is true when WithTimeout ended the command.
TimedOut bool `json:"timedOut"`
}
ExecResult is a finished command. A non-zero ExitCode is a result, not an error.
type ExecStream ¶
type ExecStream struct {
// contains filtered or unexported fields
}
ExecStream reads a command's events. Use it like bufio.Scanner and always Close it:
for stream.Next() { ev := stream.Event() … }
if err := stream.Err(); err != nil { … }
A stream that drops once its command has started re-attaches from the last cursor by itself: a followed command is a live surface, so there is no attempt ceiling, the backoff is capped and jittered (WithBackoff), and the ladder resets only when an event arrives. Only an answered error, ctx or Close ends it.
func (*ExecStream) Close ¶
func (s *ExecStream) Close() error
Close releases the stream and stops it re-attaching; a Next in flight returns false. Closing the stream of a foreground Exec before it exits makes the box kill the command.
func (*ExecStream) Cursor ¶
func (s *ExecStream) Cursor() string
Cursor is the resume cursor after the last event read.
func (*ExecStream) Err ¶
func (s *ExecStream) Err() error
Err returns the error that stopped the stream, or nil after a clean exit event.
func (*ExecStream) Next ¶
func (s *ExecStream) Next() bool
Next advances to the next event. It returns false after the exit event, or on an error that ends the stream (see Err).
type FileEntry ¶
type FileEntry struct {
Name string `json:"name"`
Kind FileKind `json:"kind"`
SizeBytes int64 `json:"sizeBytes"`
ModifiedAtMs int64 `json:"modifiedAtMs"`
}
FileEntry is one directory entry.
func (FileEntry) ModifiedAt ¶
ModifiedAt is the entry's modification time.
type FilesService ¶
type FilesService struct {
// contains filtered or unexported fields
}
FilesService reads and writes a box's filesystem. Reach it as Box.Files. Paths are absolute, or relative to /root/workspace.
func (*FilesService) Copy ¶
func (s *FilesService) Copy(ctx context.Context, src, dst string) error
Copy copies src to dst.
func (*FilesService) Delete ¶
func (s *FilesService) Delete(ctx context.Context, p string) error
Delete deletes a file or directory.
func (*FilesService) Download ¶
func (s *FilesService) Download(ctx context.Context, remotePath, localPath string) error
Download copies a file from the box to localPath, replacing it.
func (*FilesService) Mkdir ¶
func (s *FilesService) Mkdir(ctx context.Context, p string) error
Mkdir creates a directory.
func (*FilesService) Move ¶
func (s *FilesService) Move(ctx context.Context, src, dst string) error
Move moves or renames src to dst.
type ForkError ¶ added in v0.1.7
ForkError is why a fork ended without a box. Code is one of CodeSourceUnsupported, CodeSourceGone, CodeIdentityReused, CodeCopyFailed or CodeStartFailed.
type ForkOptions ¶ added in v0.1.7
type ForkOptions struct {
// Name is the new box's permanent subdomain. It is kept even if the fork is cancelled.
Name string
// SourcePolicy is ForkRequirePaused or ForkPauseAndResume.
SourcePolicy ForkSourcePolicy
// Private starts the new box in private mode ("tailnet only"): never public,
// reachable only from your tailnet once it joins. False (the default) starts
// it public, whatever the source's privacy.
Private bool
// TailscaleAuthKey, when set, joins the new box to your tailnet once it runs:
// it is sealed on this machine to the new box's own key and never sent to
// /fork. Needs the wait (NoWait false).
TailscaleAuthKey string `json:"-"`
// NoWait returns the new box as soon as the fork is accepted, without waiting
// until it is ready. False (the default) waits.
NoWait bool
}
ForkOptions configures Fork. Name and SourcePolicy are required.
Printing ForkOptions (any fmt verb) or marshalling it never shows TailscaleAuthKey.
func (ForkOptions) Format ¶ added in v0.1.7
func (o ForkOptions) Format(f fmt.State, verb rune)
Format makes every fmt verb print the redacted form, so no verb can reach the key.
func (ForkOptions) GoString ¶ added in v0.1.7
func (o ForkOptions) GoString() string
GoString is %#v, with the Tailscale auth key redacted.
func (ForkOptions) String ¶ added in v0.1.7
func (o ForkOptions) String() string
String prints the options with the Tailscale auth key redacted.
type ForkPhase ¶ added in v0.1.7
type ForkPhase string
ForkPhase is where a fork operation stands. Kept as a string, so a later phase never breaks decoding.
const ( // ForkPreparingIdentity: the new box's name and mailbox address are being reserved. ForkPreparingIdentity ForkPhase = "preparing_identity" // ForkQueued: the new box exists; the capture waits its turn on the source. ForkQueued ForkPhase = "queued" // ForkCapturing: the source's disk is being captured. ForkCapturing ForkPhase = "capturing" // ForkCopying: the allowed files are being copied into the new box's fresh filesystem. ForkCopying ForkPhase = "copying" // ForkStarting: the new box boots. ForkStarting ForkPhase = "starting" // ForkComplete: the new box has its own disk and serves. ForkComplete ForkPhase = "complete" // ForkCancelling: a cancel is on its way. ForkCancelling ForkPhase = "cancelling" // ForkCancelled: the fork was cancelled; the new box was discarded, its name kept. ForkCancelled ForkPhase = "cancelled" // ForkFailed: the fork ended without a box; SandboxFork.Error says why. ForkFailed ForkPhase = "failed" )
Fork phases.
type ForkSourcePolicy ¶ added in v0.1.7
type ForkSourcePolicy string
ForkSourcePolicy is how a fork may treat its source box.
const ( // ForkRequirePaused refuses a running source (CodePauseRequired). A paused // source stays paused. ForkRequirePaused ForkSourcePolicy = "require_paused" // ForkPauseAndResume lets a running source pause for its capture: its sessions // disconnect and it resumes right after. A paused source stays paused. ForkPauseAndResume ForkSourcePolicy = "pause_and_resume" )
type ForkSourceRecovery ¶ added in v0.1.7
type ForkSourceRecovery string
ForkSourceRecovery is where a fork's source stands.
const ( // ForkSourceNotNeeded: the source was paused and stays paused. ForkSourceNotNeeded ForkSourceRecovery = "not_needed" // ForkSourcePending: the fork paused the source and owes its resume. ForkSourcePending ForkSourceRecovery = "pending" // ForkSourceResumed: the source runs again. ForkSourceResumed ForkSourceRecovery = "resumed" // ForkSourceSuperseded: a newer owner action (a pause, a delete) replaced the resume. ForkSourceSuperseded ForkSourceRecovery = "superseded" )
Source recovery states.
type LogOptions ¶
type LogOptions struct {
// Since is a journalctl time ("1 hour ago", "2026-10-19 10:00"). Empty = all.
Since string
// Lines limits output to the last N lines. 0 = no limit.
Lines int
// Unit restricts to one systemd unit.
Unit string
}
LogOptions filters Logs.
type MachineSize ¶
type MachineSize struct {
VCPUs int `json:"vcpus"`
MemMiB int `json:"memMib"`
DiskGB int `json:"diskGb"`
}
MachineSize is the resolved size a box runs at.
type Option ¶
type Option func(*Client)
Option configures a Client.
func WithBackoff ¶
WithBackoff sets the exponential backoff used between retries and command stream reconnects: the first delay and the cap. Default 500ms and 30s.
func WithBaseURL ¶
WithBaseURL sets the control plane URL (default ZIPBOX_API_URL or DefaultBaseURL).
func WithHTTPClient ¶
WithHTTPClient sets the HTTP client. The default has no timeout.
func WithMaxRetries ¶
WithMaxRetries sets how many times a retryable failure (rate_limited, unavailable) of a GET or a create is retried. Default 3.
func WithPollInterval ¶
WithPollInterval sets how often Create re-reads a box while it boots: the first delay and the cap. Default 1s and 10s; each delay grows 1.25x, with jitter.
func WithPtyBackoff ¶ added in v0.1.5
WithPtyBackoff sets the backoff between PTY reconnects: the first delay and the cap. Default 500ms and 30s. There is no attempt ceiling.
type Phase ¶ added in v0.1.7
type Phase string
Phase is what a box is doing now. Kept a string: a later value must not break parsing.
const ( PhaseStarting Phase = "starting" PhaseRunning Phase = "running" PhaseStopping Phase = "stopping" PhasePaused Phase = "paused" PhaseResizing Phase = "resizing" PhaseForking Phase = "forking" PhaseDeleting Phase = "deleting" PhaseDeleteFailed Phase = "delete_failed" // a delete was refused; the box still runs PhaseStartFailed Phase = "start_failed" PhaseGone Phase = "gone" )
Box phases. Transition (on the full row) says how far a change has got.
type Preview ¶
type Preview struct {
// URL is the HTTPS address, e.g. https://web.demo.zbox.sh.
URL string `json:"url"`
// Label is the subdomain label.
Label string `json:"label"`
// Host is the full hostname.
Host string `json:"host"`
}
Preview is a published port.
type PreviewService ¶
type PreviewService struct {
// contains filtered or unexported fields
}
PreviewService publishes ports on a box. Reach it as Box.Preview.
type Pty ¶
type Pty struct {
// SessionID names the session on the box (bash-<uuid>).
SessionID string
// ClientID identifies this client to the box; it is reused on reconnect.
ClientID string
// contains filtered or unexported fields
}
Pty is an attached terminal. Read returns the session's output (io.EOF once the shell exits); Write sends keystrokes. A dropped connection reconnects by itself with exponential backoff and no attempt limit; Write waits for it.
type PtyOptions ¶
type PtyOptions struct {
// Cols and Rows are the initial size. Zero leaves the box's default.
Cols, Rows int
// ClientLabel names this client in the box's session list. Default "zipbox-sdk".
ClientLabel string
}
PtyOptions configures a terminal.
type PtyService ¶
type PtyService struct {
// contains filtered or unexported fields
}
PtyService opens terminals on a box. Reach it as Box.Pty.
func (*PtyService) Attach ¶
func (s *PtyService) Attach(ctx context.Context, sessionID string, opts PtyOptions) (*Pty, error)
Attach re-joins an existing session by id; the box replays its screen.
func (*PtyService) Create ¶
func (s *PtyService) Create(ctx context.Context, opts PtyOptions) (*Pty, error)
Create opens a new shell session (bash) and attaches to it. The session outlives the connection: Detach leaves it running and Attach re-joins it.
type Readiness ¶ added in v0.1.7
type Readiness string
Readiness is whether a box will answer: what every wait reads.
const ( ReadinessReady Readiness = "ready" ReadinessSettling Readiness = "settling" ReadinessAwaitsTailnet Readiness = "awaits_tailnet" ReadinessPaused Readiness = "paused" ReadinessStartFailed Readiness = "start_failed" ReadinessDeleting Readiness = "deleting" ReadinessGone Readiness = "gone" )
Box readiness. Every transient (a host offline, no room, an upgrade waiting to restore) is ReadinessSettling. Paused, StartFailed, Deleting and Gone will not become ready by themselves.
type SSHInfo ¶
type SSHInfo struct {
Host string `json:"host"`
User string `json:"user"`
Command string `json:"command"`
}
SSHInfo is how to reach a box over SSH (IPv6).
type Sandbox ¶
type Sandbox struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
Domain *string `json:"domain,omitempty"`
IPv6 *string `json:"ipv6,omitempty"`
Status Status `json:"status"`
Tier *string `json:"tier,omitempty"`
PendingTier *string `json:"pendingTier,omitempty"`
MachineSize *MachineSize `json:"machineSize,omitempty"`
// IsArchived is true when the box has a backup in cold storage or one is in flight.
IsArchived *bool `json:"isArchived,omitempty"`
CPUPct *float64 `json:"cpuPct,omitempty"`
MemPct *float64 `json:"memPct,omitempty"`
DiskPct *float64 `json:"diskPct,omitempty"`
NetRxBps *float64 `json:"netRxBps,omitempty"`
NetTxBps *float64 `json:"netTxBps,omitempty"`
StatsUpdatedAt *time.Time `json:"statsUpdatedAt,omitempty"`
StartFailedAt *time.Time `json:"startFailedAt,omitempty"`
ClaimedAt *time.Time `json:"claimedAt,omitempty"`
// PrivateMode is true when the box answers only devices on your tailnet.
PrivateMode bool `json:"privateMode"`
// Tailscale is the box's tailnet status; nil when it never joined one.
Tailscale *TailscaleStatus `json:"tailscale,omitempty"`
// TailscaleSupported is false when the box's ZipOS predates Tailscale
// (Tailscale.Connect fails with CodeTailscaleRequiresUpdate until the ZipOS
// update is accepted); nil until the box has reported since it booted.
TailscaleSupported *bool `json:"tailscaleSupported,omitempty"`
// AgentPublicKey is the box's own P-256 key (base64 SPKI DER) that box
// credentials are sealed to. Nil until the box has started; a claim re-mints it.
AgentPublicKey *string `json:"agentPublicKey,omitempty"`
// Fork is the fork still making this box: its phase, source recovery, waits and
// error. Nil on every box that is not being forked into.
Fork *SandboxFork `json:"fork,omitempty"`
// Phase is what the box is doing now. Empty from an older control plane.
Phase Phase `json:"phase,omitempty"`
// AllowedActions are the lifecycle verbs the box accepts now. A listed verb can
// still be refused for a reason outside the box (credit, capacity, an argument).
// Nil from an older control plane.
AllowedActions []Action `json:"allowedActions,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
Sandbox is the documented subset of a box row.
type SandboxDetail ¶
type SandboxDetail struct {
Sandbox
// Ready is true once the box is running and serving its owner.
Ready bool `json:"ready"`
// Readiness is whether the box will answer, from the same connection gate as
// Ready: what every wait reads. Empty from an older control plane, where the SDK
// falls back to Ready and Status.
Readiness Readiness `json:"readiness,omitempty"`
// HTTPSReady is true once BaseURL completes a TLS handshake with a trusted
// certificate. A fresh name's certificate can trail Ready; the SDK's box calls
// retry the handshake meanwhile.
HTTPSReady bool `json:"httpsReady"`
// BaseURL is the box's HTTPS origin once Ready.
BaseURL *string `json:"baseUrl,omitempty"`
// BoxToken is the per-key, per-box bearer the box accepts. The SDK manages
// it; it is exposed for curl and debugging.
BoxToken *string `json:"boxToken,omitempty"`
}
SandboxDetail is one box as GET /sandbox/{id} returns it.
func (SandboxDetail) MarshalJSON ¶
func (d SandboxDetail) MarshalJSON() ([]byte, error)
MarshalJSON leaves BoxToken out: it is a credential, and a detail printed or logged as JSON (the CLI's --json) must never carry it.
type SandboxFork ¶ added in v0.1.7
type SandboxFork struct {
OperationID string `json:"operationId"`
SourceSandboxID string `json:"sourceSandboxId"`
ChildSandboxID string `json:"childSandboxId"`
SourcePolicy ForkSourcePolicy `json:"sourcePolicy"`
Phase ForkPhase `json:"phase"`
SourceRecovery ForkSourceRecovery `json:"sourceRecovery"`
// CaptureMode is "reflink" (copy-on-write capture) or "copy"; nil until captured.
CaptureMode *string `json:"captureMode,omitempty"`
// WaitingOn says why the current step waits (software_install, legacy_chisel,
// busy, host_offline, capacity); nil while it moves.
WaitingOn *string `json:"waitingOn,omitempty"`
// Attempt is the retry ladder's position for the current step.
Attempt int `json:"attempt"`
NextAttemptAt *time.Time `json:"nextAttemptAt,omitempty"`
CancelRequestedAt *time.Time `json:"cancelRequestedAt,omitempty"`
// Error is set when Phase is ForkFailed.
Error *ForkError `json:"error,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CompletedAt *time.Time `json:"completedAt,omitempty"`
}
SandboxFork is one fork operation as GET /sandbox/{childId}/fork returns it, and as a box being forked into carries it on its row.
type SandboxesService ¶
type SandboxesService struct {
// contains filtered or unexported fields
}
SandboxesService manages boxes. Reach it as Client.Sandboxes.
func (*SandboxesService) CancelTransition ¶ added in v0.1.7
func (s *SandboxesService) CancelTransition(ctx context.Context, id string) (TransitionCancelOutcome, error)
CancelTransition cancels the box's state change in flight (a pause, a resume, a restart, a tier change) and returns it to where it was. Past the point of no return it fails with CodeConflict carrying the server's reason. Not retried.
func (*SandboxesService) Create ¶
func (s *SandboxesService) Create(ctx context.Context, opts CreateOptions) (*Box, error)
Create creates a box and returns it once it is ready: at once when the server bound a booted machine inside the request (its answer is ready), else after waiting as WaitReady does. The wait has no deadline of its own; bound it with ctx. The request carries an Idempotency-Key, so a retried create never makes two boxes. With Private set it waits until the box is running with its key instead.
func (*SandboxesService) Delete ¶
func (s *SandboxesService) Delete(ctx context.Context, id string, opts DeleteOptions) error
Delete deletes a box. A recoverable copy is kept for 30 days unless opts.Archive is false.
func (*SandboxesService) Fork ¶ added in v0.1.7
func (s *SandboxesService) Fork(ctx context.Context, sourceID string, opts ForkOptions) (*Box, error)
Fork makes a new box from a consistent capture of the source's disk: same files, settings and size, a new name and a fresh identity. RAM and running processes are not copied. The new box starts public unless opts.Private.
The request carries one Idempotency-Key reused on every retry, so a retried fork never makes two boxes. By default Fork then waits until the new box is ready (a private one: running with its key), with backoff and no deadline of its own; bound it with ctx. A ctx that ends stops only this wait: the fork keeps running (cancel it with CancelTransition on the new box). A new box its fork removed returns the fork's own error code (CodeCopyFailed, …), or CodeConflict when it was cancelled. With TailscaleAuthKey the new box then joins your tailnet, as Box.Tailscale.Connect does. With NoWait the new box is returned as accepted: Detail is its row with Ready false and Fork set.
func (*SandboxesService) Get ¶
func (s *SandboxesService) Get(ctx context.Context, id string) (*SandboxDetail, error)
Get returns one box with its readiness and HTTPS origin.
func (*SandboxesService) GetFork ¶ added in v0.1.7
func (s *SandboxesService) GetFork(ctx context.Context, childID string) (*SandboxFork, error)
GetFork returns the fork that is making (or made) the box childID: its phase, source recovery, waits and error. CodeNotFound when no fork made this box.
func (*SandboxesService) GetOrCreate ¶
func (s *SandboxesService) GetOrCreate(ctx context.Context, name string, opts CreateOptions) (*Box, error)
GetOrCreate returns the live box with this name, resuming it if it is paused, or creates it with opts. It waits until the box is ready; a private box that has not joined a tailnet yet is returned once it is running with its key. opts.Name must be empty or name (CodeInvalidRequest otherwise).
The options apply only when a box is created. A box that already has this name is returned as it is, even when it differs (another tier, not private): that is not an error and nothing is resized. Check Box.Detail.Tier and call SetTier if it matters.
func (*SandboxesService) List ¶
func (s *SandboxesService) List(ctx context.Context) ([]Sandbox, error)
List returns the account's boxes.
func (*SandboxesService) Pause ¶ added in v0.2.0
Pause pauses a box and returns it paused. Nothing is billed while it is paused, and Resume brings it back with its files and installed software. It returns at once when the server answers with the paused box, else waits for the Pause to take effect (no deadline of its own; bound it with ctx). A box that reads running again (the Pause was cancelled) is CodeConflict.
func (*SandboxesService) Restart ¶
func (s *SandboxesService) Restart(ctx context.Context, id string) error
Restart hard-restarts a running box. Files survive; running processes do not.
func (*SandboxesService) Resume ¶ added in v0.2.0
Resume resumes a paused box and returns it ready. A box still StatusStopping is resumed once its Pause lands. It returns at once when the server answers with the ready box, else waits as WaitReady does. Credit-gated: insufficient_credits when dry.
func (*SandboxesService) SetTier ¶
func (s *SandboxesService) SetTier(ctx context.Context, id, tier string) error
SetTier moves a box to another tier. A running box restarts into it.
func (*SandboxesService) WaitReady ¶
WaitReady waits until a box is ready, on GET /sandbox/{id}/wait (the server answers when it is; an older API is polled with backoff instead), and returns its handle. The wait has no deadline of its own; bound it with ctx. A private box that has not joined a tailnet yet is returned once it is running with its key. A box that will not become ready by itself is an error: paused CodeBoxNotRunning, a failed start CodeStartFailed, deleting or gone CodeConflict, none of them retryable.
type Status ¶
type Status string
Status is a box's lifecycle state.
const ( StatusProvisioning Status = "provisioning" StatusRunning Status = "running" StatusStopping Status = "stopping" StatusPaused Status = "paused" StatusDeleting Status = "deleting" // signing out of its tailnet before it is destroyed StatusDestroyed Status = "destroyed" )
Box lifecycle states. StatusPaused: its Pause took effect and nothing is billed; Resume brings it back with its files and installed software. StatusStopping is a Pause still landing.
type TailscalePeer ¶ added in v0.1.5
type TailscalePeer struct {
// Name is the device's own name, e.g. "lucys-macbook".
Name string `json:"name"`
// DNSName is its MagicDNS name.
DNSName *string `json:"dnsName,omitempty"`
// OS is "macOS", "linux", "iOS", "windows", "android", …
OS *string `json:"os,omitempty"`
// Online is true while the device is connected to Tailscale.
Online bool `json:"online"`
// IPv4 is its tailnet IPv4 (100.x).
IPv4 *string `json:"ipv4,omitempty"`
// Connection is "direct" (peer to peer), "relay" (through a Tailscale DERP
// relay), or nil (no recent traffic). Kept as a string so a later value never
// breaks decoding.
Connection *string `json:"connection,omitempty"`
}
TailscalePeer is one of your other devices on the tailnet, as the box sees it.
type TailscaleService ¶ added in v0.1.5
type TailscaleService struct {
// contains filtered or unexported fields
}
TailscaleService joins a box to your own tailnet. Reach it as Box.Tailscale.
The auth key is sealed on this machine to the box's own key and only the box can open it: Zipbox relays it once and never stores or logs it.
func (*TailscaleService) Connect ¶ added in v0.1.5
func (t *TailscaleService) Connect(ctx context.Context, authKey string) error
Connect joins the box to the tailnet the auth key belongs to. Use a one-off, pre-approved key. The box must be running. Connect returns once the key is on its way; read Status for the join itself.
The box key is read right before sealing, because claiming a box re-mints it. If the key changed between the read and the send (box_key_changed), Connect reads it again and re-seals once.
func (*TailscaleService) Disconnect ¶ added in v0.1.5
func (t *TailscaleService) Disconnect(ctx context.Context) error
Disconnect leaves the tailnet: the box signs out and its Tailscale state is wiped. A private box is made public first, in the same call, so it is never left private with no way in.
func (*TailscaleService) Status ¶ added in v0.1.5
func (t *TailscaleService) Status(ctx context.Context) (*TailscaleStatus, error)
Status returns the box's tailnet status, or nil when it never joined one and no key is pending.
type TailscaleState ¶ added in v0.1.5
type TailscaleState string
TailscaleState is a box's tailnet state as the box reports it.
const ( // TailscaleJoining: the auth key was accepted and the node is coming up. TailscaleJoining TailscaleState = "joining" // TailscaleConnected: the box is on the tailnet. TailscaleConnected TailscaleState = "connected" // TailscaleNeedsApproval: a tailnet admin must approve the device. TailscaleNeedsApproval TailscaleState = "needsApproval" // TailscaleNeedsLogin: the node key expired or the auth key was refused. Connect again with a new key. TailscaleNeedsLogin TailscaleState = "needsLogin" // TailscaleStopped: logged in but turned off. TailscaleStopped TailscaleState = "stopped" // TailscaleFailed: the box's Tailscale daemon does not answer. TailscaleFailed TailscaleState = "failed" )
Tailnet states.
type TailscaleStatus ¶ added in v0.1.5
type TailscaleStatus struct {
// State is nil when only the last known identity is known (the box is paused).
State *TailscaleState `json:"state,omitempty"`
// Tailnet is the tailnet's name, e.g. "example.com".
Tailnet *string `json:"tailnet,omitempty"`
// IPv4 and IPv6 are the box's tailnet addresses.
IPv4 *string `json:"ipv4,omitempty"`
IPv6 *string `json:"ipv6,omitempty"`
// DNSName is the box's MagicDNS name.
DNSName *string `json:"dnsName,omitempty"`
// KeyExpiry is when the node key expires; nil when key expiry is off.
KeyExpiry *time.Time `json:"keyExpiry,omitempty"`
// Pending is true while an auth key is on its way to the box. Pending going
// false with no state change means the key never arrived: connect again.
Pending bool `json:"pending"`
// Peers are your other devices on the tailnet (online first, at most 50); nil
// while the box is not reporting.
Peers []TailscalePeer `json:"peers,omitempty"`
}
TailscaleStatus is a box's tailnet status: the live state merged with the last known identity.
type TransitionCancelOutcome ¶ added in v0.1.7
type TransitionCancelOutcome string
TransitionCancelOutcome is what CancelTransition did.
const ( // TransitionCleared: nothing was executing on a host; the queued change was // dropped and the box is already back where it was. TransitionCleared TransitionCancelOutcome = "cleared" // TransitionCancelling: the host is executing the change; its abort is on the way. TransitionCancelling TransitionCancelOutcome = "cancelling" // TransitionNone: the box had no change in flight. TransitionNone TransitionCancelOutcome = "none" )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
zipbox
command
Command zipbox drives Zipbox boxes from a terminal or CI: create and manage boxes, run commands, move files, open a shell, publish ports, read docs, and serve the Zipbox MCP tools over stdio.
|
Command zipbox drives Zipbox boxes from a terminal or CI: create and manage boxes, run commands, move files, open a shell, publish ports, read docs, and serve the Zipbox MCP tools over stdio. |
|
internal
|
|
|
cli
Package cli implements the zipbox command.
|
Package cli implements the zipbox command. |