pub struct CloneArgs {
pub url: String,
pub destination: Option<PathBuf>,
pub changeset_path: Option<String>,
pub environments: Option<Vec<String>>,
pub default_env: Option<Vec<String>>,
pub strategy: Option<String>,
pub registry: Option<String>,
pub config_format: Option<String>,
pub non_interactive: bool,
pub skip_validation: bool,
pub force: bool,
pub depth: Option<u32>,
}Expand description
Arguments for the clone command.
§Examples
use clap::Parser;
use sublime_cli_tools::cli::Cli;
let cli = Cli::parse_from([
"workspace",
"clone",
"https://github.com/org/repo.git"
]);Fields§
§url: StringRepository URL to clone from.
Supports both HTTPS and SSH URLs:
- HTTPS: https://github.com/org/repo.git
- SSH: git@github.com:org/repo.git
destination: Option<PathBuf>Destination path (optional, defaults to repository name).
If not provided, uses the repository name extracted from the URL.
changeset_path: Option<String>Changeset path (overrides workspace config, defaults to “.changesets”).
environments: Option<Vec<String>>Available environments (overrides workspace config).
Comma-separated list of environments. Example: “dev,staging,prod”
default_env: Option<Vec<String>>Default environments (overrides workspace config).
Comma-separated list of default environments. Example: “prod”
strategy: Option<String>Versioning strategy (overrides workspace config: “independent” or “unified”).
registry: Option<String>Registry URL (overrides workspace config, defaults to “https://registry.npmjs.org”).
config_format: Option<String>Config format (overrides workspace config: “toml”, “yaml”, or “json”).
non_interactive: boolSkip interactive prompts.
Uses provided flags and defaults without prompting.
skip_validation: boolSkip configuration validation.
Skips validation even if configuration exists.
force: boolOverwrite destination if it exists.
Removes the destination directory before cloning.
depth: Option<u32>Create a shallow clone with specified depth.
Performs a shallow clone with the specified number of commits.
Trait Implementations§
Source§impl Args for CloneArgs
impl Args for CloneArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for CloneArgs
impl FromArgMatches for CloneArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.