Update module path from forge.lthn.ai/core/go-container to dappco.re/go/core/container. Migrate import paths for go-io (v0.2.0), go-log (v0.1.0), and go-i18n (v0.2.0) to their new dappco.re equivalents. cli and config remain at forge.lthn.ai (not yet migrated). Co-Authored-By: Virgil <virgil@lethean.io>
42 lines
920 B
Go
42 lines
920 B
Go
// Package vm provides LinuxKit VM management commands.
|
|
package vm
|
|
|
|
import (
|
|
"dappco.re/go/core/i18n"
|
|
"forge.lthn.ai/core/cli/pkg/cli"
|
|
)
|
|
|
|
func init() {
|
|
cli.RegisterCommands(AddVMCommands)
|
|
}
|
|
|
|
// Style aliases from shared
|
|
var (
|
|
repoNameStyle = cli.RepoStyle
|
|
successStyle = cli.SuccessStyle
|
|
errorStyle = cli.ErrorStyle
|
|
dimStyle = cli.DimStyle
|
|
)
|
|
|
|
// VM-specific styles
|
|
var (
|
|
varStyle = cli.NewStyle().Foreground(cli.ColourAmber500)
|
|
defaultStyle = cli.NewStyle().Foreground(cli.ColourGray500).Italic()
|
|
)
|
|
|
|
// AddVMCommands adds container-related commands under 'vm' to the CLI.
|
|
func AddVMCommands(root *cli.Command) {
|
|
vmCmd := &cli.Command{
|
|
Use: "vm",
|
|
Short: i18n.T("cmd.vm.short"),
|
|
Long: i18n.T("cmd.vm.long"),
|
|
}
|
|
|
|
root.AddCommand(vmCmd)
|
|
addVMRunCommand(vmCmd)
|
|
addVMPsCommand(vmCmd)
|
|
addVMStopCommand(vmCmd)
|
|
addVMLogsCommand(vmCmd)
|
|
addVMExecCommand(vmCmd)
|
|
addVMTemplatesCommand(vmCmd)
|
|
}
|