feat(cli): add comprehensive command suite
+ Adds new commands for managing boxes, environment variables, and running the server. * The command structure is greatly expanded to improve user experience and coverage for core service functionalities.
This commit is contained in:
21
cmd/cmd_run.go
Normal file
21
cmd/cmd_run.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"warpbox/lib/server"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func newRunCommand() *cobra.Command {
|
||||
var addr string
|
||||
cmd := &cobra.Command{
|
||||
Use: "run",
|
||||
Short: "Run the HTTP server",
|
||||
Long: "Run the WarpBox HTTP server.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return server.Run(addr)
|
||||
},
|
||||
}
|
||||
cmd.Flags().StringVar(&addr, "addr", ":8080", "HTTP server address")
|
||||
return cmd
|
||||
}
|
||||
Reference in New Issue
Block a user