@@ -18,32 +18,48 @@ var (
1818func main () {
1919 rootCmd := & cobra.Command {
2020 Use : "breez" ,
21- Short : "Breez - Instant local tunnel CLI" ,
22- Long : "Expose your local development servers to the internet securely via Breez." ,
21+ Short : "Breez - Instant, lightweight local tunnel CLI" ,
22+ Long : `☁ Breez CLI
23+ Expose your local development HTTP servers to the public internet instantly.
24+
25+ Examples:
26+ $ breez serve 3000
27+ $ breez serve 8080 --subdomain myapp
28+ $ breez serve 5173 --gateway https://gateway.breez.run` ,
2329 }
2430
25- rootCmd .PersistentFlags ().StringVar (& gatewayURL , "gateway" , "http://localhost:8080" , "Gateway server URL" )
31+ rootCmd .PersistentFlags ().StringVarP (& gatewayURL , "gateway" , "g" , " http://localhost:8080" , "Gateway server URL to connect with " )
2632
2733 serveCmd := & cobra.Command {
2834 Use : "serve <port>" ,
29- Short : "Serve a local port over a public URL tunnel" ,
30- Args : cobra .ExactArgs (1 ),
35+ Short : "Create a public tunnel forwarding to your local HTTP server port" ,
36+ Long : `Creates a secure WebSocket tunnel between your local port and the Breez Gateway server.
37+
38+ Arguments:
39+ <port> The local port number where your application/server is running (e.g. 3000, 8080, 5173).
40+
41+ Examples:
42+ $ breez serve 3000
43+ $ breez serve 8080 --subdomain custom-name
44+ $ breez serve 5000 --gateway http://localhost:8080` ,
45+ Args : cobra .ExactArgs (1 ),
3146 RunE : func (cmd * cobra.Command , args []string ) error {
3247 port , err := strconv .Atoi (args [0 ])
3348 if err != nil || port <= 0 || port > 65535 {
34- return fmt .Errorf ("invalid port number: %s" , args [0 ])
49+ return fmt .Errorf ("invalid port number: %s. Port must be an integer between 1 and 65535 " , args [0 ])
3550 }
3651
3752 client := cli .NewClient (gatewayURL , port , subdomain )
3853 return client .Serve ()
3954 },
4055 }
4156
42- serveCmd .Flags ().StringVarP (& subdomain , "subdomain" , "s" , "" , "Request a specific subdomain" )
57+ serveCmd .Flags ().StringVarP (& subdomain , "subdomain" , "s" , "" , "Request a custom subdomain name (e.g. --subdomain myapp) " )
4358
4459 versionCmd := & cobra.Command {
4560 Use : "version" ,
46- Short : "Display CLI version information" ,
61+ Short : "Display version, commit hash, and build timestamp" ,
62+ Long : "Displays the current installed Breez CLI version, git commit hash, and build timestamp." ,
4763 Run : func (cmd * cobra.Command , args []string ) {
4864 fmt .Printf ("breez v%s (commit: %s, built at: %s)\n " , version .Version , version .Commit , version .BuildDate )
4965 },
0 commit comments