// Copyright (C) Gear Technologies Inc.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
//! This crate provides the main CLI interface.
usecrate::{app::{App, Opts},cmd::Command,};useanyhow::Result;useclap::Parser;/// Interact with Gear API via node RPC.
#[derive(Debug, Clone, Parser)]#[clap(author, version)]pubstructCli{#[command(flatten)]opts: Opts,
/// Command to run.
#[command(subcommand)]command: Command,
}implCli{pub async fnrun(self)->Result<()>{App::new(self.opts).run(self.command).await
}pubfnrun_blocking(self)->Result<()>{tokio::runtime::Runtime::new()?.block_on(self.run())}}