cli

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedPHPVersions = []string{"8.1", "8.2", "8.3", "8.4", "8.5"}

SupportedPHPVersions lists the PHP versions lerd can build FPM images for.

Functions

func NewArtisanCmd added in v0.1.16

func NewArtisanCmd() *cobra.Command

NewArtisanCmd returns the artisan command — runs php artisan in the project's container.

func NewAutostartCmd added in v0.3.0

func NewAutostartCmd() *cobra.Command

NewAutostartCmd returns the autostart command with enable/disable subcommands.

func NewDbCmd added in v0.4.0

func NewDbCmd() *cobra.Command

NewDbCmd returns the db parent command with import/export/create/shell subcommands.

func NewDbCreateCmd added in v0.5.1

func NewDbCreateCmd() *cobra.Command

NewDbCreateCmd returns the standalone db:create command.

func NewDbExportCmd added in v0.4.0

func NewDbExportCmd() *cobra.Command

NewDbExportCmd returns the standalone db:export command.

func NewDbImportCmd added in v0.4.0

func NewDbImportCmd() *cobra.Command

NewDbImportCmd returns the standalone db:import command.

func NewDbShellCmd added in v0.5.1

func NewDbShellCmd() *cobra.Command

NewDbShellCmd returns the standalone db:shell command.

func NewEnvCmd added in v0.3.0

func NewEnvCmd() *cobra.Command

NewEnvCmd returns the env command.

func NewFetchCmd added in v0.4.0

func NewFetchCmd() *cobra.Command

NewFetchCmd returns the fetch command.

func NewInstallCmd

func NewInstallCmd() *cobra.Command

NewInstallCmd returns the install command.

func NewIsolateCmd

func NewIsolateCmd() *cobra.Command

NewIsolateCmd returns the isolate command.

func NewIsolateNodeCmd

func NewIsolateNodeCmd() *cobra.Command

NewIsolateNodeCmd returns the isolate:node command.

func NewLinkCmd

func NewLinkCmd() *cobra.Command

NewLinkCmd returns the link command.

func NewLogsCmd added in v0.1.17

func NewLogsCmd() *cobra.Command

NewLogsCmd returns the logs command.

func NewMCPCmd added in v0.3.0

func NewMCPCmd() *cobra.Command

NewMCPCmd returns the mcp command — starts the MCP server over stdio.

func NewMCPInjectCmd added in v0.3.0

func NewMCPInjectCmd() *cobra.Command

NewMCPInjectCmd returns the mcp:inject command.

func NewNodeCmd added in v0.1.16

func NewNodeCmd() *cobra.Command

NewNodeCmd returns the node command.

func NewNpmCmd added in v0.1.16

func NewNpmCmd() *cobra.Command

NewNpmCmd returns the npm command.

func NewNpxCmd added in v0.1.16

func NewNpxCmd() *cobra.Command

NewNpxCmd returns the npx command.

func NewOpenCmd added in v0.3.0

func NewOpenCmd() *cobra.Command

NewOpenCmd returns the open command.

func NewParkCmd

func NewParkCmd() *cobra.Command

NewParkCmd returns the park command.

func NewPhpCmd added in v0.1.16

func NewPhpCmd() *cobra.Command

NewPhpCmd returns the php command — runs PHP in the appropriate FPM container.

func NewPhpExtCmd added in v0.5.5

func NewPhpExtCmd() *cobra.Command

NewPhpExtCmd returns the php:ext parent command.

func NewPhpIniCmd added in v0.5.5

func NewPhpIniCmd() *cobra.Command

NewPhpIniCmd returns the php:ini command.

func NewPhpListCmd

func NewPhpListCmd() *cobra.Command

NewPhpListCmd returns the php:list command.

func NewPhpRebuildCmd added in v0.1.17

func NewPhpRebuildCmd() *cobra.Command

NewPhpRebuildCmd returns the php:rebuild command.

func NewQueueCmd added in v0.3.0

func NewQueueCmd() *cobra.Command

NewQueueCmd returns the queue parent command with start/stop subcommands.

func NewQueueStartCmd added in v0.3.0

func NewQueueStartCmd() *cobra.Command

NewQueueStartCmd returns the standalone queue:start command.

func NewQueueStopCmd added in v0.3.0

func NewQueueStopCmd() *cobra.Command

NewQueueStopCmd returns the standalone queue:stop command.

func NewSecureCmd

func NewSecureCmd() *cobra.Command

NewSecureCmd returns the secure command.

