Documentation
¶
Index ¶
- Constants
- Variables
- type APIFlags
- type APIInferenceFlags
- type APIManagementFlags
- type AuditLogFlags
- type AuthLoginFlags
- type AuthLoginResult
- type AuthLogoutFlags
- type AuthLogoutResult
- type AuthStatusFlags
- type AuthStatusResult
- type AuthSwitchFlags
- type AuthSwitchResult
- type AutoscalingScheduleTimingFlags
- type AutoscalingSettingsFlags
- type Command
- type CommandError
- type CommandErrorMeta
- type CommandExample
- type CommandFlag
- type CommandFlags
- type CommandOutput
- func (o *CommandOutput[JSONT]) ExampleList() []CommandExample
- func (o *CommandOutput[JSONT]) JQ() CommandExample
- func (o *CommandOutput[JSONT]) JSON() string
- func (o *CommandOutput[JSONT]) JSONArrayStreamedBool() bool
- func (*CommandOutput[JSONT]) JSONOutputType() reflect.Type
- func (o *CommandOutput[JSONT]) JSONOutputUnimportantBool() bool
- func (o *CommandOutput[JSONT]) Text() string
- type CommandOutputSpec
- type ErrAuth
- type ErrGeneric
- type ErrNotFound
- type ErrServer
- type ErrUsage
- type ErrValidation
- type ErrorDesc
- type ExitCode
- type InferenceClientFlags
- type JSONAny
- type JSONUndefined
- type LogFlags
- type LoopsCheckpointDeployFlags
- type LoopsCheckpointFilesFlags
- type LoopsCheckpointListFlags
- type LoopsLogFlags
- type LoopsRunCreateFlags
- type LoopsRunDeactivateFlags
- type LoopsRunDescribeFlags
- type LoopsRunListFlags
- type LoopsRunLogsFlags
- type LoopsRunRefFlags
- type LoopsUsageFlags
- type LoopsUsageResult
- type LoopsUsageRow
- type LoopsUsageSummary
- type MetricsFlags
- type ModelAPIDescribeFlags
- type ModelAPIList
- type ModelAPIListFlags
- type ModelAPIPredictFlags
- type ModelAPIUsageFlags
- type ModelAuditLogsFlags
- type ModelDeleteFlags
- type ModelDeploymentActivateFlags
- type ModelDeploymentConfigFlags
- type ModelDeploymentDeactivateFlags
- type ModelDeploymentDeleteFlags
- type ModelDeploymentDescribeFlags
- type ModelDeploymentDownloadFlags
- type ModelDeploymentDownloadResult
- type ModelDeploymentIDFlags
- type ModelDeploymentListFlags
- type ModelDeploymentLogsFlags
- type ModelDeploymentMetricsFlags
- type ModelDeploymentPromoteFlags
- type ModelDeploymentRenameFlags
- type ModelDeploymentReplicaIDFlags
- type ModelDeploymentReplicaTerminateFlags
- type ModelDeploymentUpdateAutoscalingFlags
- type ModelDeploymentUpdateRequestBackpressureFlags
- type ModelDescribeFlags
- type ModelEnvironmentActivateFlags
- type ModelEnvironmentAutoscalingScheduleCreateFlags
- type ModelEnvironmentAutoscalingScheduleDeleteFlags
- type ModelEnvironmentAutoscalingScheduleListFlags
- type ModelEnvironmentAutoscalingScheduleRefFlags
- type ModelEnvironmentAutoscalingScheduleUpdateFlags
- type ModelEnvironmentAutoscalingScheduleUpdateSettingsFlags
- type ModelEnvironmentDeactivateFlags
- type ModelEnvironmentDescribeFlags
- type ModelEnvironmentFlags
- type ModelEnvironmentListFlags
- type ModelEnvironmentLogsFlags
- type ModelEnvironmentMetricsFlags
- type ModelEnvironmentUpdateAutoscalingFlags
- type ModelEnvironmentUpdatePromotionFlags
- type ModelEnvironmentUpdateRequestBackpressureFlags
- type ModelImageBuildFlags
- type ModelImageBuildResult
- type ModelImageCommonFlags
- type ModelImagePrepareFlags
- type ModelImagePrepareResult
- type ModelListFlags
- type ModelPredictFlags
- type ModelPushFlags
- type ModelPushResult
- type ModelRefFlags
- type ModelWatchFlags
- type OptionalFlag
- type OrgAPIKeyCreateFlags
- type OrgAPIKeyDeleteFlags
- type OrgAPIKeyListFlags
- type OrgAuditLogsFlags
- type OrgBillingUsageFlags
- type OrgSecretDeleteFlags
- type OrgSecretListFlags
- type OrgSecretSetFlags
- type OrgTeamDescribeFlags
- type OrgTeamListFlags
- type OrgUserDescribeFlags
- type OrgUserList
- type OrgUserListFlags
- type RequestBackpressureFlags
- type SSHProxyFlags
- type SSHSetupFlags
- type SSHSetupResult
- type SSHSignFlags
- type TrainCapacityDescribeFlags
- type TrainCapacityUpdateFlags
- type TrainCheckpointDeployFlags
- type TrainCheckpointFilesFlags
- type TrainCheckpointListFlags
- type TrainInitFlags
- type TrainJobDescribeFlags
- type TrainJobDownloadFlags
- type TrainJobDownloadResult
- type TrainJobListFlags
- type TrainJobLogsFlags
- type TrainJobMetricsFlags
- type TrainJobRecreateFlags
- type TrainJobRefFlags
- type TrainJobSessionDescribeFlags
- type TrainJobStopFlags
- type TrainJobUpdateFlags
- type TrainLogFlags
- type TrainProjectCacheDescribeFlags
- type TrainProjectListFlags
- type TrainPushFlags
- type TrainWorkstationCreateFlags
- type TrussAuthFlags
- type TrussDelegatedResult
- type TrussFlags
- type TrussPassthroughFlags
- type VersionFlags
- type VersionResult
- type WhoamiFlags
Constants ¶
const ( // DefaultFlagGroup is the group name applied to a flag with no `group:` tag. DefaultFlagGroup = "command" // DefaultFlagGroupPri is the rendering priority for a group whose flags // declare no `group-pri:` tag. DefaultFlagGroupPri = 100 // FlagAnnotationGroup names the pflag.Flag annotation key that carries the // declarative `group` tag onto the bound flag, where the help renderer reads it. FlagAnnotationGroup = "baseten/group" // FlagAnnotationGroupPri names the pflag.Flag annotation key that carries the // declarative `group-pri` tag onto the bound flag, where the help renderer reads it. FlagAnnotationGroupPri = "baseten/group-pri" )
Flag group defaults and pflag annotation keys.
const NullFlagValue = "null"
NullFlagValue is the literal a caller passes to a `nullable:"true"` flag to send an explicit null, clearing a setting rather than leaving it unchanged.
Variables ¶
var Root = Command{ Name: "baseten", Summary: "Baseten CLI", Description: "Command-line interface for managing Baseten resources.\n\n" + "Authentication is via 'baseten auth login' or the BASETEN_API_KEY environment variable.\n\n" + "The CLI never prompts interactively when stdin is not a terminal; commands that need " + "input must be supplied via flags or stdin redirection or they fail fast.", Children: []Command{ commandAPI, commandAuth, commandLoops, commandModel, commandModelAPI, commandOrg, commandSSH, commandTrain, commandTruss, commandVersion, commandWhoami, }, }
Root is the top-level baseten command.
Functions ¶
This section is empty.
Types ¶
type APIFlags ¶
type APIFlags struct {
CommandFlags
Method string `flag:"method" short:"X" desc:"HTTP method, defaults to GET or POST if fields are provided"`
Field []string `flag:"field" short:"F" desc:"Add a string field (key=value), parsed as JSON value"`
RawField []string `flag:"raw-field" short:"f" desc:"Add a raw string field (key=value)"`
Header []string `flag:"header" short:"H" desc:"Add a request header (key:value)"`
Input string `flag:"input" desc:"Read request body from file (use - for stdin)"`
}
APIFlags are shared flags for raw API commands.
type APIInferenceFlags ¶
type APIInferenceFlags struct {
APIFlags
InferenceClientFlags
}
type APIManagementFlags ¶
type APIManagementFlags struct {
APIFlags
}
type AuditLogFlags ¶ added in v0.4.0
type AuditLogFlags struct {
Start time.Time `` /* 258-byte string literal not displayed */
End time.Time `` /* 152-byte string literal not displayed */
Since time.Duration `` /* 184-byte string literal not displayed */
Limit int `` /* 135-byte string literal not displayed */
// PageSize is the per-request fetch size while paging. Hidden; exists so
// tests can force multiple pages without a full page of entries.
PageSize int `flag:"page-size" hidden:"true" desc:"Entries fetched per backend request while paging." default:"200"`
Direction string `` /* 145-byte string literal not displayed */
Search string `flag:"search" desc:"Case-insensitive substring matched against resource names and IDs in the entry."`
EventTypeGroups []string `` /* 364-byte string literal not displayed */
Sources []string `flag:"source" desc:"Only return entries issued from one of these surfaces. May be repeated. One of: ui, api, mcp, other."`
UserIDs []string `flag:"user-id" desc:"Only return entries whose acting user is one of these IDs. May be repeated."`
DeploymentIDs []string `flag:"deployment-id" desc:"Only return entries referencing one of these model deployment IDs. May be repeated."`
Environments []string `flag:"environment" desc:"Only return entries for one of these environments. May be repeated."`
}
AuditLogFlags is the shared query flag set for `baseten org audit-logs` and `baseten model audit-logs`. Both commands accept the same window, filter, and paging flags; only the audit-log scope differs. Unlike the log-query flags, there is no time-window default (the full history is queried) and no maximum window: results are bounded by --limit.
type AuthLoginFlags ¶
type AuthLoginFlags struct {
CommandFlags
Web bool `flag:"web" desc:"Use browser login without interactive prompts"`
WithAPIKey bool `flag:"with-api-key" desc:"Read API key from stdin"`
RemoteURL string `flag:"remote-url" desc:"Baseten remote URL for this profile (default https://app.baseten.co)"`
NoSwitch bool `flag:"no-switch" desc:"Store the profile without making it the current profile"`
InsecureStorage bool `flag:"insecure-storage" desc:"Store credentials in plain text instead of system keyring"`
}
AuthLoginFlags are the flags for baseten auth login.
type AuthLoginResult ¶
type AuthLoginResult struct {
Profile string `json:"profile"`
UserID string `json:"user_id"`
Email string `json:"email"`
Name string `json:"name"`
WorkspaceName string `json:"workspace_name"`
}
AuthLoginResult is the JSON output of `baseten auth login`.
type AuthLogoutFlags ¶
type AuthLogoutFlags struct {
CommandFlags
}
AuthLogoutFlags are the flags for baseten auth logout.
type AuthLogoutResult ¶
type AuthLogoutResult struct {
Profile string `json:"profile"`
}
AuthLogoutResult is the JSON output of `baseten auth logout`.
type AuthStatusFlags ¶
type AuthStatusFlags struct {
CommandFlags
}
AuthStatusFlags are the flags for baseten auth status.
type AuthStatusResult ¶
type AuthStatusResult struct {
Profile string `json:"profile"`
RemoteURL string `json:"remote_url"`
AuthType string `json:"auth_type"`
}
AuthStatusResult is the JSON output of `baseten auth status`.
type AuthSwitchFlags ¶
type AuthSwitchFlags struct {
CommandFlags
}
AuthSwitchFlags are the flags for baseten auth switch.
type AuthSwitchResult ¶
type AuthSwitchResult struct {
Profile string `json:"profile"`
}
AuthSwitchResult is the JSON output of `baseten auth switch`.
type AutoscalingScheduleTimingFlags ¶ added in v0.4.0
type AutoscalingScheduleTimingFlags struct {
Enabled OptionalFlag[bool] `flag:"enabled" desc:"Whether the schedule is enabled. Defaults to true on create."`
Weekdays []string `` /* 157-byte string literal not displayed */
StartHour OptionalFlag[int] `` /* 151-byte string literal not displayed */
StartMinute OptionalFlag[int] `flag:"start-minute" desc:"Minute the window opens. Recurring schedules only."`
EndHour OptionalFlag[int] `` /* 150-byte string literal not displayed */
EndMinute OptionalFlag[int] `flag:"end-minute" desc:"Minute the window closes. Recurring schedules only."`
StartAt time.Time `` /* 211-byte string literal not displayed */
EndAt time.Time `flag:"end-at" desc:"Exclusive end of the window, ISO 8601. One-time schedules only."`
}
AutoscalingScheduleTimingFlags describes when a schedule is active. Which flags apply depends on the schedule's cadence: recurring schedules use weekdays and a clock window, one-time schedules use an absolute interval.
type AutoscalingSettingsFlags ¶ added in v0.4.0
type AutoscalingSettingsFlags struct {
MinReplica OptionalFlag[int] `flag:"min-replica" desc:"Minimum number of replicas."`
MaxReplica OptionalFlag[int] `flag:"max-replica" desc:"Maximum number of replicas."`
AutoscalingWindow OptionalFlag[int] `flag:"autoscaling-window" desc:"Timeframe of traffic considered for autoscaling decisions, in seconds."`
ScaleDownDelay OptionalFlag[int] `flag:"scale-down-delay" desc:"Waiting period before scaling down any active replica, in seconds."`
ConcurrencyTarget OptionalFlag[int] `flag:"concurrency-target" desc:"Number of requests per replica before scaling up."`
TargetUtilizationPercentage OptionalFlag[int] `flag:"target-utilization-percentage" desc:"Target utilization percentage for scaling up and down."`
TargetInFlightTokens OptionalFlag[int] `flag:"target-in-flight-tokens" desc:"Target number of in-flight tokens for autoscaling decisions. Early access only."`
MaxScaleDownRate OptionalFlag[int] `` /* 185-byte string literal not displayed */
}
AutoscalingSettingsFlags is the shared autoscaling flag set for `baseten model deployment update-autoscaling` and its environment twin. Each field is a pointer because the settings endpoints patch only what the request body carries: a nil field means the flag was never passed, so that setting is left unchanged rather than reset.
type Command ¶
type Command struct {
Name string
Summary string
Description string
Flags any // nil, or struct value with flag tags
Children []Command
// ArgsUsage is appended to the command name in help output (e.g. "[path]").
ArgsUsage string
// ExactArgs requires exactly this many positional arguments. Mutually
// exclusive with MaxArgs.
ExactArgs int
// MaxArgs is the maximum number of positional arguments. 0 means no args
// (the default), -1 means unlimited. Mutually exclusive with ExactArgs.
MaxArgs int
// DisableFlagParsing disables all flag parsing; everything after the command
// name is passed as raw args. MaxArgs is ignored and assumed -1.
DisableFlagParsing bool
// Output declares the leaf command's stdout shape, text-mode behavior, and
// examples. Required on every leaf (a command with no Children); must be
// nil on commands with Children. Typically a *[CommandOutput][T].
Output CommandOutputSpec
// Errors lists command-declared typed errors. Each entry is built via
// [ErrorDescOf] and documents one extra exit code surfaced by this leaf
// beyond the standard set. Rendered in --help-output.
Errors []ErrorDesc
// Hidden keeps the command out of help listings and completion. The command
// is still fully runnable.
Hidden bool
}
Command defines a CLI command declaratively. The tree structure is built via Children. Flags is a struct value whose fields use struct tags to define CLI flags.
func (Command) LoadFlags ¶
func (c Command) LoadFlags() []CommandFlag
LoadFlags parses the Flags struct tags and returns the flag metadata. Returns nil if Flags is nil.
type CommandError ¶
CommandError is implemented by typed errors a command may return. The framework calls errors.As on the returned error to discover a CommandError implementation and uses its ExitCode and [Meaning] to classify the failure and populate the JSON error envelope.
Implementations should embed CommandErrorMeta for the underlying error/unwrap plumbing and provide static ExitCode and [Meaning] on a pointer receiver so they can be queried without an instance.
func WrapHTTPStatus ¶
func WrapHTTPStatus(status int, err error) CommandError
WrapHTTPStatus picks the appropriate standard typed error for an HTTP status code and wraps the underlying error. Status → error: 401/403 → ErrAuth, 404 → ErrNotFound, other 4xx → ErrValidation, 5xx → ErrServer, anything else → ErrGeneric.
type CommandErrorMeta ¶
type CommandErrorMeta struct {
// contains filtered or unexported fields
}
CommandErrorMeta is embedded by typed CommandError implementations to supply [error.Error] and errors.Unwrap. Construct via NewCommandErrorMeta.
func NewCommandErrorMeta ¶
func NewCommandErrorMeta(msg string, wrapped error) CommandErrorMeta
NewCommandErrorMeta builds a meta with the formatted message and optional wrapped error.
func (*CommandErrorMeta) Error ¶
func (m *CommandErrorMeta) Error() string
func (*CommandErrorMeta) Unwrap ¶
func (m *CommandErrorMeta) Unwrap() error
type CommandExample ¶
type CommandExample struct {
// Description is a one-line "what this does" preceding the command.
Description string
// Command is a literal shell line beginning with "baseten ...".
Command string
}
CommandExample documents one usage of a command.
type CommandFlag ¶
type CommandFlag struct {
Name string
Short string
Desc string
Default string
Enum []string
Required bool
Hidden bool // omitted from help output; still parsed and settable
Oneof string // group name: exactly one flag in the group must be set
// Nullable allows an [OptionalFlag] to be passed as 'null'.
Nullable bool
Type reflect.Type
FieldName string // Go struct field name
// Group is the help-output flag-section bucket. Empty in raw metadata; the
// loader fills in [DefaultFlagGroup] when no `group:` tag is set.
Group string
// GroupPri is the rendering priority declared via `group-pri:`. 0 means
// "unset on this field". The whole group resolves to [DefaultFlagGroupPri]
// when no field in the group declares one. Lower values render earlier.
GroupPri int
}
CommandFlag describes a single CLI flag parsed from struct tags.
func LoadFlagsFromType ¶
func LoadFlagsFromType(t reflect.Type) []CommandFlag
LoadFlagsFromType parses flag metadata from a struct type's tags.
type CommandFlags ¶
type CommandFlags struct {
Verbose bool `flag:"verbose" short:"v" desc:"Enable verbose logging" group:"common" group-pri:"500"`
Output string `flag:"output" short:"o" desc:"Output format" default:"text" enum:"text,json,jsonl,none" group:"common"`
JQ string `` /* 137-byte string literal not displayed */
Profile string `` /* 135-byte string literal not displayed */
}
CommandFlags are shared flags that every command must embed, either directly or via another struct that embeds it.
type CommandOutput ¶
type CommandOutput[JSONT any] struct { // TextDescription describes the --output text format. Free-form prose. TextDescription string // JSONDescription is optional prose describing the --output json shape // beyond what the JSON schema already conveys (e.g. how status fields // behave, what --dry-run emits). Free-form. JSONDescription string // Examples documents how to invoke the command. At least one required. Examples []CommandExample // JQExample is a required example that uses --jq. Surfaced separately so // every command guarantees a JQ-using example for agents to copy. // Optional on commands with DisableFlagParsing, since --jq is not honored // when the framework does not parse flags. JQExample CommandExample // JSONArrayStreamed indicates the command streams JSONT records: under // --output json the records are wrapped in a JSON array, under // --output jsonl one record per line, and --jq applies per record. JSONArrayStreamed bool // JSONOutputUnimportant marks a command that produces no meaningful JSON // stdout payload (e.g. a long-running watcher that streams status to // stderr). Such a command is exempt from the JQExample requirement, and // --help-output omits the JSON schema block for it. JSONOutputUnimportant bool }
CommandOutput declaratively documents a leaf command's output. JSONT is the Go type produced on stdout under --output json (and --output jsonl, one JSONT per line). JSONT is also rendered as a JSON schema in --help-output.
func (*CommandOutput[JSONT]) ExampleList ¶
func (o *CommandOutput[JSONT]) ExampleList() []CommandExample
func (*CommandOutput[JSONT]) JQ ¶
func (o *CommandOutput[JSONT]) JQ() CommandExample
func (*CommandOutput[JSONT]) JSON ¶
func (o *CommandOutput[JSONT]) JSON() string
func (*CommandOutput[JSONT]) JSONArrayStreamedBool ¶
func (o *CommandOutput[JSONT]) JSONArrayStreamedBool() bool
func (*CommandOutput[JSONT]) JSONOutputType ¶
func (*CommandOutput[JSONT]) JSONOutputType() reflect.Type
func (*CommandOutput[JSONT]) JSONOutputUnimportantBool ¶ added in v0.2.0
func (o *CommandOutput[JSONT]) JSONOutputUnimportantBool() bool
func (*CommandOutput[JSONT]) Text ¶
func (o *CommandOutput[JSONT]) Text() string
type CommandOutputSpec ¶
type CommandOutputSpec interface {
// JSONOutputType returns the Go type of the stdout payload under
// --output json, used for JSON schema generation and documentation.
JSONOutputType() reflect.Type
// Text describes the human-readable (--output text) output. Free-form
// prose; surfaced via --help-output.
Text() string
// JSON describes the --output json shape beyond what the JSON schema
// already conveys (special cases, status semantics, etc.). May be empty.
JSON() string
// ExampleList returns the declared usage examples. Every leaf must
// declare at least one.
ExampleList() []CommandExample
// JQ returns the required example invoking --jq.
JQ() CommandExample
// JSONArrayStreamedBool reports whether the command streams JSONT records:
// --output json wraps them in a JSON array, --output jsonl emits one
// record per line, and --jq applies per record.
JSONArrayStreamedBool() bool
// JSONOutputUnimportantBool reports whether the command produces no
// meaningful JSON stdout payload (so --jq is not useful and no JQ example
// is required).
JSONOutputUnimportantBool() bool
}
CommandOutputSpec is the type-erased view of a leaf command's CommandOutput. Every leaf Command must declare an Output value implementing this interface (concretely a *CommandOutput[JSONT] for some T).
type ErrAuth ¶
type ErrAuth struct{ CommandErrorMeta }
ErrAuth signals an authentication or authorization failure (typically HTTP 401/403). Surfaces ExitAuth.
type ErrGeneric ¶
type ErrGeneric struct{ CommandErrorMeta }
ErrGeneric is the catch-all typed error for failures with no more specific classification. Surfaces ExitGeneric.
func NewErrGeneric ¶
func NewErrGeneric(err error) *ErrGeneric
NewErrGeneric wraps any error as an ErrGeneric. Returns nil if err is nil.
func (*ErrGeneric) ExitCode ¶
func (*ErrGeneric) ExitCode() ExitCode
func (*ErrGeneric) Meaning ¶
func (*ErrGeneric) Meaning() string
type ErrNotFound ¶
type ErrNotFound struct{ CommandErrorMeta }
ErrNotFound signals that a referenced resource does not exist (typically HTTP 404). Surfaces ExitNotFound.
func NewErrNotFound ¶
func NewErrNotFound(err error) *ErrNotFound
NewErrNotFound wraps any error as an ErrNotFound.
func (*ErrNotFound) ExitCode ¶
func (*ErrNotFound) ExitCode() ExitCode
func (*ErrNotFound) Meaning ¶
func (*ErrNotFound) Meaning() string
type ErrServer ¶
type ErrServer struct{ CommandErrorMeta }
ErrServer signals a server-side failure (typically HTTP 5xx). Surfaces ExitServer.
func NewErrServer ¶
NewErrServer wraps any error as an ErrServer.
type ErrUsage ¶
type ErrUsage struct{ CommandErrorMeta }
ErrUsage signals invalid command invocation (bad flags, missing required input, mutually exclusive options). Surfaces ExitUsage and tells the framework to display the command's usage line alongside the error.
func NewErrUsage ¶
NewErrUsage wraps any error as an ErrUsage.
func NewErrUsagef ¶
NewErrUsagef builds an ErrUsage from a fmt.Errorf-style format string. Supports %w to wrap an underlying error.
type ErrValidation ¶
type ErrValidation struct{ CommandErrorMeta }
ErrValidation signals a request rejected by server-side validation (typically HTTP 4xx other than 401/403/404). Surfaces ExitValidation.
func NewErrValidation ¶
func NewErrValidation(err error) *ErrValidation
NewErrValidation wraps any error as an ErrValidation.
func (*ErrValidation) ExitCode ¶
func (*ErrValidation) ExitCode() ExitCode
func (*ErrValidation) Meaning ¶
func (*ErrValidation) Meaning() string
type ErrorDesc ¶
ErrorDesc documents one command-declared error: its Go type name, the ExitCode it surfaces, and the static CommandError.Meaning. Listed in Command.Errors and rendered in --help-output.
func ErrorDescOf ¶
func ErrorDescOf[PT CommandError]() ErrorDesc
ErrorDescOf builds an ErrorDesc from a typed command error. Call as ErrorDescOf[*ErrFoo](). Panics if the error reports ExitCode == 0 (success), which is meaningless for an error.
func StandardErrors ¶
func StandardErrors() []ErrorDesc
StandardErrors enumerates the framework-provided typed [CommandError]s in the order the root command's --help-output should render them. Each leaf command inherits these implicitly; per-leaf Command.Errors only lists errors *beyond* this standard set.
type ExitCode ¶
type ExitCode int
ExitCode is the process exit code the CLI returns. The standard set below is what the framework emits automatically; commands may declare additional codes by implementing CommandError on a typed error and listing it in Command.Errors. The enum is open: codes beyond ExitServer are reserved for command-declared errors.
const ( ExitSuccess ExitCode = 0 ExitGeneric ExitCode = 1 ExitUsage ExitCode = 2 ExitAuth ExitCode = 3 ExitNotFound ExitCode = 4 ExitValidation ExitCode = 5 ExitServer ExitCode = 6 // ExitInterrupted is returned when the command's context is cancelled // (Ctrl-C / SIGTERM). 128 + SIGINT(2), the conventional shell convention. ExitInterrupted ExitCode = 130 )
type InferenceClientFlags ¶
type InferenceClientFlags struct {
ModelID string `flag:"model-id" desc:"Model ID to target"`
ChainID string `flag:"chain-id" desc:"Chain ID to target"`
Environment string `flag:"environment" desc:"Environment name (e.g. production)"`
}
InferenceClientFlags are the flags needed to target an inference endpoint. Embedded by any command that needs to create an inference client.
type JSONAny ¶
JSONAny is the JSONT for leaf commands whose stdout JSON is valid JSON but whose shape is user- or runtime-determined. --help-output renders it as "any JSON object" rather than a concrete schema.
type JSONUndefined ¶
type JSONUndefined struct{}
JSONUndefined is the JSONT for leaf commands whose stdout is not guaranteed to be JSON at all (e.g. raw HTTP passthrough, binary, streamed model output). --help-output renders it as "output shape is undefined".
type LogFlags ¶ added in v0.3.0
type LogFlags struct {
Tail bool `` /* 254-byte string literal not displayed */
Start time.Time `` /* 278-byte string literal not displayed */
End time.Time `` /* 185-byte string literal not displayed */
Since time.Duration `` /* 203-byte string literal not displayed */
Limit int `` /* 196-byte string literal not displayed */
// PageSize is the per-request fetch size while paging. Hidden; exists so
// tests can force multiple pages without generating a full page of logs.
PageSize int `flag:"page-size" hidden:"true" desc:"Log lines fetched per backend request while paging." default:"1000"`
MinLevel string `flag:"min-level" desc:"Only return logs at or above this severity level." enum:"debug,info,warning,error"`
Includes []string `flag:"includes" desc:"Case-sensitive substring that must appear in the log message. May be repeated; all must match."`
Excludes []string `flag:"excludes" desc:"Case-sensitive substring; lines containing it are dropped. May be repeated."`
SearchPattern string `` /* 146-byte string literal not displayed */
Replica string `flag:"replica" desc:"Only return logs emitted by this replica (5-char short ID)."`
RequestID string `flag:"request-id" desc:"Only return logs tagged with this inference request ID."`
}
LogFlags is the shared log-query flag set for `baseten model deployment logs` and `baseten model environment logs`. Both commands accept the same window, filter, and tail flags; only the log source differs.
type LoopsCheckpointDeployFlags ¶ added in v0.4.0
type LoopsCheckpointDeployFlags struct {
CommandFlags
TrussAuthFlags
RunID string `flag:"run-id" desc:"Loops run whose checkpoints are deployed. Cannot be combined with --checkpoint-id."`
Checkpoint []string `` /* 196-byte string literal not displayed */
CheckpointID []string `` /* 130-byte string literal not displayed */
Config string `` /* 182-byte string literal not displayed */
DryRun bool `flag:"dry-run" desc:"Print the generated model config without deploying anything."`
}
LoopsCheckpointDeployFlags configures `baseten loops checkpoint deploy`.
type LoopsCheckpointFilesFlags ¶ added in v0.4.0
type LoopsCheckpointFilesFlags struct {
CommandFlags
CheckpointID string `flag:"checkpoint-id" desc:"ID of the Loops checkpoint." required:"true"`
}
LoopsCheckpointFilesFlags configures `baseten loops checkpoint files`.
type LoopsCheckpointListFlags ¶ added in v0.4.0
type LoopsCheckpointListFlags struct {
CommandFlags
RunID string `flag:"run-id" desc:"List checkpoints saved by this run." oneof:"loops-checkpoint-scope"`
BaseModel string `flag:"base-model" desc:"List checkpoints across your runs of this base model." oneof:"loops-checkpoint-scope"`
Direction string `` /* 130-byte string literal not displayed */
}
LoopsCheckpointListFlags configures `baseten loops checkpoint list`.
type LoopsLogFlags ¶ added in v0.4.0
type LoopsLogFlags struct {
Tail bool `` /* 244-byte string literal not displayed */
Start time.Time `` /* 278-byte string literal not displayed */
End time.Time `` /* 185-byte string literal not displayed */
Since time.Duration `` /* 203-byte string literal not displayed */
Limit int `` /* 196-byte string literal not displayed */
// PageSize is the per-request fetch size while paging. Hidden; exists so
// tests can force multiple pages without generating a full page of logs.
PageSize int `flag:"page-size" hidden:"true" desc:"Log lines fetched per backend request while paging." default:"1000"`
MinLevel string `flag:"min-level" desc:"Only return logs at or above this severity level." enum:"debug,info,warning,error"`
}
LoopsLogFlags is the log-query flag set for `baseten loops run logs`. It is a subset of LogFlags: the Loops trainer logs endpoint supports only the window, limit, and severity filters, so the message and replica filters that model deployment logs accept are not offered here.
type LoopsRunCreateFlags ¶ added in v0.4.0
type LoopsRunCreateFlags struct {
CommandFlags
BaseModel string `flag:"base-model" desc:"HuggingFace ID of the base model to fine-tune (for example 'Qwen/Qwen3-8B')." required:"true"`
Name string `flag:"name" desc:"Display name for the run. Defaults to the base model."`
Replicas int `` /* 214-byte string literal not displayed */
Team string `flag:"team" desc:"Team name or ID that owns the run's infrastructure. Defaults to the organization's default team."`
}
LoopsRunCreateFlags configures `baseten loops run create`.
type LoopsRunDeactivateFlags ¶ added in v0.4.0
type LoopsRunDeactivateFlags struct {
CommandFlags
LoopsRunRefFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
LoopsRunDeactivateFlags configures `baseten loops run deactivate`.
type LoopsRunDescribeFlags ¶ added in v0.4.0
type LoopsRunDescribeFlags struct {
CommandFlags
LoopsRunRefFlags
}
LoopsRunDescribeFlags configures `baseten loops run describe`.
type LoopsRunListFlags ¶ added in v0.4.0
type LoopsRunListFlags struct {
CommandFlags
BaseModel string `flag:"base-model" desc:"Only list runs of this base model."`
Org bool `flag:"org" desc:"List every run in the organization, with its owner, instead of only your own."`
All bool `flag:"all" desc:"Include inactive runs."`
Direction string `` /* 130-byte string literal not displayed */
}
LoopsRunListFlags configures `baseten loops run list`.
type LoopsRunLogsFlags ¶ added in v0.4.0
type LoopsRunLogsFlags struct {
CommandFlags
LoopsRunRefFlags
LoopsLogFlags
Sampler bool `flag:"sampler" desc:"Fetch the paired sampler's logs instead of the run's trainer logs."`
}
LoopsRunLogsFlags configures `baseten loops run logs`.
type LoopsRunRefFlags ¶ added in v0.4.0
type LoopsRunRefFlags struct {
RunID string `flag:"run-id" desc:"ID of the Loops run." required:"true"`
}
LoopsRunRefFlags identifies a Loops run. Embedded by commands that act on a specific run.
type LoopsUsageFlags ¶ added in v0.4.0
type LoopsUsageFlags struct {
CommandFlags
Org bool `flag:"org" desc:"Report usage across the organization, with each allocation's owner, instead of only your own."`
User string `flag:"user" desc:"Only report allocations owned by this email. Implies --org."`
All bool `flag:"all" desc:"Include allocations holding no live GPUs (scaled to zero, or in a terminal state)."`
}
LoopsUsageFlags configures `baseten loops usage`.
type LoopsUsageResult ¶ added in v0.4.0
type LoopsUsageResult struct {
Summary LoopsUsageSummary `json:"summary"`
Rows []LoopsUsageRow `json:"rows"`
}
LoopsUsageResult is the JSON output of `baseten loops usage`: the GPU summary plus one entry per displayed row. The rows are a client-side join of trainer deployments and standalone samplers, so this has no generated equivalent.
type LoopsUsageRow ¶ added in v0.4.0
type LoopsUsageRow struct {
RunID string `json:"run_id,omitempty"`
Owner string `json:"owner,omitempty"`
BaseModel string `json:"base_model"`
CreatedAt string `json:"created_at"`
TrainerStatus string `json:"trainer_status,omitempty"`
TrainerInstanceType string `json:"trainer_instance_type,omitempty"`
TrainerNodeCount int `json:"trainer_node_count,omitempty"`
TrainerGPUs int `json:"trainer_gpus"`
SamplerStatus string `json:"sampler_status,omitempty"`
SamplerInstanceType string `json:"sampler_instance_type,omitempty"`
SamplerNodeCount int `json:"sampler_node_count,omitempty"`
SamplerGPUs int `json:"sampler_gpus"`
}
LoopsUsageRow is one row of `baseten loops usage`: a trainer deployment with its paired sampler, or a standalone sampler with the trainer fields empty.
type LoopsUsageSummary ¶ added in v0.4.0
type LoopsUsageSummary struct {
TrainerInUse int `json:"trainer_in_use"`
TrainerScaledToZero int `json:"trainer_scaled_to_zero"`
SamplerInUse int `json:"sampler_in_use"`
SamplerScaledToZero int `json:"sampler_scaled_to_zero"`
}
LoopsUsageSummary totals GPU capacity across every allocation, including rows hidden from the table.
type MetricsFlags ¶ added in v0.3.0
type MetricsFlags struct {
Mode string `` /* 324-byte string literal not displayed */
Start time.Time `` /* 314-byte string literal not displayed */
End time.Time `` /* 221-byte string literal not displayed */
Since time.Duration `` /* 198-byte string literal not displayed */
Metric []string `` /* 206-byte string literal not displayed */
NoChart bool `flag:"no-chart" desc:"For --mode series, emit a per-step table instead of sparklines."`
}
MetricsFlags is the shared metric-query flag set for `baseten model deployment metrics` and `baseten model environment metrics`. Both commands accept the same mode, window, and metric-selection flags; only the metric source differs.
type ModelAPIDescribeFlags ¶ added in v0.2.0
type ModelAPIDescribeFlags struct {
CommandFlags
Model string `flag:"model" desc:"Name of the Model API to describe." required:"true"`
}
ModelAPIDescribeFlags configures `baseten model-api describe`.
type ModelAPIList ¶ added in v0.2.0
type ModelAPIList struct {
Items []managementapi.ModelAPI `json:"items"`
}
ModelAPIList is the JSON output of `baseten model-api list`: the Model APIs aggregated across all pages.
type ModelAPIListFlags ¶ added in v0.2.0
type ModelAPIListFlags struct {
CommandFlags
AddedOnly bool `flag:"added-only" desc:"Restrict to the Model APIs the workspace has added instead of the full visible catalog."`
}
ModelAPIListFlags configures `baseten model-api list`.
type ModelAPIPredictFlags ¶ added in v0.2.0
type ModelAPIPredictFlags struct {
CommandFlags
URL string `flag:"url" desc:"Endpoint to POST the request to. Defaults to https://inference.baseten.co/v1/chat/completions."`
Model string `flag:"model" desc:"Name of the Model API. Required with --content, where it sets the request's model." `
Content string `` /* 194-byte string literal not displayed */
Data string `flag:"data" desc:"Inline request body, sent verbatim." oneof:"predict-input"`
File string `flag:"file" desc:"Path to a file containing the request body, sent verbatim. Use '-' for stdin." oneof:"predict-input"`
}
ModelAPIPredictFlags configures `baseten model-api predict`.
type ModelAPIUsageFlags ¶ added in v0.4.0
type ModelAPIUsageFlags struct {
CommandFlags
Start time.Time `` /* 127-byte string literal not displayed */
End time.Time `flag:"end" desc:"End of the range, exclusive. ISO 8601, local when no timezone is given. Defaults to now."`
Since time.Duration `flag:"since" desc:"Window from a relative time ago until now (e.g. '30m', '3d'). Mutually exclusive with --start and --end."`
BucketWidth string `` /* 147-byte string literal not displayed */
GroupBy []string `flag:"group-by" desc:"Dimension to break usage down by. May be repeated. One of: api-key, user, model. Defaults to model."`
APIKeyPrefixes []string `flag:"api-key-prefix" desc:"Only return usage for these API key prefixes. May be repeated."`
UserIDs []string `flag:"user-id" desc:"Only return usage attributed to these user IDs. May be repeated."`
Models []string `flag:"model" desc:"Only return usage for these models. May be repeated."`
Limit int `flag:"limit" desc:"Maximum number of time buckets, paging as needed. Rows per bucket depend on --group-by. 0 for no limit."`
// PageSize is the per-request fetch size while paging. Hidden; exists so
// tests can force multiple pages without a full page of buckets. Zero uses
// the backend's maximum for the bucket width.
PageSize int `flag:"page-size" hidden:"true" desc:"Time buckets fetched per backend request while paging."`
}
ModelAPIUsageFlags configures `baseten model-api usage`.
type ModelAuditLogsFlags ¶ added in v0.4.0
type ModelAuditLogsFlags struct {
CommandFlags
ModelRefFlags
AuditLogFlags
}
ModelAuditLogsFlags configures `baseten model audit-logs`. It reuses the shared AuditLogFlags, scoped to a single model via ModelRefFlags.
type ModelDeleteFlags ¶
type ModelDeleteFlags struct {
CommandFlags
ModelRefFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelDeleteFlags configures `baseten model delete`.
type ModelDeploymentActivateFlags ¶
type ModelDeploymentActivateFlags struct {
CommandFlags
ModelDeploymentIDFlags
}
ModelDeploymentActivateFlags configures `baseten model deployment activate`.
type ModelDeploymentConfigFlags ¶
type ModelDeploymentConfigFlags struct {
CommandFlags
ModelDeploymentIDFlags
}
ModelDeploymentConfigFlags configures `baseten model deployment config`.
type ModelDeploymentDeactivateFlags ¶
type ModelDeploymentDeactivateFlags struct {
CommandFlags
ModelDeploymentIDFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelDeploymentDeactivateFlags configures `baseten model deployment deactivate`.
type ModelDeploymentDeleteFlags ¶
type ModelDeploymentDeleteFlags struct {
CommandFlags
ModelDeploymentIDFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelDeploymentDeleteFlags configures `baseten model deployment delete`.
type ModelDeploymentDescribeFlags ¶ added in v0.2.0
type ModelDeploymentDescribeFlags struct {
CommandFlags
ModelDeploymentIDFlags
}
ModelDeploymentDescribeFlags configures `baseten model deployment describe`.
type ModelDeploymentDownloadFlags ¶
type ModelDeploymentDownloadFlags struct {
CommandFlags
ModelDeploymentIDFlags
OutFile string `flag:"out-file" desc:"Save the model source as an uncompressed tar file at this path." oneof:"download-out"`
OutDir string `flag:"out-dir" desc:"Extract the model source tar into this directory." oneof:"download-out"`
Overwrite bool `flag:"overwrite" desc:"Allow overwriting an existing file or non-empty directory."`
}
ModelDeploymentDownloadFlags configures `baseten model deployment download`.
type ModelDeploymentDownloadResult ¶
type ModelDeploymentDownloadResult struct {
OutFile string `json:"out_file,omitempty"`
OutDir string `json:"out_dir,omitempty"`
}
ModelDeploymentDownloadResult is the JSON output of `baseten model deployment download`. Exactly one of OutFile or OutDir is set, matching whichever flag the caller passed.
type ModelDeploymentIDFlags ¶
type ModelDeploymentIDFlags struct {
ModelRefFlags
DeploymentID string `flag:"deployment-id" desc:"ID of the deployment." oneof:"deployment-ref"`
DeploymentName string `flag:"deployment-name" desc:"Name of the deployment." oneof:"deployment-ref"`
}
ModelDeploymentIDFlags identifies a deployment of a model. Embedded by commands that act on a specific deployment.
type ModelDeploymentListFlags ¶
type ModelDeploymentListFlags struct {
CommandFlags
ModelRefFlags
}
ModelDeploymentListFlags configures `baseten model deployment list`.
type ModelDeploymentLogsFlags ¶
type ModelDeploymentLogsFlags struct {
CommandFlags
ModelDeploymentIDFlags
LogFlags
}
ModelDeploymentLogsFlags configures `baseten model deployment logs`.
type ModelDeploymentMetricsFlags ¶ added in v0.2.0
type ModelDeploymentMetricsFlags struct {
CommandFlags
ModelDeploymentIDFlags
MetricsFlags
}
ModelDeploymentMetricsFlags configures `baseten model deployment metrics`.
type ModelDeploymentPromoteFlags ¶
type ModelDeploymentPromoteFlags struct {
CommandFlags
ModelDeploymentIDFlags
Environment string `flag:"environment" desc:"Target environment name. Defaults to production." default:"production"`
OverrideEnvInstanceType bool `flag:"override-env-instance-type" desc:"Use this deployment's instance type instead of preserving the target environment's."`
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelDeploymentPromoteFlags configures `baseten model deployment promote`.
type ModelDeploymentRenameFlags ¶ added in v0.4.0
type ModelDeploymentRenameFlags struct {
CommandFlags
ModelDeploymentIDFlags
NewName string `` /* 182-byte string literal not displayed */
}
ModelDeploymentRenameFlags configures `baseten model deployment rename`. The new name is --new-name rather than --name, which already identifies the deployment being renamed.
type ModelDeploymentReplicaIDFlags ¶
type ModelDeploymentReplicaIDFlags struct {
ModelDeploymentIDFlags
ReplicaID string `flag:"replica-id" desc:"ID of the replica." required:"true"`
}
ModelDeploymentReplicaIDFlags identifies a replica of a deployment. Embedded by commands that act on a specific replica.
type ModelDeploymentReplicaTerminateFlags ¶
type ModelDeploymentReplicaTerminateFlags struct {
CommandFlags
ModelDeploymentReplicaIDFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelDeploymentReplicaTerminateFlags configures `baseten model deployment replica terminate`.
type ModelDeploymentUpdateAutoscalingFlags ¶ added in v0.4.0
type ModelDeploymentUpdateAutoscalingFlags struct {
CommandFlags
ModelDeploymentIDFlags
AutoscalingSettingsFlags
}
ModelDeploymentUpdateAutoscalingFlags configures `baseten model deployment update-autoscaling`.
type ModelDeploymentUpdateRequestBackpressureFlags ¶ added in v0.4.0
type ModelDeploymentUpdateRequestBackpressureFlags struct {
CommandFlags
ModelDeploymentIDFlags
RequestBackpressureFlags
}
ModelDeploymentUpdateRequestBackpressureFlags configures `baseten model deployment update-request-backpressure`.
type ModelDescribeFlags ¶ added in v0.2.0
type ModelDescribeFlags struct {
CommandFlags
ModelRefFlags
}
ModelDescribeFlags configures `baseten model describe`.
type ModelEnvironmentActivateFlags ¶
type ModelEnvironmentActivateFlags struct {
CommandFlags
ModelEnvironmentFlags
}
ModelEnvironmentActivateFlags configures `baseten model environment activate`.
type ModelEnvironmentAutoscalingScheduleCreateFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleCreateFlags struct {
CommandFlags
ModelEnvironmentFlags
AutoscalingScheduleTimingFlags
AutoscalingSettingsFlags
Name string `flag:"name" desc:"Name of the schedule, unique among the environment's schedules." required:"true"`
Cadence string `` /* 193-byte string literal not displayed */
Timezone string `` /* 187-byte string literal not displayed */
}
ModelEnvironmentAutoscalingScheduleCreateFlags configures `baseten model environment autoscaling-schedule create`.
type ModelEnvironmentAutoscalingScheduleDeleteFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleDeleteFlags struct {
CommandFlags
ModelEnvironmentFlags
ModelEnvironmentAutoscalingScheduleRefFlags
}
ModelEnvironmentAutoscalingScheduleDeleteFlags configures `baseten model environment autoscaling-schedule delete`.
type ModelEnvironmentAutoscalingScheduleListFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleListFlags struct {
CommandFlags
ModelEnvironmentFlags
}
ModelEnvironmentAutoscalingScheduleListFlags configures `baseten model environment autoscaling-schedule list`.
type ModelEnvironmentAutoscalingScheduleRefFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleRefFlags struct {
ScheduleID string `flag:"schedule-id" desc:"Stable identifier of the schedule, from 'autoscaling-schedule list'." oneof:"schedule-ref"`
ScheduleName string `flag:"schedule-name" desc:"Name of the schedule, unique among the environment's schedules." oneof:"schedule-ref"`
}
ModelEnvironmentAutoscalingScheduleRefFlags identifies one schedule on an environment, by id or by name. Schedule names are unique per environment, so either identifies exactly one. The name flag is --schedule-name rather than --name because update uses --name for the new name when renaming.
type ModelEnvironmentAutoscalingScheduleUpdateFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleUpdateFlags struct {
CommandFlags
ModelEnvironmentFlags
ModelEnvironmentAutoscalingScheduleRefFlags
AutoscalingScheduleTimingFlags
AutoscalingSettingsFlags
Name OptionalFlag[string] `flag:"name" desc:"New name for the schedule, unique among the environment's schedules."`
Cadence OptionalFlag[string] `` /* 167-byte string literal not displayed */
}
ModelEnvironmentAutoscalingScheduleUpdateFlags configures `baseten model environment autoscaling-schedule update`.
type ModelEnvironmentAutoscalingScheduleUpdateSettingsFlags ¶ added in v0.4.0
type ModelEnvironmentAutoscalingScheduleUpdateSettingsFlags struct {
CommandFlags
ModelEnvironmentFlags
Timezone string `` /* 129-byte string literal not displayed */
}
ModelEnvironmentAutoscalingScheduleUpdateSettingsFlags configures `baseten model environment autoscaling-schedule update-settings`.
type ModelEnvironmentDeactivateFlags ¶
type ModelEnvironmentDeactivateFlags struct {
CommandFlags
ModelEnvironmentFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
ModelEnvironmentDeactivateFlags configures `baseten model environment deactivate`.
type ModelEnvironmentDescribeFlags ¶ added in v0.2.0
type ModelEnvironmentDescribeFlags struct {
CommandFlags
ModelEnvironmentFlags
}
ModelEnvironmentDescribeFlags configures `baseten model environment describe`.
type ModelEnvironmentFlags ¶
type ModelEnvironmentFlags struct {
ModelRefFlags
Environment string `flag:"environment" desc:"Name of the environment (e.g. production)." required:"true"`
}
ModelEnvironmentFlags identifies an environment of a model by name. Embedded by commands that act on a specific environment.
type ModelEnvironmentListFlags ¶
type ModelEnvironmentListFlags struct {
CommandFlags
ModelRefFlags
}
ModelEnvironmentListFlags configures `baseten model environment list`.
type ModelEnvironmentLogsFlags ¶ added in v0.3.0
type ModelEnvironmentLogsFlags struct {
CommandFlags
ModelEnvironmentFlags
LogFlags
}
ModelEnvironmentLogsFlags configures `baseten model environment logs`.
type ModelEnvironmentMetricsFlags ¶ added in v0.3.0
type ModelEnvironmentMetricsFlags struct {
CommandFlags
ModelEnvironmentFlags
MetricsFlags
}
ModelEnvironmentMetricsFlags configures `baseten model environment metrics`.
type ModelEnvironmentUpdateAutoscalingFlags ¶ added in v0.4.0
type ModelEnvironmentUpdateAutoscalingFlags struct {
CommandFlags
ModelEnvironmentFlags
AutoscalingSettingsFlags
}
ModelEnvironmentUpdateAutoscalingFlags configures `baseten model environment update-autoscaling`.
type ModelEnvironmentUpdatePromotionFlags ¶ added in v0.4.0
type ModelEnvironmentUpdatePromotionFlags struct {
CommandFlags
ModelEnvironmentFlags
RedeployOnPromotion OptionalFlag[bool] `` /* 234-byte string literal not displayed */
RollingDeploy OptionalFlag[bool] `flag:"rolling-deploy" desc:"Whether the environment should rely on rolling deploy orchestration."`
PromotionCleanupStrategy OptionalFlag[string] `` /* 134-byte string literal not displayed */
RampUpWhilePromoting OptionalFlag[bool] `flag:"ramp-up-while-promoting" desc:"Whether to ramp up traffic while promoting."`
RampUpDurationSeconds OptionalFlag[int] `flag:"ramp-up-duration-seconds" desc:"Duration of the ramp up, in seconds."`
RollingDeployStrategy OptionalFlag[string] `flag:"rolling-deploy-strategy" desc:"The rolling deploy strategy to use for promotions." enum:"replica"`
MaxSurgePercent OptionalFlag[int] `flag:"max-surge-percent" desc:"The maximum surge percentage for rolling deploys."`
StabilizationTimeSeconds OptionalFlag[int] `flag:"stabilization-time-seconds" desc:"The stabilization time for rolling deploys, in seconds."`
ReplicaOverheadPercent OptionalFlag[int] `flag:"replica-overhead-percent" desc:"The replica overhead percentage for rolling deploys."`
}
ModelEnvironmentUpdatePromotionFlags configures `baseten model environment update-promotion`. The rolling deploy config is flattened into these flags; its nesting in the API exists only to group the fields.
type ModelEnvironmentUpdateRequestBackpressureFlags ¶ added in v0.4.0
type ModelEnvironmentUpdateRequestBackpressureFlags struct {
CommandFlags
ModelEnvironmentFlags
RequestBackpressureFlags
}
ModelEnvironmentUpdateRequestBackpressureFlags configures `baseten model environment update-request-backpressure`.
type ModelImageBuildFlags ¶ added in v0.4.0
type ModelImageBuildFlags struct {
ModelImageCommonFlags
BuildDir string `flag:"build-dir" desc:"Directory for the Docker build context. Defaults to a temp dir removed after the build."`
Tag string `flag:"tag" desc:"Image tag. Defaults to '<model_name>:latest' from config.yaml."`
}
ModelImageBuildFlags configures `baseten model image build`.
type ModelImageBuildResult ¶ added in v0.4.0
ModelImageBuildResult is the JSON output of `baseten model image build`.
type ModelImageCommonFlags ¶ added in v0.4.0
type ModelImageCommonFlags struct {
CommandFlags
// TrussFlags without credential forwarding: generating a build context runs
// entirely locally and calls no API.
TrussFlags
Dir string `flag:"dir" desc:"Model directory." default:"."`
RootUser bool `flag:"root-user" desc:"Run the image's container as root instead of the default non-root user."`
CacheMountID string `flag:"cache-mount-id" desc:"Enable a persistent apt/pip/uv build cache keyed by this id."`
}
ModelImageCommonFlags are the flags shared by both `baseten model image` subcommands.
type ModelImagePrepareFlags ¶ added in v0.4.0
type ModelImagePrepareFlags struct {
ModelImageCommonFlags
BuildDir string `flag:"build-dir" desc:"Directory for the Docker build context. Created if absent and kept." required:"true"`
}
ModelImagePrepareFlags configures `baseten model image prepare`.
type ModelImagePrepareResult ¶ added in v0.4.0
type ModelImagePrepareResult struct {
BuildDir string `json:"build_dir"`
Dockerfile string `json:"dockerfile"`
}
ModelImagePrepareResult is the JSON output of `baseten model image prepare`.
type ModelListFlags ¶
type ModelListFlags struct {
CommandFlags
Team string `flag:"team" desc:"Team name or ID to scope the listing to. Defaults to all teams the caller can see."`
}
ModelListFlags configures `baseten model list`.
type ModelPredictFlags ¶
type ModelPredictFlags struct {
CommandFlags
ModelRefFlags
Environment string `` /* 179-byte string literal not displayed */
DeploymentID string `` /* 132-byte string literal not displayed */
DeploymentName string `` /* 135-byte string literal not displayed */
Regional string `` /* 162-byte string literal not displayed */
Data string `flag:"data" desc:"Inline JSON request body." oneof:"predict-input"`
File string `flag:"file" desc:"Path to a JSON file containing the request body. Use '-' for stdin." oneof:"predict-input"`
Websocket bool `` /* 173-byte string literal not displayed */
}
ModelPredictFlags configures `baseten model predict`.
type ModelPushFlags ¶
type ModelPushFlags struct {
CommandFlags
Dir string `flag:"dir" desc:"Model directory to push. Defaults to the current directory." default:"."`
Team string `flag:"team" desc:"Team the model belongs to. Only valid for new models."`
DryRun bool `flag:"dry-run" desc:"Validate the push and request upload credentials without uploading or creating anything."`
Environment string `flag:"environment" desc:"Stable environment to push to."`
DeploymentName string `flag:"deployment-name" desc:"Human-readable name for the new deployment."`
Region string `flag:"region" desc:"Slug of the region to deploy the model in. Defaults to a region Baseten selects."`
NoBuildCache bool `flag:"no-build-cache" desc:"Force a full rebuild without using cached layers."`
Labels string `flag:"labels" desc:"User-provided labels for the deployment as a JSON object, e.g. '{\"team\":\"ml\",\"priority\":1}'."`
Tail bool `` /* 178-byte string literal not displayed */
Wait bool `flag:"wait" desc:"Block until the deployment is active. Exits non-zero on a terminal-failure status."`
Develop bool `` /* 201-byte string literal not displayed */
Watch bool `` /* 132-byte string literal not displayed */
WatchHotReload bool `` /* 154-byte string literal not displayed */
WatchNoKeepalive bool `` /* 153-byte string literal not displayed */
DeployTimeout string `flag:"deploy-timeout" desc:"Deployment timeout as a duration (e.g. 30m, 1h); allowed range 10m to 24h."`
OverrideName string `` /* 129-byte string literal not displayed */
OverrideEnvInstanceType bool `` /* 173-byte string literal not displayed */
DisableArchiveDownload bool `flag:"disable-archive-download" desc:"Disable archive download for the new model. Only valid for new models."`
}
ModelPushFlags configures `baseten model push`.
type ModelPushResult ¶
type ModelPushResult struct {
Model managementapi.Model `json:"model"`
Deployment managementapi.Deployment `json:"deployment"`
PredictURL string `json:"predict_url"`
LogsURL string `json:"logs_url"`
}
ModelPushResult is the JSON output of `baseten model push` on a successful non-dry-run push.
type ModelRefFlags ¶
type ModelRefFlags struct {
ModelID string `flag:"model-id" desc:"ID of the model." oneof:"model-ref"`
ModelName string `` /* 133-byte string literal not displayed */
Team string `flag:"team" desc:"Team name or ID. Only valid with --model-name."`
}
ModelRefFlags identifies a model by ID or by name (with optional --team for disambiguation across teams in the same org). Embedded by commands that act on a specific model.
type ModelWatchFlags ¶ added in v0.2.0
type ModelWatchFlags struct {
CommandFlags
Dir string `flag:"dir" desc:"Model directory to watch. Defaults to the current directory." default:"."`
Team string `flag:"team" desc:"Team the model belongs to. Use to disambiguate when the same model_name exists in multiple teams."`
HotReload bool `` /* 134-byte string literal not displayed */
NoKeepalive bool `` /* 133-byte string literal not displayed */
}
ModelWatchFlags configures `baseten model watch`.
type OptionalFlag ¶ added in v0.4.0
type OptionalFlag[T any] struct { // contains filtered or unexported fields }
OptionalFlag is a flag that can be left unpassed, keeping `--min-replica 0` distinguishable from an omitted flag. The settings endpoints patch only the fields the request body carries, so that distinction decides whether a setting is changed at all.
Adding `nullable:"true"` lets the flag also be passed as NullFlagValue. Optionality and nullability are separate concerns: an OptionalFlag without the tag can be omitted but not nulled.
The state is behind methods rather than exported fields so binding cannot leave it inconsistent, and so a value type carries no pointer to patch.
func (OptionalFlag[T]) IsNull ¶ added in v0.4.0
func (o OptionalFlag[T]) IsNull() bool
IsNull reports whether the flag was passed as null.
func (OptionalFlag[T]) IsSet ¶ added in v0.4.0
func (o OptionalFlag[T]) IsSet() bool
IsSet reports whether the flag was passed at all, as a value or as null.
func (OptionalFlag[T]) Pointer ¶ added in v0.4.0
func (o OptionalFlag[T]) Pointer() *T
Pointer returns the value, or nil when the flag was omitted or passed as null. Both cases marshal away, so a caller that has already rejected null can use this directly as a request field.
func (*OptionalFlag[T]) SetNull ¶ added in v0.4.0
func (o *OptionalFlag[T]) SetNull()
SetNull records that the flag was passed as null. Called by flag binding.
func (*OptionalFlag[T]) SetValue ¶ added in v0.4.0
func (o *OptionalFlag[T]) SetValue(value T)
SetValue records that the flag was passed with a value. Called by flag binding.
type OrgAPIKeyCreateFlags ¶
type OrgAPIKeyCreateFlags struct {
CommandFlags
Type string `` /* 157-byte string literal not displayed */
Name string `flag:"name" desc:"Optional human-readable name for the key."`
ModelIDs []string `` /* 146-byte string literal not displayed */
Team string `flag:"team" desc:"Team name or ID to create the key in. Defaults to the organization's default team."`
}
type OrgAPIKeyDeleteFlags ¶
type OrgAPIKeyDeleteFlags struct {
CommandFlags
Name string `flag:"name" desc:"Human-readable name of the API key to delete." oneof:"identifier"`
Prefix string `flag:"prefix" desc:"Prefix of the API key to delete (as shown in list)." oneof:"identifier"`
}
type OrgAPIKeyListFlags ¶
type OrgAPIKeyListFlags struct {
CommandFlags
}
type OrgAuditLogsFlags ¶ added in v0.4.0
type OrgAuditLogsFlags struct {
CommandFlags
AuditLogFlags
}
OrgAuditLogsFlags configures `baseten org audit-logs`.
type OrgBillingUsageFlags ¶
type OrgSecretDeleteFlags ¶
type OrgSecretDeleteFlags struct {
CommandFlags
Name string `flag:"name" desc:"Name of the secret to delete." required:"true"`
Team string `flag:"team" desc:"Team name or ID the secret belongs to. Defaults to the organization's default team."`
}
type OrgSecretListFlags ¶
type OrgSecretListFlags struct {
CommandFlags
Team string `flag:"team" desc:"Filter to a specific team by name or ID. Defaults to all teams the caller belongs to."`
}
type OrgSecretSetFlags ¶
type OrgSecretSetFlags struct {
CommandFlags
Name string `flag:"name" desc:"Name of the secret." required:"true"`
Value string `flag:"value" desc:"Secret value. Discouraged: leaks into shell history and process list. Prefer stdin or prompt."`
Team string `flag:"team" desc:"Team name or ID the secret belongs to. Defaults to the organization's default team."`
}
type OrgTeamDescribeFlags ¶ added in v0.3.0
type OrgTeamDescribeFlags struct {
CommandFlags
TeamID string `flag:"team-id" desc:"Team ID to describe." oneof:"team-ref"`
TeamName string `flag:"team-name" desc:"Team name to describe." oneof:"team-ref"`
}
type OrgTeamListFlags ¶ added in v0.3.0
type OrgTeamListFlags struct {
CommandFlags
}
type OrgUserDescribeFlags ¶ added in v0.3.0
type OrgUserDescribeFlags struct {
CommandFlags
UserID string `flag:"user-id" desc:"User ID to describe. Pass 'me' for the authenticated user." oneof:"user-ref"`
UserEmail string `flag:"user-email" desc:"Email of the user to describe." oneof:"user-ref"`
}
type OrgUserList ¶ added in v0.3.0
type OrgUserList struct {
Items []managementapi.UserInfo `json:"items"`
}
OrgUserList is the JSON output of `baseten org user list`: the users aggregated across all pages.
type OrgUserListFlags ¶ added in v0.3.0
type OrgUserListFlags struct {
CommandFlags
}
type RequestBackpressureFlags ¶ added in v0.4.0
type RequestBackpressureFlags struct {
Policy OptionalFlag[string] `` /* 157-byte string literal not displayed */
}
RequestBackpressureFlags is the shared policy flag for `baseten model deployment update-request-backpressure` and its environment twin. Passing null clears an existing policy, which the API treats as distinct from omitting the field.
type SSHProxyFlags ¶ added in v0.3.0
type SSHProxyFlags struct {
CommandFlags
DefaultProfile string `` /* 136-byte string literal not displayed */
}
SSHProxyFlags configures `baseten ssh proxy`. The workload hostname is a positional argument.
type SSHSetupFlags ¶ added in v0.3.0
type SSHSetupFlags struct {
CommandFlags
}
SSHSetupFlags configures `baseten ssh setup`.
type SSHSetupResult ¶ added in v0.3.0
type SSHSetupResult struct {
KeyPath string `json:"key_path"`
KeyReused bool `json:"key_reused"`
Profile string `json:"profile,omitempty"`
}
SSHSetupResult is the JSON output of `baseten ssh setup`.
type SSHSignFlags ¶ added in v0.3.0
type SSHSignFlags struct {
CommandFlags
DefaultProfile string `` /* 136-byte string literal not displayed */
}
SSHSignFlags configures `baseten ssh sign`. The workload hostname is a positional argument.
type TrainCapacityDescribeFlags ¶ added in v0.4.0
type TrainCapacityDescribeFlags struct {
CommandFlags
}
TrainCapacityDescribeFlags configures `baseten train capacity describe`.
type TrainCapacityUpdateFlags ¶ added in v0.4.0
type TrainCapacityUpdateFlags struct {
CommandFlags
Team string `flag:"team" desc:"Team name or ID whose limit changes." required:"true"`
GPUType string `flag:"gpu-type" desc:"GPU type the limit applies to (for example H100)." required:"true"`
MaxGPUs int `flag:"max-gpus" desc:"Maximum concurrent GPUs of this type the team may use." required:"true"`
}
TrainCapacityUpdateFlags configures `baseten train capacity update`.
type TrainCheckpointDeployFlags ¶ added in v0.4.0
type TrainCheckpointDeployFlags struct {
CommandFlags
TrussAuthFlags
JobID string `flag:"job-id" desc:"Training job whose checkpoints are deployed. Required unless --config names them."`
Config string `flag:"config" desc:"Python file defining a DeployCheckpointsConfig: which checkpoints deploy and the model that serves them."`
ConfigOutDir string `` /* 127-byte string literal not displayed */
DryRun bool `flag:"dry-run" desc:"Write the generated model config without deploying anything."`
}
TrainCheckpointDeployFlags configures `baseten train checkpoint deploy`. The job is optional here, unlike TrainJobRefFlags, because a config file can name the checkpoints on its own.
type TrainCheckpointFilesFlags ¶ added in v0.4.0
type TrainCheckpointFilesFlags struct {
CommandFlags
TrainJobRefFlags
}
TrainCheckpointFilesFlags configures `baseten train checkpoint files`.
type TrainCheckpointListFlags ¶ added in v0.4.0
type TrainCheckpointListFlags struct {
CommandFlags
TrainJobRefFlags
Direction string `` /* 130-byte string literal not displayed */
}
TrainCheckpointListFlags configures `baseten train checkpoint list`.
type TrainInitFlags ¶ added in v0.4.0
type TrainInitFlags struct {
CommandFlags
// Scaffolding writes files and downloads public examples, so no credential
// is forwarded and TrussFlags is embedded rather than TrussAuthFlags.
TrussFlags
Dir string `` /* 141-byte string literal not displayed */
Example []string `flag:"example" desc:"Name of a published training example to download instead of the empty template. Repeatable."`
ListExamples bool `flag:"list-examples" desc:"List the available example names and exit."`
}
TrainInitFlags configures `baseten train init`.
type TrainJobDescribeFlags ¶ added in v0.4.0
type TrainJobDescribeFlags struct {
CommandFlags
TrainJobRefFlags
}
TrainJobDescribeFlags configures `baseten train job describe`.
type TrainJobDownloadFlags ¶ added in v0.4.0
type TrainJobDownloadFlags struct {
CommandFlags
TrainJobRefFlags
OutFile string `flag:"out-file" desc:"Save the artifact as an uncompressed tar file at this path." oneof:"download-out"`
OutDir string `flag:"out-dir" desc:"Extract the artifact tar into this directory." oneof:"download-out"`
Overwrite bool `flag:"overwrite" desc:"Allow overwriting an existing file or non-empty directory."`
}
TrainJobDownloadFlags configures `baseten train job download`.
type TrainJobDownloadResult ¶ added in v0.4.0
type TrainJobDownloadResult struct {
JobID string `json:"job_id"`
OutFile string `json:"out_file,omitempty"`
OutDir string `json:"out_dir,omitempty"`
}
TrainJobDownloadResult is the JSON output of `baseten train job download`. The API returns presigned URLs rather than files, so the useful result is what landed on disk, which has no generated equivalent. Exactly one of OutFile or OutDir is set, matching whichever flag the caller passed.
type TrainJobListFlags ¶ added in v0.4.0
type TrainJobListFlags struct {
CommandFlags
Project string `flag:"project" desc:"Only list jobs in this training project, by name or ID."`
Status []string `` /* 156-byte string literal not displayed */
Direction string `` /* 130-byte string literal not displayed */
}
TrainJobListFlags configures `baseten train job list`.
type TrainJobLogsFlags ¶ added in v0.4.0
type TrainJobLogsFlags struct {
CommandFlags
TrainJobRefFlags
TrainLogFlags
}
TrainJobLogsFlags configures `baseten train job logs`.
type TrainJobMetricsFlags ¶ added in v0.4.0
type TrainJobMetricsFlags struct {
CommandFlags
TrainJobRefFlags
Start time.Time `` /* 141-byte string literal not displayed */
End time.Time `` /* 153-byte string literal not displayed */
Since time.Duration `` /* 184-byte string literal not displayed */
}
TrainJobMetricsFlags configures `baseten train job metrics`.
type TrainJobRecreateFlags ¶ added in v0.4.0
type TrainJobRecreateFlags struct {
CommandFlags
TrainJobRefFlags
}
TrainJobRecreateFlags configures `baseten train job recreate`.
type TrainJobRefFlags ¶ added in v0.4.0
type TrainJobRefFlags struct {
JobID string `flag:"job-id" desc:"ID of the training job." required:"true"`
}
TrainJobRefFlags identifies a training job. The project is resolved from the job ID, so callers never pass one: every job endpoint is nested under a project, but the search endpoint returns the owning project with the job.
type TrainJobSessionDescribeFlags ¶ added in v0.4.0
type TrainJobSessionDescribeFlags struct {
CommandFlags
TrainJobRefFlags
}
TrainJobSessionDescribeFlags configures `baseten train job session describe`.
type TrainJobStopFlags ¶ added in v0.4.0
type TrainJobStopFlags struct {
CommandFlags
TrainJobRefFlags
Yes bool `flag:"yes" desc:"Skip the interactive confirmation prompt. Required when stdin is not a terminal."`
}
TrainJobStopFlags configures `baseten train job stop`.
type TrainJobUpdateFlags ¶ added in v0.4.0
type TrainJobUpdateFlags struct {
CommandFlags
TrainJobRefFlags
Priority int `flag:"priority" desc:"New queue priority. Higher values are dequeued first." required:"true"`
}
TrainJobUpdateFlags configures `baseten train job update`.
type TrainLogFlags ¶ added in v0.4.0
type TrainLogFlags struct {
Tail bool `` /* 244-byte string literal not displayed */
Start time.Time `` /* 278-byte string literal not displayed */
End time.Time `` /* 185-byte string literal not displayed */
Since time.Duration `` /* 203-byte string literal not displayed */
Limit int `` /* 196-byte string literal not displayed */
// PageSize is the per-request fetch size while paging. Hidden; exists so
// tests can force multiple pages without generating a full page of logs.
PageSize int `flag:"page-size" hidden:"true" desc:"Log lines fetched per backend request while paging." default:"1000"`
MinLevel string `flag:"min-level" desc:"Only return logs at or above this severity level." enum:"debug,info,warning,error"`
}
TrainLogFlags is the log-query flag set for `baseten train job logs`. Like Loops, the training logs endpoint supports only the window, limit, and severity filters, so the message and replica filters that model deployment logs accept are not offered here.
type TrainProjectCacheDescribeFlags ¶ added in v0.4.0
type TrainProjectCacheDescribeFlags struct {
CommandFlags
Project string `flag:"project" desc:"Training project to describe, by name or ID." required:"true"`
Sort string `flag:"sort" desc:"Sort the listing by 'size' (largest first) or 'path' (alphabetical)." enum:"size,path" default:"size"`
}
TrainProjectCacheDescribeFlags configures `baseten train project cache describe`.
type TrainProjectListFlags ¶ added in v0.4.0
type TrainProjectListFlags struct {
CommandFlags
}
TrainProjectListFlags configures `baseten train project list`.
type TrainPushFlags ¶ added in v0.4.0
type TrainPushFlags struct {
CommandFlags
TrussAuthFlags
Config string `flag:"config" desc:"Python file defining the training project and its job." required:"true"`
JobName string `flag:"job-name" desc:"Name for the training job. Defaults to a generated name."`
Team string `flag:"team" desc:"Team name or ID that owns the training project."`
Accelerator string `flag:"accelerator" desc:"Accelerator type and count, for example 'H200:8'. Overrides the config."`
NodeCount int `flag:"node-count" desc:"Number of compute nodes. Overrides the config."`
Entrypoint string `flag:"entrypoint" desc:"Command the job runs. Overrides the config."`
Priority int `flag:"priority" desc:"Queue priority. Higher values are dequeued first."`
Spot bool `flag:"spot" desc:"Run on interruptible spot capacity, overriding the config. Checkpointing your own progress is up to you."`
Interactive string `flag:"interactive" desc:"Start an interactive session on this trigger." enum:"on-startup,on-failure,on-demand"`
InteractiveTimeout time.Duration `` /* 161-byte string literal not displayed */
}
TrainPushFlags configures `baseten train push`.
type TrainWorkstationCreateFlags ¶ added in v0.4.0
type TrainWorkstationCreateFlags struct {
CommandFlags
TrussAuthFlags
Accelerator string `flag:"accelerator" desc:"GPU accelerator type." default:"H100"`
GPUCount int `flag:"gpu-count" desc:"Number of GPUs on a single node, 1 to 8. Mutually exclusive with --node-count."`
NodeCount int `flag:"node-count" desc:"Number of eight-GPU nodes, 1 to 16. Mutually exclusive with --gpu-count."`
Image string `flag:"image" desc:"Docker base image the workstation runs."`
Project string `flag:"project" desc:"Training project that owns the workstation. Defaults to 'workstation-<accelerator>'."`
Team string `flag:"team" desc:"Team name or ID that owns the training project."`
Orchestrator string `flag:"orchestrator" desc:"Multi-node orchestrator set up across the nodes." enum:"slurm" default:"slurm"`
EnableCheckpointing bool `flag:"enable-checkpointing" desc:"Attach checkpoint storage to the workstation."`
CheckpointPath string `flag:"checkpoint-path" desc:"Path inside the container where checkpoints are written."`
CheckpointVolumeSize int `flag:"checkpoint-volume-size" desc:"Size of the checkpoint volume in GiB."`
CheckpointFromJob string `flag:"checkpoint-from-job" desc:"Training job whose latest checkpoint the workstation starts from."`
}
TrainWorkstationCreateFlags configures `baseten train workstation create`.
type TrussAuthFlags ¶ added in v0.4.0
type TrussAuthFlags struct {
TrussFlags
TrussNoForwardAuth bool `` /* 243-byte string literal not displayed */
}
TrussAuthFlags is TrussFlags plus control over credential forwarding. Embedded by delegating commands that call the Baseten API through truss; commands that only run truss locally embed TrussFlags instead.
type TrussDelegatedResult ¶ added in v0.4.0
type TrussDelegatedResult struct{}
TrussDelegatedResult is the JSON output of the commands that delegate to the truss CLI. It is empty: truss reports what it did as human-readable text, so there is nothing structured for the CLI to pass on. Fields land here once truss can report its results machine-readably.
type TrussFlags ¶
type TrussFlags struct {
TrussVersion string `` /* 227-byte string literal not displayed */
TrussExecutable string `` /* 301-byte string literal not displayed */
}
TrussFlags selects which truss the CLI runs. Embedded by every command that shells out to the truss CLI.
type TrussPassthroughFlags ¶ added in v0.4.0
type TrussPassthroughFlags struct {
TrussAuthFlags
}
TrussPassthroughFlags configures `baseten truss`. It carries only the shared truss flags: everything else on the command line belongs to truss. Flag parsing is disabled for this command, so these are extracted from the raw arguments rather than by Cobra, and CommandFlags is deliberately absent since --output, --jq and friends are forwarded to truss like any other argument.
type VersionFlags ¶
type VersionFlags struct {
CommandFlags
}
VersionFlags configures `baseten version`.
type VersionResult ¶
type VersionResult struct {
Version string `json:"version"`
}
VersionResult is the JSON output of `baseten version`.
type WhoamiFlags ¶ added in v0.3.0
type WhoamiFlags struct {
CommandFlags
}
WhoamiFlags configures `baseten whoami`.
Source Files
¶
- command.api.go
- command.auth.go
- command.go
- command.loops.go
- command.model.go
- command.model_api.go
- command.model_deployment.go
- command.model_deployment_replica.go
- command.model_environment.go
- command.model_environment_autoscaling_schedule.go
- command.model_image.go
- command.org.go
- command.ssh.go
- command.train.go
- command.truss.go
- command.version.go
- command.whoami.go
- errors.go
- output.go