* Fix Windows build flow * build(makefile): make windows recipes shell-safe - avoid backslash line-continuation in Windows build-launcher recipe - replace cmd-specific if-not-exist with PowerShell check in web build-frontend * Fix Windows build flow * build(makefile): make windows recipes shell-safe - avoid backslash line-continuation in Windows build-launcher recipe - replace cmd-specific if-not-exist with PowerShell check in web build-frontend * build(web): avoid shell-expanding powershell vars in windows recipe - rewrite build-frontend Windows command without PowerShell local vars - keep install-stamp hash check logic
34 lines
729 B
Go
34 lines
729 B
Go
package onboard
|
|
|
|
import (
|
|
"embed"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
//go:generate go run ../../../../scripts/copydir.go ../../../../workspace ./workspace
|
|
//go:embed workspace
|
|
var embeddedFiles embed.FS
|
|
|
|
func NewOnboardCommand() *cobra.Command {
|
|
var encrypt bool
|
|
|
|
cmd := &cobra.Command{
|
|
Use: "onboard",
|
|
Aliases: []string{"o"},
|
|
Short: "Initialize picoclaw configuration and workspace",
|
|
// Run without subcommands → original onboard flow
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if len(args) == 0 {
|
|
onboard(encrypt)
|
|
} else {
|
|
_ = cmd.Help()
|
|
}
|
|
},
|
|
}
|
|
|
|
cmd.Flags().BoolVar(&encrypt, "enc", false,
|
|
"Enable credential encryption (generates SSH key and prompts for passphrase)")
|
|
|
|
return cmd
|
|
}
|