subcommands

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LaunchctlCmd = &cobra.Command{
	Use:   "launchctl",
	Short: "Generate launchd plist file",
	Long: "\nGenerate a launchd property list file for managing the daemon on macOS.\n\n" +
		"This command outputs a launchd plist file that can be installed to manage " +
		"the daemon with macOS launchd. The generated file includes automatic start " +
		"on login, automatic restart on failure, and proper log file configuration.",
	PreRunE: validateLaunchctl,
	RunE:    runLaunchctl,
}
View Source
var LogsCmd = &cobra.Command{
	Use:   "logs",
	Short: "Show daemon logs",
	Long: "\nShow logs from the background indexing daemon.\n\n" +
		"By default, displays the last 50 lines. Use -f to follow logs in real-time, " +
		"or -n to specify the number of lines to display.",
	PreRunE: validateLogs,
	RunE:    runLogs,
}
View Source
var RebuildCmd = &cobra.Command{
	Use:   "rebuild",
	Short: "Force immediate index rebuild",
	Long: "\nForce the daemon to perform an immediate full index rebuild.\n\n" +
		"This triggers a rebuild via the daemon's HTTP API. The daemon will re-process " +
		"all files in the memory directory, extracting metadata, performing semantic " +
		"analysis, and rebuilding all graph relationships.\n\n" +
		"Use --force to clear the graph before rebuilding (otherwise, existing entries " +
		"are updated in place).\n\n" +
		"Use --clear-stale to remove stale cache entries before rebuilding. This ensures " +
		"files are re-analyzed with the current analysis version.",
	PreRunE: validateRebuild,
	RunE:    runRebuild,
}
View Source
var RestartCmd = &cobra.Command{
	Use:   "restart",
	Short: "Restart the daemon",
	Long: "\nRestart the background indexing daemon by stopping and starting it.\n\n" +
		"Performs a graceful shutdown by sending SIGTERM to the running daemon, " +
		"then waits up to 3 seconds for the daemon to stop before starting a new instance.",
	PreRunE: validateRestart,
	RunE:    runRestart,
}
View Source
var StartCmd = &cobra.Command{
	Use:   "start",
	Short: "Start the daemon in foreground",
	Long: "\nStart the background indexing daemon in foreground mode.\n\n" +
		"The daemon will continuously monitor the memory directory and rebuild " +
		"the index as needed. Press Ctrl+C to stop the daemon.\n\n" +
		"A PID file is created at ~/.memorizer/daemon.pid to track the running " +
		"daemon. If you encounter 'daemon already running' errors, check the PID file.",
	PreRunE: validateStart,
	RunE:    runStart,
}
View Source
var StatusCmd = &cobra.Command{
	Use:   "status",
	Short: "Show daemon status",
	Long: "\nShow the current status of the background indexing daemon.\n\n" +
		"Displays whether the daemon is running and configuration details.",
	PreRunE: validateStatus,
	RunE:    runStatus,
}
View Source
var StopCmd = &cobra.Command{
	Use:   "stop",
	Short: "Stop the running daemon",
	Long: "\nStop the running background indexing daemon by sending a SIGTERM signal.\n\n" +
		"The daemon will gracefully shut down, completing any in-progress operations before exiting.",
	PreRunE: validateStop,
	RunE:    runStop,
}
View Source
var SystemctlCmd = &cobra.Command{
	Use:   "systemctl",
	Short: "Generate systemd unit file",
	Long: "\nGenerate a systemd unit file for managing the daemon as a system service.\n\n" +
		"This command outputs a systemd unit file that can be installed to manage " +
		"the daemon with systemd. The generated file uses Type=notify for precise " +
		"readiness control and includes recommended settings for automatic restarts " +
		"and health monitoring.",
	PreRunE: validateSystemctl,
	RunE:    runSystemctl,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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