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:
2026-04-30 11:31:43 +03:00
parent f0b723e35d
commit 877ac90574
5 changed files with 748 additions and 14 deletions

21
cmd/cmd_run.go Normal file
View 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
}