pub struct DependencySpec {
pub spec: String,
pub name: Option<String>,
pub force: bool,
}Expand description
Common dependency specification used across commands
Fields§
§spec: StringDependency specification string
Format: source:path[@version] for Git sources or path for local files
Git dependency formats:
• source:path@version - Git source with specific version
• source:path - Git source (defaults to “main”)
Local dependency formats:
• /absolute/path/file.md - Absolute path
• ./relative/path/file.md - Relative path
• file:///path/to/file.md - File URL
• C:\Windows\path\file.md - Windows path
Pattern formats (using glob patterns):
• source:agents/*.md@v1.0 - All .md files in agents/
• source:agents/**/review*.md - All review files recursively
• ./local/**/*.json - All JSON files recursively
Examples:
• official:agents/reviewer.md@v1.0.0
• community:snippets/utils.md
• ./agents/local-agent.md
• ../shared/resources/hook.json
name: Option<String>Custom name for the dependency
If not provided, the name will be derived from the file path. This allows for more descriptive or shorter names in the manifest.
force: boolForce overwrite if dependency exists
By default, adding a duplicate dependency will fail. Use this flag to replace existing dependencies.
Trait Implementations§
Source§impl Args for DependencySpec
impl Args for DependencySpec
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 Clone for DependencySpec
impl Clone for DependencySpec
Source§fn clone(&self) -> DependencySpec
fn clone(&self) -> DependencySpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DependencySpec
impl Debug for DependencySpec
Source§impl FromArgMatches for DependencySpec
impl FromArgMatches for DependencySpec
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.