func NewServiceCmd

func NewServiceCmd() *cobra.Command

NewServiceCmd returns the service command with subcommands.

func NewSetupCmd added in v0.4.0

func NewSetupCmd() *cobra.Command

NewSetupCmd returns the setup command.

func NewShareCmd added in v0.4.0

func NewShareCmd() *cobra.Command

NewShareCmd returns the share command.

func NewSitesCmd

func NewSitesCmd() *cobra.Command

NewSitesCmd returns the sites command.

func NewStartCmd added in v0.1.11

func NewStartCmd() *cobra.Command

NewStartCmd returns the start command.

func NewStatusCmd

func NewStatusCmd() *cobra.Command

NewStatusCmd returns the status command.

func NewStopCmd added in v0.1.11

func NewStopCmd() *cobra.Command

NewStopCmd returns the stop command.

func NewTrayCmd added in v0.5.0

func NewTrayCmd() *cobra.Command

NewTrayCmd returns the tray command.

func NewUninstallCmd

func NewUninstallCmd() *cobra.Command

NewUninstallCmd returns the uninstall command.

func NewUnlinkCmd

func NewUnlinkCmd() *cobra.Command

NewUnlinkCmd returns the unlink command.

func NewUnparkCmd added in v0.1.9

func NewUnparkCmd() *cobra.Command

NewUnparkCmd returns the unpark command.

func NewUnsecureCmd added in v0.3.0

func NewUnsecureCmd() *cobra.Command

NewUnsecureCmd returns the unsecure command.

func NewUpdateCmd

func NewUpdateCmd(currentVersion string) *cobra.Command

NewUpdateCmd returns the update command.

func NewUseCmd

func NewUseCmd() *cobra.Command

NewUseCmd returns the use command.

func NewXdebugCmd added in v0.4.0

func NewXdebugCmd() *cobra.Command

NewXdebugCmd returns the xdebug parent command with on/off/status subcommands.

func QueueStartForSite added in v0.3.0

func QueueStartForSite(siteName, sitePath, phpVersion string) error

QueueStartForSite starts a queue worker for the given site with default settings.

func QueueStopForSite added in v0.3.0

func QueueStopForSite(siteName string) error

QueueStopForSite stops and removes the queue worker for the named site.

func RegisterProject added in v0.3.0

func RegisterProject(projectDir string, cfg *config.GlobalConfig) (bool, error)

RegisterProject registers a single project directory as a lerd site if it is a Laravel project and not already registered. Returns true if newly registered.

func RunParallel added in v0.5.6

func RunParallel(jobs []BuildJob) error

RunParallel executes all jobs concurrently with a compact spinner UI. In a non-TTY environment it falls back to plain sequential output. Returns the first non-nil error, or nil if all jobs succeed.

func UnlinkSite added in v0.3.0

func UnlinkSite(name string) error

UnlinkSite removes the nginx vhost for the named site. For sites under a parked directory, the registry entry is kept but marked Ignored so the watcher does not re-register it. For manually-linked sites the entry is removed entirely.

Types

type BuildJob added in v0.5.6

type BuildJob struct {
	Label string
	Run   func(w io.Writer) error
}

BuildJob is a labeled build task that writes its output to the provided writer.

type StepRunner added in v0.5.6

type StepRunner struct {
	// contains filtered or unexported fields
}

StepRunner runs labeled steps sequentially with a compact in-place TUI. Each step's output is hidden by default; press Ctrl+O to toggle it. Falls back to plain " --> label ... OK" output when stdout is not a TTY.

func NewStepRunner added in v0.5.6

func NewStepRunner() *StepRunner

NewStepRunner creates and starts a StepRunner. Call Close() when all steps are done to restore the terminal.

func (*StepRunner) Close added in v0.5.6

func (r *StepRunner) Close()

Close stops the render loop, restores the terminal, and prints a final newline.

func (*StepRunner) Run added in v0.5.6

func (r *StepRunner) Run(label string, fn func(w io.Writer) error) error

Run executes fn as a labeled step. In TUI mode the step shows a spinner while running and ✓/✗ when done. Returns fn's error.

func (*StepRunner) RunInteractive added in v0.5.6

func (r *StepRunner) RunInteractive(label string, fn func() error) error

RunInteractive temporarily restores the terminal to cooked mode so that steps which need interactive sudo (password prompts, etc.) work correctly. The spinner pauses, the step runs with full terminal access, then raw mode resumes.

Jump to

Keyboard shortcuts

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