harmont_cli/commands/
mod.rs1pub mod run;
2
3use anyhow::Result;
4
5use crate::cli::Command;
6use crate::context::RunContext;
7
8pub async fn dispatch(command: Command, ctx: RunContext) -> Result<i32> {
16 match command {
17 Command::Run(args) => run::handle(args, ctx).await,
18 Command::Version => crate::builtin::version::run().await.map(|()| 0),
19 Command::Plugin(cmd) => crate::builtin::plugin::run(cmd).await.map(|()| 0),
20 Command::External(argv) => crate::dispatcher::run(argv).await,
21 }
22}