pub enum ServerCommands {
Assign {
variant: Option<Variant>,
accelerator: Option<String>,
name: Option<String>,
high_ram: bool,
keepalive: bool,
},
Reconfigure {
name: Option<String>,
variant: Option<Variant>,
accelerator: Option<String>,
high_ram: bool,
keepalive: bool,
},
Ls {
available: bool,
},
Rm {
name: Option<String>,
},
Shell {
name: Option<String>,
},
Info {
name: Option<String>,
},
Ps {
name: Option<String>,
interval: u64,
},
Run {
name: Option<String>,
command: Vec<String>,
},
}Variants§
Assign
Assign a new Colab server (interactive if no flags given)
Fields
Reconfigure
Reconfigure an existing server (variant / accelerator / shape)
Fields
Ls
List assigned servers, or available accelerators with --available
Rm
Remove an assigned server
Shell
Open an interactive shell on a server
Info
Show server and account info
Ps
Realtime system stats (CPU / RAM / disk / GPU) for a server
Run
Run an arbitrary command on the assigned server (passthrough)
The command and its args are sent to the runtime verbatim. Stdout/stderr stream back to the local terminal as the remote process produces them, and the remote exit status is propagated as this command’s exit code.
Examples: colab-cli server run –name “Colab CPU” python -V colab-cli server run ls -la /content colab-cli server run bash -lc ‘echo hi && uname -a’
Trait Implementations§
Source§impl FromArgMatches for ServerCommands
impl FromArgMatches for ServerCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ServerCommands
impl Subcommand for ServerCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand