Documentation
¶
Index ¶
- Constants
- Variables
- type APIFlags
- type APIInferenceFlags
- type APIManagementFlags
- type AuthLoginFlags
- type AuthLoginResult
- type AuthLogoutFlags
- type AuthLogoutResult
- type AuthStatusFlags
- type AuthStatusResult
- type AuthSwitchFlags
- type AuthSwitchResult
- 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]) 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 ModelDeleteFlags
- type ModelDeploymentActivateFlags
- type ModelDeploymentConfigFlags
- type ModelDeploymentDeactivateFlags
- type ModelDeploymentDeleteFlags
- type ModelDeploymentDownloadFlags
- type ModelDeploymentDownloadResult
- type ModelDeploymentFetchFlags
- type ModelDeploymentIDFlags
- type ModelDeploymentListFlags
- type ModelDeploymentLogsFlags
- type ModelDeploymentPromoteFlags
- type ModelDeploymentReplicaIDFlags
- type ModelDeploymentReplicaTerminateFlags
- type ModelEnvironmentActivateFlags
- type ModelEnvironmentDeactivateFlags
- type ModelEnvironmentFetchFlags
- type ModelEnvironmentFlags
- type ModelEnvironmentListFlags
- type ModelFetchFlags
- type ModelListFlags
- type ModelPredictFlags
- type ModelPushFlags
- type ModelPushResult
- type ModelRefFlags
- type OrgAPIKeyCreateFlags
- type OrgAPIKeyDeleteFlags
- type OrgAPIKeyListFlags
- type OrgBillingUsageFlags
- type OrgSecretDeleteFlags
- type OrgSecretListFlags
- type OrgSecretSetFlags
- type TrussFlags
- type VersionFlags
- type VersionResult
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.
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, commandModel, commandOrg, commandTruss, commandVersion, }, }
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 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"`
Label string `flag:"label" desc:"Label for the API key credential"`
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 {
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 {
User string `json:"user"`
}
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 {
Host string `json:"host"`
User string `json:"user"`
AuthType string `json:"auth_type"`
}
AuthStatusResult is the JSON output of `baseten auth status`.
type AuthSwitchFlags ¶
type AuthSwitchFlags struct {
CommandFlags
User string `flag:"user" desc:"User to switch to"`
}
AuthSwitchFlags are the flags for baseten auth switch.
type AuthSwitchResult ¶
type AuthSwitchResult struct {
User string `json:"user"`
}
AuthSwitchResult is the JSON output of `baseten auth switch`.
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
}
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
Oneof string // group name: exactly one flag in the group must be set
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 */
RemoteURL string `flag:"remote-url" desc:"Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)" group:"common"`
}
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 }
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]) 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
}
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.
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 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 ModelDeploymentDownloadFlags ¶
type ModelDeploymentDownloadFlags struct {
CommandFlags
ModelDeploymentIDFlags
OutFile string `flag:"out-file" desc:"Save the Truss as an uncompressed tar file at this path." oneof:"download-out"`
OutDir string `flag:"out-dir" desc:"Extract the Truss 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 ModelDeploymentFetchFlags ¶
type ModelDeploymentFetchFlags struct {
CommandFlags
ModelDeploymentIDFlags
}
ModelDeploymentFetchFlags configures `baseten model deployment fetch`.
type ModelDeploymentIDFlags ¶
type ModelDeploymentIDFlags struct {
ModelRefFlags
DeploymentID string `flag:"deployment-id" desc:"ID of the deployment." required:"true"`
}
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
Tail bool `` /* 250-byte string literal not displayed */
Start time.Time `` /* 304-byte string literal not displayed */
End time.Time `` /* 219-byte string literal not displayed */
Since time.Duration `` /* 206-byte string literal not displayed */
}
ModelDeploymentLogsFlags configures `baseten model deployment logs`.
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 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 ModelEnvironmentActivateFlags ¶
type ModelEnvironmentActivateFlags struct {
CommandFlags
ModelEnvironmentFlags
}
ModelEnvironmentActivateFlags configures `baseten model environment activate`.
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 ModelEnvironmentFetchFlags ¶
type ModelEnvironmentFetchFlags struct {
CommandFlags
ModelEnvironmentFlags
}
ModelEnvironmentFetchFlags configures `baseten model environment fetch`.
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 ModelFetchFlags ¶
type ModelFetchFlags struct {
CommandFlags
ModelRefFlags
}
ModelFetchFlags configures `baseten model fetch`.
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 `` /* 159-byte string literal not displayed */
DeploymentID string `flag:"deployment-id" desc:"Specific deployment to target. Mutually exclusive with --environment and --regional."`
Regional string `` /* 142-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."`
Promote bool `flag:"promote" desc:"Promote the new deployment to the production environment."`
Environment string `flag:"environment" desc:"Stable environment to push to. Mutually exclusive with --promote."`
DeploymentName string `flag:"deployment-name" desc:"Human-readable name for the new deployment."`
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."`
Watch bool `flag:"watch" desc:"Watch the model directory and push on change. (not yet implemented)"`
WatchHotReload bool `flag:"watch-hot-reload" desc:"Hot-reload the running container on watched changes. (not yet implemented)"`
WatchKeepalive bool `flag:"watch-keepalive" desc:"Keep the watcher alive after the deployment exits. (not yet implemented)"`
DeployTimeout string `flag:"deploy-timeout" desc:"Deployment timeout as a Go 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 OrgAPIKeyCreateFlags ¶
type OrgAPIKeyCreateFlags struct {
CommandFlags
Type string `` /* 131-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 OrgBillingUsageFlags ¶
type OrgBillingUsageFlags struct {
CommandFlags
Since string `` /* 132-byte string literal not displayed */
Start string `flag:"start" desc:"Start of the window (ISO 8601). Requires --end. Mutually exclusive with --since."`
End string `flag:"end" desc:"End of the window (ISO 8601). Requires --start. Mutually exclusive with --since."`
}
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 TrussFlags ¶
type TrussFlags struct{}
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`.