Skip to main content

harmont_cli/cli/
plugin.rs

1use anyhow::Result;
2use clap::Subcommand;
3
4#[derive(Debug, Clone, Subcommand)]
5pub enum PluginCommand {
6    /// List registered runners.
7    List,
8}
9
10/// Run an `hm plugin` subcommand.
11///
12/// # Errors
13///
14/// Returns an error if the plugin operation fails.
15pub async fn run(cmd: PluginCommand) -> Result<()> {
16    match cmd {
17        PluginCommand::List => list().await,
18    }
19}
20
21#[allow(clippy::unused_async)]
22async fn list() -> Result<()> {
23    tracing::info!("Registered runners:");
24    tracing::info!("  docker (default, built-in)");
25    Ok(())
26}