commands

package
v0.0.0-...-5ed97f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(args []string) error

func AuthConfirm

func AuthConfirm(args []string, dbPath string) error

AuthConfirm confirms a user's email in the database

func AuthList

func AuthList(args []string, dbPath string) error

AuthList lists all users in the database

func AuthManage

func AuthManage(args []string) error

AuthManage handles auth management subcommands (confirm, list, etc.)

func Component

func Component(args []string) error

Component handles the `lvt component` command group.

func ComponentEject

func ComponentEject(args []string) error

ComponentEject handles the `lvt component eject` command.

func ComponentEjectTemplate

func ComponentEjectTemplate(args []string) error

ComponentEjectTemplate handles the `lvt component eject-template` command.

func ComponentList

func ComponentList(args []string) error

ComponentList lists available components from the library.

func Env

func Env(args []string) error

Env handles environment variable management commands

func EnvGenerate

func EnvGenerate(args []string) error

EnvGenerate generates a .env.example file based on the app structure

func EnvList

func EnvList(args []string) error

EnvList lists all environment variables from .env file

func EnvSet

func EnvSet(args []string) error

EnvSet sets an environment variable in the .env file

func EnvUnset

func EnvUnset(args []string) error

EnvUnset removes an environment variable from the .env file

func EnvValidate

func EnvValidate(args []string) error

EnvValidate validates that all required environment variables are set

func Gen

func Gen(args []string) error

func GenResource

func GenResource(args []string) error

func GenSchema

func GenSchema(args []string) error

func GenStack

func GenStack(args []string) error

func GenView

func GenView(args []string) error

func InstallAgent

func InstallAgent(args []string) error

InstallAgent installs an AI agent into the current project

func Kits

func Kits(args []string) error

func MCPServer

func MCPServer(args []string) error

MCPServer starts the Model Context Protocol server for lvt

func Migration

func Migration(args []string) error

func New

func New(args []string) error

func NewComponent

func NewComponent(args []string) error

NewComponent handles the `lvt new component` command.

func Parse

func Parse(args []string) error

Parse validates a template file and shows detailed information

func Resource

func Resource(args []string) error

func Seed

func Seed(args []string) error

func Serve

func Serve(args []string) error

func ShowHelpIfRequested

func ShowHelpIfRequested(args []string, helpFunc func()) bool

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 Stack

func Stack(args []string) error

func StackInfo

func StackInfo(args []string) error

func StackValidate

func StackValidate(args []string) error

func ValidatePositionalArg

func ValidatePositionalArg(arg, argName string) error

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 AuthFlags

type AuthFlags struct {
	NoPassword      bool
	NoMagicLink     bool
	NoEmailConfirm  bool
	NoPasswordReset bool
	NoSessionsUI    bool
	NoCSRF          bool
}

type EnvInput

type EnvInput struct {
	Command string `json:"command" jsonschema:"Command: 'generate' to create .env.example"`
}

EnvInput defines input for env commands

type EnvOutput

type EnvOutput struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

EnvOutput defines output

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

type GenAuthOutput struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

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

type GenSchemaOutput struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

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

type SeedOutput struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL