Documentation
¶
Index ¶
- func Auth(args []string) error
- func AuthConfirm(args []string, dbPath string) error
- func AuthList(args []string, dbPath string) error
- func AuthManage(args []string) error
- func Component(args []string) error
- func ComponentEject(args []string) error
- func ComponentEjectTemplate(args []string) error
- func ComponentList(args []string) error
- func Env(args []string) error
- func EnvGenerate(args []string) error
- func EnvList(args []string) error
- func EnvSet(args []string) error
- func EnvUnset(args []string) error
- func EnvValidate(args []string) error
- func Gen(args []string) error
- func GenResource(args []string) error
- func GenSchema(args []string) error
- func GenStack(args []string) error
- func GenView(args []string) error
- func InstallAgent(args []string) error
- func Kits(args []string) error
- func MCPServer(args []string) error
- func Migration(args []string) error
- func New(args []string) error
- func NewComponent(args []string) error
- func Parse(args []string) error
- func Resource(args []string) error
- func Seed(args []string) error
- func Serve(args []string) error
- func ShowHelpIfRequested(args []string, helpFunc func()) bool
- func Stack(args []string) error
- func StackInfo(args []string) error
- func StackValidate(args []string) error
- func ValidatePositionalArg(arg, argName string) error
- type AgentConfig
- type AuthFlags
- type EnvInput
- type EnvOutput
- type GenAuthInput
- type GenAuthOutput
- type GenResourceInput
- type GenResourceOutput
- type GenSchemaInput
- type GenSchemaOutput
- type GenViewInput
- type GenViewOutput
- type KitsInput
- type KitsOutput
- type MigrationInput
- type MigrationOutput
- type NewAppInput
- type NewAppOutput
- type ResourceInspectInput
- type ResourceInspectOutput
- type SeedInput
- type SeedOutput
- type ValidateTemplatesInput
- type ValidateTemplatesOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthConfirm ¶
AuthConfirm confirms a user's email in the database
func AuthManage ¶
AuthManage handles auth management subcommands (confirm, list, etc.)
func ComponentEject ¶
ComponentEject handles the `lvt component eject` command.
func ComponentEjectTemplate ¶
ComponentEjectTemplate handles the `lvt component eject-template` command.
func ComponentList ¶
ComponentList lists available components from the library.
func EnvGenerate ¶
EnvGenerate generates a .env.example file based on the app structure
func EnvValidate ¶
EnvValidate validates that all required environment variables are set
func GenResource ¶
func InstallAgent ¶
InstallAgent installs an AI agent into the current project
func NewComponent ¶
NewComponent handles the `lvt new component` command.
func ShowHelpIfRequested ¶
ShowHelpIfRequested checks if args contain --help or -h flags. If found, it calls the provided help function and returns true. Callers should return early when this returns true.
func StackValidate ¶
func ValidatePositionalArg ¶
ValidatePositionalArg ensures a positional argument doesn't look like a flag. Returns an error if the argument starts with "-" (likely a typo or unknown flag).
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Name string
TargetDir string
ResourceFS embed.FS
ResourceDir string
Description string
NextSteps []string
}
AgentConfig holds configuration for different agent types
type EnvInput ¶
type EnvInput struct {
Command string `json:"command" jsonschema:"Command: 'generate' to create .env.example"`
}
EnvInput defines input for env commands
type GenAuthInput ¶
type GenAuthInput struct {
StructName string `json:"struct_name,omitempty" jsonschema:"Go struct name (default: User)"`
TableName string `json:"table_name,omitempty" jsonschema:"Database table name (default: users)"`
}
GenAuthInput defines the input schema for lvt gen auth
type GenAuthOutput ¶
GenAuthOutput defines the output schema
type GenResourceInput ¶
type GenResourceInput struct {
Name string `json:"name" jsonschema:"Resource name (singular, e.g. 'post' or 'user')"`
Fields map[string]string `json:"fields" jsonschema:"Field definitions as name:type pairs"`
}
GenResourceInput defines the input schema for lvt gen resource
type GenResourceOutput ¶
type GenResourceOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Files []string `json:"files,omitempty" jsonschema:"List of generated files"`
}
GenResourceOutput defines the output schema
type GenSchemaInput ¶
type GenSchemaInput struct {
Table string `json:"table" jsonschema:"Database table name"`
Fields map[string]string `json:"fields" jsonschema:"Field definitions as name:type pairs"`
}
GenSchemaInput defines input for gen schema
type GenSchemaOutput ¶
GenSchemaOutput defines output for gen schema
type GenViewInput ¶
type GenViewInput struct {
Name string `json:"name" jsonschema:"View name (e.g. 'dashboard' or 'counter')"`
}
GenViewInput defines the input schema for lvt gen view
type GenViewOutput ¶
type GenViewOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Files []string `json:"files,omitempty"`
}
GenViewOutput defines the output schema
type KitsInput ¶
type KitsInput struct {
Command string `json:"command" jsonschema:"Command: 'list', 'info', 'validate', or 'create'"`
Name string `json:"name,omitempty" jsonschema:"Kit name (for info, validate, or create)"`
Path string `json:"path,omitempty" jsonschema:"Path to kit (for validate)"`
}
KitsInput defines input for kits commands
type KitsOutput ¶
type KitsOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
KitsOutput defines output
type MigrationInput ¶
type MigrationInput struct {
Name string `json:"name,omitempty" jsonschema:"Migration name (only for create command)"`
}
MigrationInput defines input for migration commands
type MigrationOutput ¶
type MigrationOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
MigrationOutput defines output for migration commands
type NewAppInput ¶
type NewAppInput struct {
Name string `json:"name" jsonschema:"Application name"`
Kit string `json:"kit,omitempty" jsonschema:"Template kit (multi, single, or simple)"`
CSS string `json:"css,omitempty" jsonschema:"CSS framework (tailwind or none)"`
Module string `json:"module,omitempty" jsonschema:"Go module name (defaults to app name)"`
}
NewAppInput defines the input schema for lvt new
type NewAppOutput ¶
type NewAppOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
AppDir string `json:"app_dir,omitempty"`
}
NewAppOutput defines the output schema for lvt new
type ResourceInspectInput ¶
type ResourceInspectInput struct {
Command string `json:"command" jsonschema:"Command: 'list' or 'describe'"`
Resource string `json:"resource,omitempty" jsonschema:"Resource name (for describe command)"`
}
ResourceInspectInput defines input for resource inspect
type ResourceInspectOutput ¶
type ResourceInspectOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
ResourceInspectOutput defines output
type SeedInput ¶
type SeedInput struct {
Resource string `json:"resource" jsonschema:"Resource name to seed"`
Count int `json:"count,omitempty" jsonschema:"Number of records to generate (default: 10)"`
Cleanup bool `json:"cleanup,omitempty" jsonschema:"Clean up existing test data before seeding"`
}
SeedInput defines input for seed command
type SeedOutput ¶
SeedOutput defines output for seed command
type ValidateTemplatesInput ¶
type ValidateTemplatesInput struct {
TemplateFile string `json:"template_file" jsonschema:"Path to template file to validate"`
}
ValidateTemplatesInput defines input
type ValidateTemplatesOutput ¶
type ValidateTemplatesOutput struct {
Success bool `json:"success"`
Message string `json:"message"`
Details string `json:"details,omitempty"`
}
ValidateTemplatesOutput defines output