soroban_cli/commands/plugin/
ls.rs1use super::default;
2
3#[derive(thiserror::Error, Debug)]
4pub enum Error {}
5
6#[derive(Debug, clap::Parser, Clone)]
7#[group(skip)]
8pub struct Cmd;
9
10impl Cmd {
11 pub fn run(&self) -> Result<(), Error> {
12 let plugins = default::list().unwrap_or_default();
13
14 if plugins.is_empty() {
15 println!("No plugins installed.");
16 println!();
17 println!("Plugins are commands available on the path");
18 println!("that start with 'stellar-'. E.g. stellar-hello");
19 println!();
20 println!("https://developers.stellar.org/docs/tools/cli/plugins");
21 } else {
22 println!("Installed Plugins:\n {}", plugins.join("\n "));
23 }
24
25 Ok(())
26 }
27}