@@ -87,52 +87,73 @@ enum Commands {
8787 } ,
8888
8989 /// Create, deploy, and manage workers
90- #[ command( after_help = "Examples:\n \
90+ #[ command(
91+ visible_alias = "w" ,
92+ alias = "worker" ,
93+ after_help = "Examples:\n \
9194 ow workers list List all workers\n \
9295 ow workers create my-api Create worker 'my-api'\n \
9396 ow workers deploy my-api worker.ts Deploy TypeScript code\n \
9497 ow workers upload my-app ./dist Upload folder with assets\n \
95- ow workers link my-api --env prod Link to environment") ]
98+ ow workers link my-api --env prod Link to environment"
99+ ) ]
96100 Workers {
97101 #[ command( subcommand) ]
98102 command : WorkersCommand ,
99103 } ,
100104
101105 /// Manage environments with variables, secrets, and bindings
102- #[ command( after_help = "Examples:\n \
106+ #[ command(
107+ visible_alias = "e" ,
108+ alias = "envs" ,
109+ alias = "environment" ,
110+ alias = "environments" ,
111+ after_help = "Examples:\n \
103112 ow env list List environments\n \
104113 ow env create prod Create 'prod' environment\n \
105114 ow env set prod API_KEY sk-xxx -s Set secret\n \
106115 ow env bind prod DB my-db -t database Bind database\n \
107116 ow env bind prod KV cache -t kv Bind KV namespace\n \
108- ow env bind prod ASSETS storage -t assets Bind storage for assets") ]
117+ ow env bind prod ASSETS storage -t assets Bind storage for assets"
118+ ) ]
109119 Env {
110120 #[ command( subcommand) ]
111121 command : EnvCommand ,
112122 } ,
113123
114124 /// Manage S3/R2 storage configurations for file storage
115- #[ command( after_help = "Examples:\n \
125+ #[ command(
126+ visible_alias = "s" ,
127+ after_help = "Examples:\n \
116128 ow storage list List storage configs\n \
117- ow storage create my-bucket --bucket name --endpoint https://...") ]
129+ ow storage create my-bucket --bucket name --endpoint https://..."
130+ ) ]
118131 Storage {
119132 #[ command( subcommand) ]
120133 command : StorageCommand ,
121134 } ,
122135
123136 /// Manage KV namespaces for key-value storage
124- #[ command( after_help = "Examples:\n \
137+ #[ command(
138+ visible_alias = "k" ,
139+ after_help = "Examples:\n \
125140 ow kv list List KV namespaces\n \
126- ow kv create cache Create 'cache' namespace") ]
141+ ow kv create cache Create 'cache' namespace"
142+ ) ]
127143 Kv {
128144 #[ command( subcommand) ]
129145 command : KvCommand ,
130146 } ,
131147
132148 /// Manage SQL databases
133- #[ command( after_help = "Examples:\n \
149+ #[ command(
150+ visible_alias = "d" ,
151+ alias = "db" ,
152+ alias = "database" ,
153+ after_help = "Examples:\n \
134154 ow databases list List databases\n \
135- ow databases create my-db Create database") ]
155+ ow databases create my-db Create database"
156+ ) ]
136157 Databases {
137158 #[ command( subcommand) ]
138159 command : DatabasesCommand ,
@@ -187,6 +208,7 @@ fn extract_alias_from_args() -> (Option<String>, Vec<String>) {
187208 }
188209
189210 let known_commands = [
211+ // Main commands
190212 "alias" ,
191213 "login" ,
192214 "migrate" ,
@@ -196,6 +218,20 @@ fn extract_alias_from_args() -> (Option<String>, Vec<String>) {
196218 "kv" ,
197219 "databases" ,
198220 "setup-storage" ,
221+ // Short aliases
222+ "w" ,
223+ "e" ,
224+ "s" ,
225+ "k" ,
226+ "d" ,
227+ // Singular variants (for flexibility)
228+ "worker" ,
229+ "envs" ,
230+ "environment" ,
231+ "environments" ,
232+ "db" ,
233+ "database" ,
234+ // Help flags
199235 "help" ,
200236 "--help" ,
201237 "-h" ,
0 commit comments