pub struct Cli {
pub workspace_root: PathBuf,
pub user_install_dir: PathBuf,
pub trust: TrustStore,
pub marketplace: MarketplaceClient,
pub settings: PluginSettings,
}Expand description
CLI execution context. Tests construct one directly; the binary
constructs one from clap args.
Fields§
§workspace_root: PathBufWorkspace root (used for project-scope discovery).
user_install_dir: PathBufUser-scope install dir (where install and remove operate).
trust: TrustStoreTrust store paths.
marketplace: MarketplaceClientMarketplace client.
settings: PluginSettingsManager settings.
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn list(&self) -> Result<Vec<ListedPlugin>, PluginError>
pub fn list(&self) -> Result<Vec<ListedPlugin>, PluginError>
caliban plugin list — return one row per installed plugin.
§Errors
Returns PluginError only on unrecoverable IO (e.g. unreadable
plugin root). Per-plugin parse errors are listed but don’t fail
the call.
Sourcepub fn info(&self, name: &str) -> Result<Value, PluginError>
pub fn info(&self, name: &str) -> Result<Value, PluginError>
caliban plugin info <name> — return the manifest as JSON.
§Errors
PluginError::PluginNotFound when no plugin with that name is
installed.
Sourcepub fn remove(&mut self, name: &str) -> Result<(), PluginError>
pub fn remove(&mut self, name: &str) -> Result<(), PluginError>
caliban plugin remove <name> — delete the user-scope install
directory and clear the trust record.
§Errors
Returns PluginError::Io on filesystem failure, or
PluginError::PluginNotFound if the plugin isn’t installed.
Sourcepub async fn install(
&mut self,
name: &str,
marketplace_url: &str,
desired_version: Option<&str>,
approve: bool,
) -> Result<PathBuf, PluginError>
pub async fn install( &mut self, name: &str, marketplace_url: &str, desired_version: Option<&str>, approve: bool, ) -> Result<PathBuf, PluginError>
caliban plugin install <name>@<marketplace> — full install flow.