@@ -30,7 +30,7 @@ const EXAMPLES: &str = color_print::cstr!(
3030 ow env create prod <dim>Create an environment</dim>
3131 ow kv create cache <dim>Create a KV namespace</dim>
3232 ow env bind prod CACHE cache -t kv <dim>Bind KV to environment</dim>
33- ow workers link my-api -- env prod <dim>Link environment to worker</dim>
33+ ow workers link my-api my- env <dim>Link environment to worker</dim>
3434
3535 <dim># Using aliases (for multiple backends)</dim>
3636 ow alias list <dim>Show configured aliases</dim>
@@ -44,7 +44,7 @@ const EXAMPLES: &str = color_print::cstr!(
4444
4545#[ derive( Parser ) ]
4646#[ command( name = "ow" ) ]
47- #[ command( author, version) ]
47+ #[ command( author, version, disable_version_flag = true ) ]
4848#[ command( about = "OpenWorkers CLI - Deploy and manage serverless workers" ) ]
4949#[ command(
5050 long_about = "OpenWorkers CLI - Deploy and manage serverless workers.\n \n \
@@ -54,6 +54,10 @@ const EXAMPLES: &str = color_print::cstr!(
5454) ]
5555#[ command( after_help = EXAMPLES ) ]
5656struct Cli {
57+ /// Print version
58+ #[ arg( short = 'v' , long = "version" , action = clap:: ArgAction :: Version ) ]
59+ version : ( ) ,
60+
5761 #[ command( subcommand) ]
5862 command : Commands ,
5963}
@@ -95,7 +99,7 @@ enum Commands {
9599 ow workers create my-api Create worker 'my-api'\n \
96100 ow workers deploy my-api worker.ts Deploy TypeScript code\n \
97101 ow workers upload my-app ./dist Upload folder with assets\n \
98- ow workers link my-api -- env prod Link to environment"
102+ ow workers link my-api my- env Link to environment"
99103 ) ]
100104 Workers {
101105 #[ command( subcommand) ]
@@ -240,7 +244,7 @@ fn extract_alias_from_args() -> (Option<String>, Vec<String>) {
240244 "--help" ,
241245 "-h" ,
242246 "--version" ,
243- "-V " ,
247+ "-v " ,
244248 ] ;
245249
246250 if known_commands. contains ( & potential_alias. as_str ( ) ) {
0 commit comments