Documentation
¶
Index ¶
- Variables
- func CheckWorkspaceAccess(workspaceName string, credentials sdk.Credentials) (sdk.Workspace, error)
- func ErrorHandler(request *http.Request, kind string, name string, body string) error
- func Execute(releaseVersion string, releaseCommit string, releaseDate string) error
- func GetHuhTheme() *huh.Theme
- type ApplyOption
- type ApplyResult
- type CommandEnv
- type Config
- type Deployment
- func (d *Deployment) Apply() error
- func (d *Deployment) Generate() error
- func (d *Deployment) GenerateDeployment() Result
- func (d *Deployment) IgnoredPaths() []string
- func (d *Deployment) Print() error
- func (d *Deployment) PrintZip() error
- func (d *Deployment) Upload(url string) error
- func (d *Deployment) Zip() error
- type Entrypoints
- type Env
- type Envs
- type ErrorModel
- type IgnoreDir
- type IgnoreFile
- type NameRetriever
- type Operations
- func (r *Operations) ApiKeyLogin(workspace string)
- func (r *Operations) Apply(filePath string, opts ...ApplyOption) ([]ApplyResult, error)
- func (r *Operations) ApplyCmd() *cobra.Command
- func (r *Operations) ApplyResources(results []Result) ([]ApplyResult, error)
- func (r *Operations) BootChat(ctx context.Context, workspace string, resourceType string, ...) error
- func (r *Operations) Chat(ctx context.Context, workspace string, resourceType string, ...) error
- func (r *Operations) ChatCmd() *cobra.Command
- func (r *Operations) CheckResource(ctx context.Context, workspace string, resourceType string, ...) error
- func (r *Operations) CliCommand(ctx context.Context, operationId string, fn interface{})
- func (r *Operations) ClientCredentialsLogin(workspace string, clientCredentials string)
- func (r *Operations) CreateAgentAppCmd() *cobra.Command
- func (r *Operations) CreateMCPServerCmd() *cobra.Command
- func (r *Operations) DeleteCmd() *cobra.Command
- func (r *Operations) DeployCmd() *cobra.Command
- func (r *Operations) DeviceModeLogin(workspace string)
- func (r *Operations) DeviceModeLoginFinalize(deviceCode string, workspace string)
- func (r *Operations) DocCmd() *cobra.Command
- func (r *Operations) GetCmd() *cobra.Command
- func (r *Operations) GetRegistryURL() string
- func (r *Operations) ListOrSetWorkspacesCmd() *cobra.Command
- func (r *Operations) LoginCmd() *cobra.Command
- func (r *Operations) LogoutCmd() *cobra.Command
- func (r *Operations) RunCmd() *cobra.Command
- func (r *Operations) SeedCache(cwd string) error
- func (r *Operations) SendMessage(ctx context.Context, workspace string, resourceType string, ...) (string, error)
- func (r *Operations) ServeCmd() *cobra.Command
- func (r *Operations) SetBaseURL(url string)
- func (r *Operations) VersionCmd() *cobra.Command
- type Package
- type PackageCommand
- type PackageJson
- type RegisterImpl
- type Resource
- func (resource Resource) DeleteFn(name string)
- func (resource Resource) GetFn(name string)
- func (resource Resource) ListExec() ([]interface{}, error)
- func (resource Resource) ListFn()
- func (resource Resource) PostFn(resourceName string, name string, resourceObject interface{}) *ResourceOperationResult
- func (resource Resource) PutFn(resourceName string, name string, resourceObject interface{}) *ResourceOperationResult
- type ResourceOperationResult
- type Result
- type ResultMetadata
- type RootCmdConfig
- type Secrets
- type Template
- type TemplateConfig
- type TemplateOptions
- type Templates
Constants ¶
This section is empty.
Variables ¶
var APP_URL = "https://app.blaxel.ai"
var BASE_URL = "https://api.blaxel.ai/v0"
var GH_BRANCH = "main"
var GH_ORGANIZATION = "beamlit"
var REGISTRY_URL = "https://us.registry.blaxel.ai"
var RUN_URL = "https://run.blaxel.ai"
Functions ¶
func CheckWorkspaceAccess ¶
func ErrorHandler ¶
func GetHuhTheme ¶
getTheme returns a custom theme configuration for the CLI interface using the Dracula color scheme. It customizes various UI elements like buttons, text inputs, and selection indicators.
Types ¶
type ApplyOption ¶ added in v0.0.57
type ApplyOption func(*applyOptions)
ApplyOption defines a function type for apply options
func WithRecursive ¶ added in v0.0.57
func WithRecursive(recursive bool) ApplyOption
WithRecursive sets the recursive option
type ApplyResult ¶
type ApplyResult struct { Kind string Name string Result ResourceOperationResult }
type CommandEnv ¶ added in v0.1.0
func (*CommandEnv) AddClientEnv ¶ added in v0.1.0
func (c *CommandEnv) AddClientEnv()
func (*CommandEnv) Set ¶ added in v0.1.0
func (c *CommandEnv) Set(key, value string)
func (*CommandEnv) ToEnv ¶ added in v0.1.0
func (c *CommandEnv) ToEnv() []string
type Config ¶ added in v0.1.0
type Config struct { Name string `toml:"name"` Workspace string `toml:"workspace"` Type string `toml:"type"` Protocol string `toml:"protocol"` Functions []string `toml:"functions"` Models []string `toml:"models"` Agents []string `toml:"agents"` Entrypoint Entrypoints `toml:"entrypoint"` Env Envs `toml:"env"` Function map[string]Package `toml:"function"` Agent map[string]Package `toml:"agent"` Memory int `toml:"memory,omitempty"` Policies []string `toml:"policies,omitempty"` }
readConfigToml reads the config.toml file and upgrade config according to content
type Deployment ¶ added in v0.1.0
type Deployment struct {
// contains filtered or unexported fields
}
func (*Deployment) Apply ¶ added in v0.1.0
func (d *Deployment) Apply() error
func (*Deployment) Generate ¶ added in v0.1.0
func (d *Deployment) Generate() error
func (*Deployment) GenerateDeployment ¶ added in v0.1.0
func (d *Deployment) GenerateDeployment() Result
func (*Deployment) IgnoredPaths ¶ added in v0.1.0
func (d *Deployment) IgnoredPaths() []string
func (*Deployment) Print ¶ added in v0.1.0
func (d *Deployment) Print() error
func (*Deployment) PrintZip ¶ added in v0.1.0
func (d *Deployment) PrintZip() error
func (*Deployment) Upload ¶ added in v0.1.0
func (d *Deployment) Upload(url string) error
func (*Deployment) Zip ¶ added in v0.1.0
func (d *Deployment) Zip() error
type Entrypoints ¶ added in v0.1.0
type ErrorModel ¶
type IgnoreFile ¶
type NameRetriever ¶ added in v0.1.0
type NameRetriever struct { Metadata struct { Name string `yaml:"name"` } `yaml:"metadata"` }
type Operations ¶
func (*Operations) ApiKeyLogin ¶
func (r *Operations) ApiKeyLogin(workspace string)
func (*Operations) Apply ¶
func (r *Operations) Apply(filePath string, opts ...ApplyOption) ([]ApplyResult, error)
func (*Operations) ApplyCmd ¶
func (r *Operations) ApplyCmd() *cobra.Command
func (*Operations) ApplyResources ¶ added in v0.1.0
func (r *Operations) ApplyResources(results []Result) ([]ApplyResult, error)
func (*Operations) ChatCmd ¶ added in v0.0.46
func (r *Operations) ChatCmd() *cobra.Command
func (*Operations) CheckResource ¶ added in v0.0.57
func (*Operations) CliCommand ¶
func (r *Operations) CliCommand(ctx context.Context, operationId string, fn interface{})
func (*Operations) ClientCredentialsLogin ¶
func (r *Operations) ClientCredentialsLogin(workspace string, clientCredentials string)
func (*Operations) CreateAgentAppCmd ¶
func (r *Operations) CreateAgentAppCmd() *cobra.Command
CreateAgentAppCmd returns a cobra.Command that implements the 'create-agent-app' CLI command. The command creates a new Blaxel agent app in the specified directory after collecting necessary configuration through an interactive prompt. Usage: bl create-agent-app directory
func (*Operations) CreateMCPServerCmd ¶ added in v0.1.0
func (r *Operations) CreateMCPServerCmd() *cobra.Command
CreateMCPServerCmd returns a cobra.Command that implements the 'create-mcpserver' CLI command. The command creates a new Blaxel mcp server in the specified directory after collecting necessary configuration through an interactive prompt. Usage: bl create-mcpserver directory
func (*Operations) DeleteCmd ¶
func (r *Operations) DeleteCmd() *cobra.Command
func (*Operations) DeployCmd ¶ added in v0.1.0
func (r *Operations) DeployCmd() *cobra.Command
func (*Operations) DeviceModeLogin ¶
func (r *Operations) DeviceModeLogin(workspace string)
func (*Operations) DeviceModeLoginFinalize ¶
func (r *Operations) DeviceModeLoginFinalize(deviceCode string, workspace string)
func (*Operations) DocCmd ¶
func (r *Operations) DocCmd() *cobra.Command
func (*Operations) GetCmd ¶
func (r *Operations) GetCmd() *cobra.Command
func (*Operations) GetRegistryURL ¶
func (r *Operations) GetRegistryURL() string
func (*Operations) ListOrSetWorkspacesCmd ¶
func (r *Operations) ListOrSetWorkspacesCmd() *cobra.Command
func (*Operations) LoginCmd ¶
func (r *Operations) LoginCmd() *cobra.Command
func (*Operations) LogoutCmd ¶
func (r *Operations) LogoutCmd() *cobra.Command
func (*Operations) RunCmd ¶
func (r *Operations) RunCmd() *cobra.Command
func (*Operations) SeedCache ¶ added in v0.1.0
func (r *Operations) SeedCache(cwd string) error
func (*Operations) SendMessage ¶ added in v0.0.57
func (*Operations) ServeCmd ¶
func (r *Operations) ServeCmd() *cobra.Command
func (*Operations) SetBaseURL ¶
func (r *Operations) SetBaseURL(url string)
func (*Operations) VersionCmd ¶
func (r *Operations) VersionCmd() *cobra.Command
type PackageCommand ¶ added in v0.1.1
type PackageJson ¶ added in v0.1.0
type RegisterImpl ¶
type RegisterImpl struct { }
type Resource ¶
type Resource struct { Kind string Short string Plural string Singular string SpecType reflect.Type List interface{} Get interface{} Delete interface{} Put interface{} Post interface{} WithStatus bool }
type ResourceOperationResult ¶
type Result ¶
type ResultMetadata ¶
type RootCmdConfig ¶ added in v0.1.0
type RootCmdConfig struct { Hotreload bool Production bool Docker bool Entrypoint Entrypoints Envs CommandEnv }
type Template ¶ added in v0.1.0
type Template struct { Language string `json:"language"` Name string `json:"name"` Topics []string `json:"topics"` Id int `json:"id"` }
func (Template) Clone ¶ added in v0.1.0
func (t Template) Clone(opts TemplateOptions) error
type TemplateConfig ¶
type TemplateConfig struct { Variables []struct { Name string `yaml:"name"` Label *string `yaml:"label"` Type string `yaml:"type"` Description string `yaml:"description"` File string `yaml:"file"` Skip string `yaml:"skip"` Folder string `yaml:"folder"` Options []struct { Label string `yaml:"label"` Value string `yaml:"value"` Name string `yaml:"name"` File string `yaml:"file"` Skip string `yaml:"skip"` Folder string `yaml:"folder"` } `yaml:"options"` } `yaml:"variables"` }
type TemplateOptions ¶ added in v0.1.0
type TemplateOptions struct { Directory string // Target directory for the new agent app ProjectName string // Name of the project ProjectPrompt string // Description of the project Language string // Language to use for the project Template Template // Template to use for the project Author string // Author of the project TemplateOptions map[string]*string // Options for the template IgnoreFiles map[string]IgnoreFile IgnoreDirs map[string]IgnoreDir }
Source Files
¶
- apply.go
- cache.go
- chat.go
- commands.go
- commands_python.go
- commands_ts.go
- config.go
- createagentapp.go
- createmcpserver.go
- delete.go
- dependencies.go
- deploy.go
- doc.go
- entrypoints.go
- envs.go
- errors.go
- get.go
- login.go
- login_apikey.go
- login_client_credentials.go
- login_device.go
- logout.go
- operations.go
- render.go
- root.go
- run.go
- secret.go
- serve.go
- serve_package.go
- templates.go
- types.go
- utils.go
- version.go
- workspace.go