@@ -10,7 +10,9 @@ use crate::{
1010
1111#[ derive( Subcommand , Debug ) ]
1212pub enum CliCommands {
13+ #[ clap( about = "Show version and config file locations" ) ]
1314 Version ,
15+ #[ clap( about = "Subcommands related to CSCS" ) ]
1416 Cscs {
1517 #[ command( subcommand) ]
1618 command : CscsCommands ,
@@ -28,36 +30,37 @@ pub enum CliCommands {
2830
2931#[ derive( Subcommand , Debug ) ]
3032pub enum CscsCommands {
33+ #[ clap( about = "Log in to CSCS" ) ]
3134 Login ,
32- #[ clap( alias( "j" ) ) ]
35+ #[ clap( alias( "j" ) , about = "Job subcommands [aliases: j]" ) ]
3336 Job {
3437 #[ command( subcommand) ]
3538 command : CscsJobCommands ,
3639 } ,
37- #[ clap( alias( "f" ) ) ]
40+ #[ clap( alias( "f" ) , about = "File management subcommands [aliases: f]" ) ]
3841 File {
3942 #[ command( subcommand) ]
4043 command : CscsFileCommands ,
4144 } ,
42- #[ clap( alias( "s" ) ) ]
45+ #[ clap(
46+ alias( "s" ) ,
47+ about = "Subcommands for managing for interacting with the compute system config (e.g. 'daint') [aliases: s]"
48+ ) ]
4349 System {
4450 #[ command( subcommand) ]
4551 command : CscsSystemCommands ,
4652 } ,
4753}
4854#[ derive( Subcommand , Debug ) ]
4955pub enum CscsJobCommands {
50- #[ clap( alias( "ls" ) ) ]
56+ #[ clap( alias( "ls" ) , about = "List all jobs [aliases: ls]" ) ]
5157 List ,
52- #[ clap( alias( "g" ) ) ]
53- Get {
54- job_id : i64 ,
55- } ,
56- Log {
57- job_id : i64 ,
58- } ,
58+ #[ clap( alias( "g" ) , about = "Get metadata for a specific job [aliases: g]" ) ]
59+ Get { job_id : i64 } ,
60+ #[ clap( about = "Get the stdout of a job" ) ]
61+ Log { job_id : i64 } ,
5962
60- #[ clap( alias( "s" ) ) ]
63+ #[ clap( alias( "s" ) , about = "Submit a new compute job [aliases: s]" ) ]
6164 Submit {
6265 #[ clap( short, long, help = "the path to the srun script file to use" ) ]
6366 script_file : Option < PathBuf > ,
@@ -74,24 +77,25 @@ pub enum CscsJobCommands {
7477 #[ clap( trailing_var_arg = true , help = "The command to run in the container" ) ]
7578 command : Option < Vec < String > > ,
7679 } ,
77- #[ clap( alias( "c" ) ) ]
78- Cancel {
79- job_id : i64 ,
80- } ,
80+ #[ clap(
81+ alias( "c" ) ,
82+ about = "Cancel a running job, fails if the job isn't running [aliases: c]"
83+ ) ]
84+ Cancel { job_id : i64 } ,
8185}
8286
8387#[ derive( Subcommand , Debug ) ]
8488pub enum CscsFileCommands {
85- #[ clap( alias( "ls" ) ) ]
89+ #[ clap( alias( "ls" ) , about = "List folders and files in a remote path [aliases: ls]" ) ]
8690 List { path : PathBuf } ,
87- #[ clap( alias( "dl" ) ) ]
91+ #[ clap( alias( "dl" ) , about = "Download a remote file [aliases: dl]" ) ]
8892 Download {
8993 #[ clap( short, long, help = "account/project to use" ) ]
9094 account : Option < String > ,
9195 remote : PathBuf ,
9296 local : PathBuf ,
9397 } ,
94- #[ clap( alias( "ul" ) ) ]
98+ #[ clap( alias( "ul" ) , about = "Upload a file to remote storage [aliases: ul]" ) ]
9599 Upload {
96100 #[ clap( short, long, help = "account/project to use" ) ]
97101 account : Option < String > ,
@@ -102,11 +106,11 @@ pub enum CscsFileCommands {
102106
103107#[ derive( Subcommand , Debug ) ]
104108pub enum CscsSystemCommands {
105- #[ clap( alias( "ls" ) , about = "List available compute systems" ) ]
109+ #[ clap( alias( "ls" ) , about = "List available compute systems [aliases: ls] " ) ]
106110 List ,
107111 #[ clap(
108112 alias( "s" ) ,
109- about = "Set system to use (e.g. `daint`, see `coman cscs ls` for available systems)"
113+ about = "Set system to use (e.g. `daint`, see `coman cscs ls` for available systems) [aliases: s] "
110114 ) ]
111115 Set {
112116 #[ clap( short, long, action, help = "set in global config instead of project-local one" ) ]
0 commit comments