Documentation
¶
Index ¶
- Variables
- func HorizonStartForSite(siteName, sitePath, phpVersion string) error
- func HorizonStopForSite(siteName string) error
- func IsMCPGloballyRegistered() bool
- func NewAboutCmd() *cobra.Command
- func NewArtisanCmd() *cobra.Command
- func NewAutostartCmd() *cobra.Command
- func NewDashboardCmd() *cobra.Command
- func NewDbCmd() *cobra.Command
- func NewDbCreateCmd() *cobra.Command
- func NewDbExportCmd() *cobra.Command
- func NewDbImportCmd() *cobra.Command
- func NewDbShellCmd() *cobra.Command
- func NewDoctorCmd() *cobra.Command
- func NewEnvCmd() *cobra.Command
- func NewFetchCmd() *cobra.Command
- func NewFrameworkCmd() *cobra.Command
- func NewHorizonCmd() *cobra.Command
- func NewHorizonStartCmd() *cobra.Command
- func NewHorizonStopCmd() *cobra.Command
- func NewInstallCmd() *cobra.Command
- func NewIsolateCmd() *cobra.Command
- func NewIsolateNodeCmd() *cobra.Command
- func NewLinkCmd() *cobra.Command
- func NewLogsCmd() *cobra.Command
- func NewMCPCmd() *cobra.Command
- func NewMCPEnableGlobalCmd() *cobra.Command
- func NewMCPInjectCmd() *cobra.Command
- func NewManCmd() *cobra.Command
- func NewMinioMigrateCmd() *cobra.Command
- func NewNewCmd() *cobra.Command
- func NewNodeCmd() *cobra.Command
- func NewNodeInstallCmd() *cobra.Command
- func NewNodeUninstallCmd() *cobra.Command
- func NewNodeUseCmd() *cobra.Command
- func NewNpmCmd() *cobra.Command
- func NewNpxCmd() *cobra.Command
- func NewOpenCmd() *cobra.Command
- func NewParkCmd() *cobra.Command
- func NewPauseCmd() *cobra.Command
- func NewPhpCmd() *cobra.Command
- func NewPhpExtCmd() *cobra.Command
- func NewPhpIniCmd() *cobra.Command
- func NewPhpListCmd() *cobra.Command
- func NewPhpRebuildCmd() *cobra.Command
- func NewPhpShellCmd() *cobra.Command
- func NewQueueCmd() *cobra.Command
- func NewQueueStartCmd() *cobra.Command
- func NewQueueStopCmd() *cobra.Command
- func NewQuitCmd() *cobra.Command
- func NewReverbCmd() *cobra.Command
- func NewReverbStartCmd() *cobra.Command
- func NewReverbStopCmd() *cobra.Command
- func NewScheduleCmd() *cobra.Command
- func NewScheduleStartCmd() *cobra.Command
- func NewScheduleStopCmd() *cobra.Command
- func NewSecureCmd() *cobra.Command
- func NewServiceCmd() *cobra.Command
- func NewSetupCmd() *cobra.Command
- func NewShareCmd() *cobra.Command
- func NewSitesCmd() *cobra.Command
- func NewStartCmd() *cobra.Command
- func NewStatusCmd() *cobra.Command
- func NewStopCmd() *cobra.Command
- func NewStripeCmds() []*cobra.Command
- func NewTrayCmd() *cobra.Command
- func NewUninstallCmd() *cobra.Command
- func NewUnlinkCmd() *cobra.Command
- func NewUnparkCmd() *cobra.Command
- func NewUnpauseCmd() *cobra.Command
- func NewUnsecureCmd() *cobra.Command
- func NewUpdateCmd(currentVersion string) *cobra.Command
- func NewUseCmd() *cobra.Command
- func NewWorkerCmd() *cobra.Command
- func NewXdebugCmd() *cobra.Command
- func PauseSite(name string) error
- func QueueRestartForSite(siteName, sitePath, phpVersion string) error
- func QueueStartForSite(siteName, sitePath, phpVersion string) error
- func QueueStopForSite(siteName string) error
- func RegisterProject(projectDir string, cfg *config.GlobalConfig) (bool, error)
- func ReverbStartForSite(siteName, sitePath, phpVersion string) error
- func ReverbStopForSite(siteName string) error
- func RunMCPEnableGlobal() error
- func RunParallel(jobs []BuildJob) error
- func RunQuit() error
- func RunStart() error
- func RunStop() error
- func ScheduleStartForSite(siteName, sitePath, phpVersion string) error
- func ScheduleStopForSite(siteName string) error
- func SiteHasHorizon(sitePath string) bool
- func SiteHasReverb(sitePath string) bool
- func SiteUsesReverb(sitePath string) bool
- func StripeSecretSet(sitePath string) bool
- func StripeStartForSite(siteName, sitePath, siteBaseURL string) error
- func StripeStopForSite(siteName string) error
- func UnlinkSite(name string) error
- func UnpauseSite(name string) error
- func WorkerStartForSite(siteName, sitePath, phpVersion, workerName string, w config.FrameworkWorker) error
- func WorkerStopForSite(siteName, workerName string) error
- type BuildJob
- type StepRunner
Constants ¶
This section is empty.
Variables ¶
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 HorizonStartForSite ¶ added in v1.0.0
HorizonStartForSite starts Laravel Horizon for the named site as a systemd service.
func HorizonStopForSite ¶ added in v1.0.0
HorizonStopForSite stops and removes the Horizon unit for the named site.
func IsMCPGloballyRegistered ¶ added in v1.1.0
func IsMCPGloballyRegistered() bool
IsMCPGloballyRegistered reports whether lerd is already registered at user scope in Claude Code. Used by the install command to skip the prompt if already set up.
func NewAboutCmd ¶ added in v1.0.0
NewAboutCmd returns the about command.
func NewArtisanCmd ¶ added in v0.1.16
NewArtisanCmd returns the artisan command — runs php artisan in the project's container.
func NewAutostartCmd ¶ added in v0.3.0
NewAutostartCmd returns the autostart command with enable/disable subcommands.
func NewDashboardCmd ¶ added in v0.8.0
NewDashboardCmd returns the dashboard command.
func NewDbCmd ¶ added in v0.4.0
NewDbCmd returns the db parent command with import/export/create/shell subcommands.
func NewDbCreateCmd ¶ added in v0.5.1
NewDbCreateCmd returns the standalone db:create command.
func NewDbExportCmd ¶ added in v0.4.0
NewDbExportCmd returns the standalone db:export command.
func NewDbImportCmd ¶ added in v0.4.0
NewDbImportCmd returns the standalone db:import command.
func NewDbShellCmd ¶ added in v0.5.1
NewDbShellCmd returns the standalone db:shell command.
func NewDoctorCmd ¶ added in v0.9.0
NewDoctorCmd returns the doctor command.
func NewFetchCmd ¶ added in v0.4.0
NewFetchCmd returns the fetch command.
func NewFrameworkCmd ¶ added in v1.0.0
NewFrameworkCmd returns the framework parent command with subcommands.
func NewHorizonCmd ¶ added in v1.0.0
NewHorizonCmd returns the horizon parent command with start/stop subcommands.
func NewHorizonStartCmd ¶ added in v1.0.0
NewHorizonStartCmd returns the standalone horizon:start command.
func NewHorizonStopCmd ¶ added in v1.0.0
NewHorizonStopCmd returns the standalone horizon:stop command.
func NewIsolateNodeCmd ¶
NewIsolateNodeCmd returns the isolate:node command.
func NewLogsCmd ¶ added in v0.1.17
NewLogsCmd returns the logs command.
func NewMCPCmd ¶ added in v0.3.0
NewMCPCmd returns the mcp command — starts the MCP server over stdio.
func NewMCPEnableGlobalCmd ¶ added in v1.1.0
NewMCPEnableGlobalCmd returns the mcp:enable-global command.
func NewMCPInjectCmd ¶ added in v0.3.0
NewMCPInjectCmd returns the mcp:inject command.
func NewMinioMigrateCmd ¶ added in v1.0.2
NewMinioMigrateCmd returns the minio:migrate command.
func NewNodeCmd ¶ added in v0.1.16
NewNodeCmd returns the node command.
func NewNodeInstallCmd ¶ added in v0.5.9
NewNodeInstallCmd returns the node:install command.
func NewNodeUninstallCmd ¶ added in v0.5.9
NewNodeUninstallCmd returns the node:uninstall command.
func NewNodeUseCmd ¶ added in v0.6.0
NewNodeUseCmd returns the node:use command.
func NewOpenCmd ¶ added in v0.3.0
NewOpenCmd returns the open command.
func NewPauseCmd ¶ added in v1.0.0
NewPauseCmd returns the pause command.
func NewPhpCmd ¶ added in v0.1.16
NewPhpCmd returns the php command — runs PHP in the appropriate FPM container.
func NewPhpExtCmd ¶ added in v0.5.5
NewPhpExtCmd returns the php:ext parent command.
func NewPhpIniCmd ¶ added in v0.5.5
NewPhpIniCmd returns the php:ini command.
func NewPhpListCmd ¶
NewPhpListCmd returns the php:list command.
func NewPhpRebuildCmd ¶ added in v0.1.17
NewPhpRebuildCmd returns the php:rebuild command.
func NewPhpShellCmd ¶ added in v1.0.1
NewPhpShellCmd returns the shell command — opens an interactive sh session in the PHP-FPM container.
func NewQueueCmd ¶ added in v0.3.0
NewQueueCmd returns the queue parent command with start/stop subcommands.
func NewQueueStartCmd ¶ added in v0.3.0
NewQueueStartCmd returns the standalone queue:start command.
func NewQueueStopCmd ¶ added in v0.3.0
NewQueueStopCmd returns the standalone queue:stop command.
func NewQuitCmd ¶ added in v0.7.0
NewQuitCmd returns the quit command.
func NewReverbCmd ¶ added in v0.8.0
NewReverbCmd returns the reverb parent command with start/stop subcommands.
func NewReverbStartCmd ¶ added in v0.8.0
NewReverbStartCmd returns the standalone reverb:start command.
func NewReverbStopCmd ¶ added in v0.8.0
NewReverbStopCmd returns the standalone reverb:stop command.
func NewScheduleCmd ¶ added in v0.8.0
NewScheduleCmd returns the schedule parent command with start/stop subcommands.
func NewScheduleStartCmd ¶ added in v0.8.0
NewScheduleStartCmd returns the standalone schedule:start command.
func NewScheduleStopCmd ¶ added in v0.8.0
NewScheduleStopCmd returns the standalone schedule:stop command.
func NewServiceCmd ¶
NewServiceCmd returns the service command with subcommands.
func NewSetupCmd ¶ added in v0.4.0
NewSetupCmd returns the setup command.
func NewShareCmd ¶ added in v0.4.0
NewShareCmd returns the share command.
func NewStartCmd ¶ added in v0.1.11
NewStartCmd returns the start command.
func NewStopCmd ¶ added in v0.1.11
NewStopCmd returns the stop command.
func NewStripeCmds ¶ added in v0.6.0
NewStripeCmds returns Stripe-related subcommands.
func NewTrayCmd ¶ added in v0.5.0
NewTrayCmd returns the tray command.
func NewUninstallCmd ¶
NewUninstallCmd returns the uninstall command.
func NewUnparkCmd ¶ added in v0.1.9
NewUnparkCmd returns the unpark command.
func NewUnpauseCmd ¶ added in v1.0.0
NewUnpauseCmd returns the unpause command.
func NewUnsecureCmd ¶ added in v0.3.0
NewUnsecureCmd returns the unsecure command.
func NewUpdateCmd ¶
NewUpdateCmd returns the update command.
func NewWorkerCmd ¶ added in v1.0.0
NewWorkerCmd returns the worker parent command with start/stop/list subcommands.
func NewXdebugCmd ¶ added in v0.4.0
NewXdebugCmd returns the xdebug parent command with on/off/status subcommands.
func PauseSite ¶ added in v1.0.0
PauseSite stops all running workers for the site, replaces its nginx vhost with a landing page, and marks it paused in the registry.
func QueueRestartForSite ¶ added in v0.8.0
QueueRestartForSite signals the Laravel queue worker to gracefully restart by running php artisan queue:restart inside the PHP-FPM container. It is a no-op when no queue unit exists for the site. systemd restarts the worker after the graceful exit because the unit uses Restart=always.
func QueueStartForSite ¶ added in v0.3.0
QueueStartForSite starts a queue worker for the given site with default settings.
func QueueStopForSite ¶ added in v0.3.0
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 looks like a PHP project. It detects the framework first; if none matches it falls back to auto-detecting the public directory. Returns true if newly registered.
func ReverbStartForSite ¶ added in v0.8.0
ReverbStartForSite starts the Reverb WebSocket server for the named site.
func ReverbStopForSite ¶ added in v0.8.0
ReverbStopForSite stops and removes the Reverb unit for the named site.
func RunMCPEnableGlobal ¶ added in v1.1.0
func RunMCPEnableGlobal() error
RunMCPEnableGlobal registers lerd MCP at user scope for all supported AI tools. It is exported so the install command can call it directly.
func RunParallel ¶ added in v0.5.6
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 RunQuit ¶ added in v0.7.0
func RunQuit() error
RunQuit stops all lerd processes and containers (exported for use by the UI server).
func RunStart ¶ added in v0.7.0
func RunStart() error
RunStart starts all lerd services (exported for use by the UI server).
func RunStop ¶ added in v0.7.0
func RunStop() error
RunStop stops lerd containers (exported for use by the UI server).
func ScheduleStartForSite ¶ added in v0.8.0
ScheduleStartForSite starts the Laravel task scheduler for the named site.
func ScheduleStopForSite ¶ added in v0.8.0
ScheduleStopForSite stops and removes the scheduler unit for the named site.
func SiteHasHorizon ¶ added in v1.0.0
SiteHasHorizon returns true if composer.json lists laravel/horizon as a dependency.
func SiteHasReverb ¶ added in v0.8.0
SiteHasReverb returns true if composer.json lists laravel/reverb as a dependency.
func SiteUsesReverb ¶ added in v0.8.0
SiteUsesReverb returns true if the site uses Laravel Reverb — either as a composer dependency or with BROADCAST_CONNECTION=reverb in .env or .env.example.
func StripeSecretSet ¶ added in v0.6.0
StripeSecretSet returns true if STRIPE_SECRET is present in the site's .env.
func StripeStartForSite ¶ added in v0.6.0
StripeStartForSite starts a Stripe listener for the given site, reading the key from its .env.
func StripeStopForSite ¶ added in v0.6.0
StripeStopForSite stops and removes the Stripe listener for the named site.
func UnlinkSite ¶ added in v0.3.0
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.
func UnpauseSite ¶ added in v1.0.0
UnpauseSite restores the site's nginx vhost, restarts any workers that were running when the site was paused, and clears the paused state.
func WorkerStartForSite ¶ added in v1.0.0
func WorkerStartForSite(siteName, sitePath, phpVersion, workerName string, w config.FrameworkWorker) error
WorkerStartForSite writes a systemd unit for the given framework worker and starts it. The unit name is lerd-{workerName}-{siteName}.
func WorkerStopForSite ¶ added in v1.0.0
WorkerStopForSite stops and removes the named worker unit for the given site.
Types ¶
type BuildJob ¶ added in v0.5.6
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
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.
Source Files
¶
- about.go
- artisan.go
- autostart.go
- browser_linux.go
- build_ui.go
- dashboard.go
- db.go
- doctor.go
- doctor_linux.go
- env.go
- fetch.go
- framework.go
- horizon.go
- install.go
- install_autostart_linux.go
- install_dns_linux.go
- install_linux.go
- isolate.go
- isolate_node.go
- link.go
- logs.go
- man.go
- mcp.go
- minio_migrate.go
- new.go
- node_exec.go
- node_install.go
- node_uninstall.go
- node_use.go
- open.go
- park.go
- pause.go
- php_exec.go
- php_ext.go
- php_ini.go
- php_list.go
- php_rebuild.go
- php_shell.go
- queue.go
- reverb.go
- schedule.go
- secure.go
- services.go
- setup.go
- share.go
- sites.go
- startstop.go
- startstop_linux.go
- status.go
- status_hints_linux.go
- stripe.go
- tray.go
- uninstall.go
- unlink.go
- unpark.go
- update.go
- use.go
- worker.go
- xdebug.go